You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
929 B

  1. /* plan.mod */
  2. var bin1, >= 0, <= 200;
  3. var bin2, >= 0, <= 2500;
  4. var bin3, >= 400, <= 800;
  5. var bin4, >= 100, <= 700;
  6. var bin5, >= 0, <= 1500;
  7. var alum, >= 0;
  8. var silicon, >= 0;
  9. minimize
  10. value: .03 * bin1 + .08 * bin2 + .17 * bin3 + .12 * bin4 + .15 * bin5 +
  11. .21 * alum + .38 * silicon;
  12. subject to
  13. yield: bin1 + bin2 + bin3 + bin4 + bin5 + alum + silicon = 2000;
  14. fe: .15 * bin1 + .04 * bin2 + .02 * bin3 + .04 * bin4 + .02 * bin5 +
  15. .01 * alum + .03 * silicon <= 60;
  16. cu: .03 * bin1 + .05 * bin2 + .08 * bin3 + .02 * bin4 + .06 * bin5 +
  17. .01 * alum <= 100;
  18. mn: .02 * bin1 + .04 * bin2 + .01 * bin3 + .02 * bin4 + .02 * bin5
  19. <= 40;
  20. mg: .02 * bin1 + .03 * bin2 + .01 * bin5 <= 30;
  21. al: .70 * bin1 + .75 * bin2 + .80 * bin3 + .75 * bin4 + .80 * bin5 +
  22. .97 * alum >= 1500;
  23. si: 250 <= .02 * bin1 + .06 * bin2 + .08 * bin3 + .12 * bin4 +
  24. .02 * bin5 + .01 * alum + .97 * silicon <= 300;
  25. end;
  26. /* eof */