$title Dorian Auto example: (revised) use of semiint vars 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 /; * Note that semicont variables also exist! semiint variables 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)); model dorian/resourceConstraint, objective/; option limrow=0, limcol=0; dorian.optcr=0; solve dorian using mip maximizing totalProfit;