$ondollar title Oxygen System Design (NLP) Example 14.3 of Rardin (1998) $offsymxref offsymlist offuelxref offuellist offupper option limrow = 0, limcol = 0; scalars d1 "low demand level" /2.5/, d2 "burst demand level" /40/, t1 "time of low demand" /0.6/, t2 "full cycle time" /1.0/, p0 "minimum pressure" /200/; free variable totcost; positive variables x1 "production rate of oxygen plant", x2 "pressure of storage tank", x3 "compressor power", x4 "storage tank volume"; equations obj "minimize total cost", dem "oxygen demand", pmin "minimum pressure", powpres "power vs. pressure", volpres "volume vs. pressure"; obj.. totcost =e= 61.8 + 5.72*x1 + .0175*x3**.85 + .0094*x4**.75 + .006*t1*x3; dem.. t2*x1 =g= d1*t1 + d2*(t2 - t1); pmin.. x2 =g= p0; powpres.. x3 =e= 36.25 * ( (d2-x1)*(t2-t1)/t1 ) * log(x2/p0); volpres.. x4 =e= 348300 * ( (d2-x1)*(t2-t1)/x2 ); model oxygen /all/; x1.l = 10.0; x2.l = p0; x3.l = 10.0; x4.l = 10.0; solve oxygen using nlp minimizing totcost;