$title Dorian Auto example: Either-Or constraints (p. 471, Winston) $ontext This formulation has semiint variables. $offtext option limrow=0, limcol=0; set type /compact, midsize, tank/; set ingredients /labor "in hours" steel "in tons"/; table resources(ingredients,type) compact midsize tank steel 1.5 3 5 labor 30 25 40; parameter profit(type) / compact 2, midsize 3, tank 4/; parameter available(ingredients) / steel 6000, labor 60000/; * minimum amount of a car to be produced, for viability scalar carsRequired / 1000 / bigM / 3000 /; semiint variable cars(type) "how many cars of this type"; cars.lo(type)=carsRequired; cars.up(type)=bigM; variable totalProfit; equations resourceConstraint objective; resourceConstraint(ingredients).. sum(type,resources(ingredients,type)*cars(type)) =l= available(ingredients); objective.. totalProfit =e= sum(type,profit(type)*cars(type)); option mip=cplex; model dorian/resourceConstraint, objective/; dorian.optcr=0; solve dorian using mip maximizing totalProfit;