examples/plan.mod
changeset 1 c445c931472f
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/examples/plan.mod	Mon Dec 06 13:09:21 2010 +0100
     1.3 @@ -0,0 +1,39 @@
     1.4 +/* plan.mod */
     1.5 +
     1.6 +var bin1, >= 0, <= 200;
     1.7 +var bin2, >= 0, <= 2500;
     1.8 +var bin3, >= 400, <= 800;
     1.9 +var bin4, >= 100, <= 700;
    1.10 +var bin5, >= 0, <= 1500;
    1.11 +var alum, >= 0;
    1.12 +var silicon, >= 0;
    1.13 +
    1.14 +minimize
    1.15 +
    1.16 +value: .03 * bin1 + .08 * bin2 + .17 * bin3 + .12 * bin4 + .15 * bin5 +
    1.17 +       .21 * alum + .38 * silicon;
    1.18 +
    1.19 +subject to
    1.20 +
    1.21 +yield: bin1 + bin2 + bin3 + bin4 + bin5 + alum + silicon = 2000;
    1.22 +
    1.23 +fe: .15 * bin1 + .04 * bin2 + .02 * bin3 + .04 * bin4 + .02 * bin5 +
    1.24 +    .01 * alum + .03 * silicon <= 60;
    1.25 +
    1.26 +cu: .03 * bin1 + .05 * bin2 + .08 * bin3 + .02 * bin4 + .06 * bin5 +
    1.27 +    .01 * alum <= 100;
    1.28 +
    1.29 +mn: .02 * bin1 + .04 * bin2 + .01 * bin3 + .02 * bin4 + .02 * bin5
    1.30 +    <= 40;
    1.31 +
    1.32 +mg: .02 * bin1 + .03 * bin2 + .01 * bin5 <= 30;
    1.33 +
    1.34 +al: .70 * bin1 + .75 * bin2 + .80 * bin3 + .75 * bin4 + .80 * bin5 +
    1.35 +    .97 * alum >= 1500;
    1.36 +
    1.37 +si: 250 <= .02 * bin1 + .06 * bin2 + .08 * bin3 + .12 * bin4 +
    1.38 +    .02 * bin5 + .01 * alum + .97 * silicon <= 300;
    1.39 +
    1.40 +end;
    1.41 +
    1.42 +/* eof */