$Title Ajax Paper Company Production Schedule (AJAX,SEQ=60) $Ontext This sample model is taken from the cybernet pds/apex sample library of models. A paper manufacturer can produce four different types of paper on three different machines. Given a fixed demand schedule the objective is to find a production plan that maximizes monthly profits. CDC, PDS/APEX Sample Model Library, 1977. Control Data Corporation 24 May 2009: (Michael Saunders) For class MS&E 318 / CME 338, we have added two more models with the BP and BPDN objectives. $Offtext Sets m machines at mills / machine-1, machine-2, machine-3 / g paper grades / 20-bond-wt, 25-bond-wt, c-bond-ext, tissue-wrp / Table prate(g,m) production rate (tons per hour) machine-1 machine-2 machine-3 20-bond-wt 53 52 49 25-bond-wt 51 49 44 c-bond-ext 52 45 47 tissue-wrp 42 44 40 Table pcost(g,m) production cost ($ per ton) machine-1 machine-2 machine-3 20-bond-wt 76 75 73 25-bond-wt 82 80 78 c-bond-ext 96 95 92 tissue-wrp 72 71 70 Table dempr(g,*) demand and prices demand price 20-bond-wt 30000 77 25-bond-wt 20000 81 c-bond-ext 12000 99 tissue-wrp 8000 105 Parameter avail(m) available machine time (hours per month) / machine-1 672, machine-2 600, machine-3 480 / Parameter lambda1 weight on sum of variables in BPDN objective / 100.0 / Parameter lambda2 weight on least-squares part of BPDN objective / 1 / Variables outp(g,m) production (tons per month) profit profit ($ per month) BPobj Basis Pursuit objective BPDNobj Basis Pursuit DeNoising objective rescap(m) residuals on capacity constraints resdem(g) residuals on demand constraints Positive Variable outp Equations cap(m) machine capacity (hours per month) dem(g) demand (tons per month) pdef profit definition ($ per month) capBPDN(m) capacity with residuals demBPDN(g) demand with residuals BP Basis Pursuit def (sum of positive variables) BPDN BP Denoising def (weighted sum of vars + least-squares) ; cap(m).. sum(g, outp(g,m)/prate(g,m)) =l= avail(m); dem(g).. sum(m, outp(g,m)) =e= dempr(g,"demand"); pdef.. profit =e= sum( g, dempr(g,"demand")*dempr(g,"price")) - sum((g,m), pcost(g,m)*outp(g,m)); capBPDN(m).. sum(g, outp(g,m)/prate(g,m)) + rescap(m) =l= avail(m); demBPDN(g).. sum(m, outp(g,m)) + resdem(g) =e= dempr(g,"demand"); BP.. BPobj =e= lambda1*sum((g,m), outp(g,m)) - profit; BPDN.. BPDNobj =e= lambda1*sum((g,m), outp(g,m)) - profit + 0.5*lambda2*sum(m, sqr(rescap(m))) + 0.5*lambda2*sum(g, sqr(resdem(g))); Models ajax /cap, dem, pdef/ ajaxBP /cap, dem, pdef, BP / ajaxBPDN /capBPDN, demBPDN, pdef, BPDN/; ******************************************* * Run just the nonlinear model ajaxBPDN. * We could say "option nlp = minos;" to * specify the solver here, but it is more * flexible to say "gams ajaxBPDN nlp=minos" * at runtime. ******************************************* option sysout = on; ajaxBPDN.optfile = 1; Solve ajaxBPDN using nlp minimizing BPDNobj; $Stitle BPDN report definitions Parameter mtrBPDN(m,*) machine time report parBPDN(g,*) production allocation report ; mtrBPDN(m,"avail-h") = avail(m); mtrBPDN(m,"used-h") = capBPDN.l(m); mtrBPDN(m,"unused-h") = avail(m) - capBPDN.l(m); mtrBPDN(m,"marginal") = - capBPDN.m(m); mtrBPDN(m,"residual") = rescap.l(m); parBPDN(g,"demand") = dempr(g,"demand"); parBPDN(g,"sold") = demBPDN.l(g); parBPDN(g,"unsold") = dempr(g,"demand") - demBPDN.l(g); parBPDN(g,"marginal") = demBPDN.m(g); parBPDN(g,"residual") = resdem.l(g); Display profit.l, mtrBPDN, parBPDN, outp.l, outp.m;