$ondollar title CFPL (LP) Example 4.4 of Rardin(1998) $offsymxref offsymlist offuelxref offuellist offupper option limrow = 0, limcol = 0; sets q "log qualities" /G, F/, v "log vendors" /1, 2/, t "veneer thicknesses" /16th, 8th/, g "veneer grades" /A, B, C/, p "plywood thicknesses" /qtr, half/; alias (g,gp); alias (g,gpp); table logavl(v,q) "log availability per month" G F 1 200 300 2 100 1000; table logcst(v,q) "unit log cost" G F 1 340 190 2 490 140; table yield(g,t,v,q) "yield of grade g thickness t veneer from v log of quality q" 1.G 1.F 2.G 2.F A.16th 400 200 400 200 B.16th 700 500 700 500 C.16th 900 1300 900 1300 A.8th 200 100 200 100 B.8th 350 250 350 250 C.8th 450 650 450 650; table venavl(t,g) "sqft available of grade g green veneer of thickness t" A B C 16th 5000 25000 40000 8th 10000 40000 50000; table vencst(t,g) "cost per sqft of grade g green veneer of thickness t" A B C 16th 1.00 0.30 0.10 8th 2.20 0.60 0.20; table comp(t,g,p,gp,gpp) "composition of thickness p front gp back gpp plywood" qtr.A.B qtr.A.C qtr.B.C half.A.B half.A.C half.B.C 16th.A 1 1 1 1 16th.B 1 1 1 1 16th.C 1 1 1 1 8th.A 8th.B 1 1 1 8th.C 1 1 1 2 2 2; table mkt(p,gp,gpp) "market for thickness p front gp back gpp plywood" A.B A.C B.C qtr 1000 4000 8000 half 1000 5000 8000; table price(p,gp,gpp) "selling price of thickness p front gp back gpp plywood" A.B A.C B.C qtr 45 40 33 half 75 65 50; table time(p,gp,gpp) "pressing time of thickness p front gp back gpp plywood" A.B A.C B.C qtr 0.25 0.25 0.25 half 0.40 0.40 0.40; scalar presscap "pressing capacity" /4500/; scalar untrim "untrimmed sqft of veneer to make on sheet" /35/; free variable margin "total contributed margin"; positive variables w(q,v,t) "logs of quality q from vendor v peeled thickness t", x(t,g) "sqft of thickness t grade g green veneer purchased", y(t,g,gp) "sheets of thickness t, grade g green veneer used as gp", z(p,gp,gpp) "sheets of thickness p, gp front, gpp back plywood pressed and sold"; equations obj "max total contributed margin", logavlc(q,v) "quality q logs available from vendor v", venavlc(t,g) "thickness t grade g green veneer available", mktc(p,gp,gpp) "market for thickness p, front gp, back gpp plywood", press "pressing capacity", greenbal(t,g) "thickness t grade g green veneer balance", finishbal(t,g) "thickness t grade g finished veneer balance"; obj.. margin =e= - sum((q,v,t), logcst(v,q)*w(q,v,t)) - sum((t,g), vencst(t,g)*x(t,g)) + sum((p,gp,gpp), price(p,gp,gpp)*z(p,gp,gpp)); logavlc(q,v).. sum(t, w(q,v,t)) =l= logavl(v,q); venavlc(t,g).. x(t,g) =l= venavl(t,g); mktc(p,gp,gpp).. z(p,gp,gpp) =l= mkt(p,gp,gpp); press.. sum((p,gp, gpp), time(p,gp,gpp)*z(p,gp,gpp)) =l= presscap; greenbal(t,g).. sum((q,v), yield(g,t,v,q)*w(q,v,t)) + x(t,g) =g= untrim*sum(gp$(abs(ord(gp)-ord(g)) le 1), y(t,g,gp)); finishbal(t,g).. sum(gp$(abs(ord(gp)-ord(g)) le 1), y(t,gp,g)) =e= sum((p,gp,gpp), comp(t,g,p,gp,gpp)*z(p,gp,gpp)); model cfpl /all/; solve cfpl using lp maximizing margin;