in reply to Re^5: Tricky chemicals optimization problem
in thread Tricky chemicals optimization problem

How do these results sets look (assuming an unlimited number of nozzles per machine)?

  1. With the capacity of all the machines set to 200,000, the non-zero flows can be fitted onto 13 machines:
    C:\test>1179307 -MACHMAX=200000 { E001 => { " total" => 199989.2556, C001 => [22790.166, 2064.174, 105 +3.15], C004 => [3023.16, 1511.58], C008 => [82.4112], C015 => [24504. +1632, 14837.91, 13323.6396, 12250.6656, 6234.5772, 5720.64, 5255.838, + 4380.3252, 3468.138, 2386.0308, 1716.192, 1501.668, 1436.2488, 1430. +16, 791.19, 703.4688], C030 => [12659.04, 3164.76, 2109.84, 527.46], +C054 => [5200.8264, 3073.2156], C056 => [6869.724, 5901.0384, 4301.80 +8, 2578.6068, 2186.8704, 548.7, 383.5944], C064 => [19976.22, 42.0552 +] }, E002 => { " total" => 199972.6884, C001 => [1026.6, 1026.6, 513.3, 4 +99.5648], C013 => [15214.92, 13190.04, 7315.1268, 7042.3344, 6690.6, +5977.29, 3874.53, 2442.6], C019 => [23934.8604, 4471.02, 2891.2596], +C025 => [75.048], C027 => [29056.32, 26777.6928, 25997.76, 21892.3512 +], C059 => [62.8704] }, E003 => { " total" => 199981.0428, C009 => [58.1976], C012 => [7965. +8496, 575.25], C025 => [73.9152], C027 => [22482.54, 21151.5, 21090.6 +828, 19602.75, 15682.2, 9409.32, 4230.3, 4062.15, 3101.04], C050 => [ +19529.6136, 5350.9932, 3023.16, 1996.56], C065 => [18787.488, 9060.13 +44, 5267.52, 3072.72, 1773.3984, 1755.84, 877.92] }, E004 => { " total" => 199769.988, C012 => [14273.28, 12292.2252, 112 +28.88, 11145.5484, 11068.3056, 7258.9824, 6281.73, 6071.808, 5841.212 +4, 5819.3352, 5671.3632, 4463.232, 3735.762, 3452.3496, 3217.86, 2876 +.25, 2832, 2812.8132, 2265.6, 2195.3664, 1669.3932, 1087.488, 1029.71 +52, 1022.9184, 571.71, 566.4, 552.24, 536.31, 525.9732, 490.1484, 462 +.1824, 350.0352, 343.026], C036 => [14996.502, 6818.5356, 2777.13, 88 +3.23, 883.23], C044 => [6781.0824], C058 => [5970.8472], C062 => [108 +6.78], C068 => [8094.21, 5085.0684, 3320.52, 2884.1088, 2846.16, 1904 +.52, 952.26, 474.36] }, E005 => { " total" => 199764.2532, C008 => [1133.154, 803.5092], C01 +6 => [36411.8736, 34161.9912, 22882.56, 13821.93, 9457.11, 7274.7, 63 +75.3984, 5819.76, 5810.91, 4290.48, 4261.8768, 3546.7968], C039 => [5 +71.71, 571.71], C058 => [10519.11, 2003.64], C062 => [13215.2448, 967 +2.342, 543.39, 412.9764], C071 => [4651.56, 1550.52] }, E006 => { " total" => 199890.2772, C008 => [7624.8768, 4450.2048], C +024 => [4854.3312, 994.74], C026 => [11102.9268, 10570.1568, 7970.239 +2, 6393.24, 5860.47, 5860.47, 3729.39, 3729.39, 2755.3944, 2663.85, 2 +173.7016, 2131.08], C033 => [16761.7584, 4028.3784], C041 => [10822.2 +048], C042 => [18219.2472, 1537.9884], C047 => [11044.8], C063 => [88 +0.752], C071 => [17055.72, 10316.1264, 9819.96, 4134.72, 4134.72, 413 +4.72, 4134.72] }, E007 => { " total" => 199951.59, C002 => [27401.2992, 12540.2376, 90 +97.8, 7975.9032, 6749.4348, 6743.7, 4600.584, 909.78], C018 => [23211 +.426, 3075.198, 1053.15], C021 => [15559.1496], C047 => [21905.52, 56 +14.44, 4141.8, 3552.744, 2282.592], C055 => [17815.05, 9458.172, 1619 +.55, 1619.55, 539.85], C063 => [10392.8736, 1585.3536, 506.4324] }, E008 => { " total" => 199818.2736, C002 => [3992.2704, 3788.4372, 17 +51.1672, 1348.74, 1297.41, 1078.992, 472.1652, 279.66], C005 => [9588 +.444, 826.59], C025 => [9081.516, 3432.03], C037 => [6626.88, 3186], +C045 => [13927.4928, 13855.7016, 861.4944, 861.4944, 717.912], C048 = +> [7948.4328, 7151.3664, 6549.8496, 5920.4376], C059 => [16037.0496, +11652.972, 8889.8604, 6949.02, 6096.7296, 4212.1752, 3185.8584, 2208. +96, 1104.48, 1104.48, 847.6884, 506.22], C061 => [6980.3136, 5961.147 +6, 3811.5888, 1546.272, 1457.9136], C066 => [6855.6348, 5865.426] }, E009 => { " total" => 199760.2176, C011 => [13817.8944], C022 => [14 +198.232, 9324.7848, 3760.6128, 959.34], C025 => [18737.5032, 14218.41 +, 7354.35, 6822.8544, 6595.02, 6373.77, 4902.9, 4652.976, 4106.1168, +3765.852, 3714.876, 3392.8776, 3165.0432, 2451.45, 2288.964, 1790.532 +, 1731.06, 1731.06, 923.94, 879.336, 573.48, 490.29, 490.29, 461.97], + C043 => [23977.128, 15787.5504, 10575.5376, 1462.02, 555.5676], C057 + => [923.94], C069 => [1383.1488, 476.13, 476.13, 467.28] }, E010 => { " total" => 199779.7584, C011 => [21495.3048, 13446.6192, +12807.0828, 12648.2076, 9052.9128, 7440.7968, 7376.652, 6991.7832, 64 +35.72, 6392.3904, 5901.3216, 5302.6368, 4276.32, 4276.32, 4233.5568, +3207.24, 2681.55, 2629.9368, 2523.0288, 2469.0792, 2145.24, 2123.7876 +, 1692.2616, 1603.62, 1603.62, 1566.0252, 1143.42, 1074.8148, 1072.62 +, 1026.3168, 571.71, 571.71, 536.31, 536.31, 536.31, 534.54, 534.54], + C028 => [8562.4812, 6603.87, 4862.8272, 4571.91, 4571.91, 3047.94, 2 +519.6304, 2418.7404, 2158.8336] }, E011 => { " total" => 199788.396, C003 => [31858.23, 4610.0004, 2331 +.09, 1522.9788, 1505.4912], C009 => [759.33], C010 => [10531.146, 444 +9.78], C017 => [14695.0356, 7298.2056, 2465.61, 1972.488], C020 => [2 +884.392], C028 => [1894.1832, 1599.7968, 1523.97, 1523.97, 1199.8476, + 1015.98, 1015.98, 507.99, 483.21, 457.0848], C029 => [6377.0976], C0 +38 => [9604.728, 1143.42], C046 => [19876.1088, 9586.8864, 2633.76], +C060 => [8658.2028, 6731.8056, 529.23, 254.0304], C067 => [1869.12, 4 +67.28], C070 => [19788.6, 11496.5748, 1633.71, 576.0288, 456.0228] }, E012 => { " total" => 198072.3456, C009 => [10448.3808, 10068.1848, +8391.924, 6775.7016, 3822.9876, 3735.9036, 2851.6824, 2035.0044, 1522 +.9788, 1305.4104, 727.47, 727.47, 698.3712], C014 => [39789.6, 12931. +62, 4476.33, 3978.96, 2984.22], C020 => [17930.808, 15611.4, 9302.836 +8, 1331.748], C023 => [24447.6648, 4371.9], C032 => [7803.7884] }, E013 => { " total" => 60297.2448, C023 => [23573.2848, 14864.46, 139 +90.08, 7869.42] }, }
  2. And this with the machine capacity set to 100,000, 25 machines:
    C:\test>1179307 -MACHMAX=100000 { E001 => { " total" => 99982.9104, C015 => [24504.1632, 14837.91, 133 +23.6396, 12250.6656, 6234.5772, 5720.64, 5255.838, 4380.3252, 3468.13 +8, 2386.0308, 1716.192, 1501.668, 1436.2488, 1430.16, 791.19, 703.468 +8], C064 => [42.0552] }, E002 => { " total" => 99986.8044, C001 => [22790.166, 2064.174, 1053 +.15], C004 => [3023.16, 1511.58], C030 => [12659.04, 3164.76, 2109.84 +, 527.46], C054 => [5200.8264, 3073.2156], C056 => [6869.724, 5901.03 +84, 4301.808, 2578.6068, 2186.8704, 548.7, 383.5944], C059 => [62.870 +4], C064 => [19976.22] }, E003 => { " total" => 99944.3952, C001 => [1026.6, 1026.6, 513.3, 49 +9.5648], C008 => [82.4112], C012 => [575.25], C013 => [15214.92, 1319 +0.04, 7315.1268, 7042.3344, 6690.6, 5977.29, 3874.53, 2442.6], C019 = +> [23934.8604, 4471.02, 2891.2596], C025 => [75.048], C027 => [3101.0 +4] }, E004 => { " total" => 99972.7152, C012 => [462.1824], C027 => [29056 +.32, 26777.6928, 25997.76, 15682.2], C050 => [1996.56] }, E005 => { " total" => 99985.6716, C009 => [58.1976], C027 => [22482. +54, 21892.3512, 21151.5, 21090.6828, 9409.32], C050 => [3023.16], C06 +5 => [877.92] }, E006 => { " total" => 99825.8052, C012 => [7258.9824], C025 => [73.9 +152], C027 => [19602.75, 4230.3, 4062.15], C050 => [19529.6136, 5350. +9932], C065 => [18787.488, 9060.1344, 5267.52, 3072.72, 1773.3984, 17 +55.84] }, E007 => { " total" => 99925.1376, C012 => [14273.28, 12292.2252, 112 +28.88, 11145.5484, 11068.3056, 7965.8496, 6281.73, 6071.808, 5841.212 +4, 5819.3352, 5671.3632, 2265.6] }, E008 => { " total" => 99959.1216, C012 => [4463.232, 3735.762, 3452. +3496, 3217.86, 2876.25, 2832, 2812.8132, 2195.3664, 1669.3932, 1087.4 +88, 1029.7152, 1022.9184, 571.71, 566.4, 552.24, 536.31, 525.9732, 49 +0.1484, 350.0352, 343.026], C036 => [14996.502, 6818.5356, 2777.13, 8 +83.23, 883.23], C044 => [6781.0824], C058 => [5970.8472], C062 => [54 +3.39, 412.9764], C068 => [8094.21, 5085.0684, 3320.52, 2884.1088, 284 +6.16, 1904.52, 952.26, 474.36] }, E009 => { " total" => 99910.0572, C016 => [36411.8736, 22882.56, 354 +6.7968], C039 => [571.71], C058 => [10519.11, 2003.64], C062 => [1321 +5.2448, 9672.342, 1086.78] }, E010 => { " total" => 99984.6096, C008 => [1133.154, 803.5092], C016 + => [34161.9912, 13821.93, 9457.11, 7274.7, 6375.3984, 5819.76, 5810. +91, 4290.48, 4261.8768], C039 => [571.71], C071 => [4651.56, 1550.52] + }, E011 => { " total" => 99964.5732, C002 => [279.66], C008 => [7624.87 +68, 4450.2048], C026 => [11102.9268, 10570.1568, 7970.2392, 3729.39], + C063 => [506.4324], C071 => [17055.72, 10316.1264, 9819.96, 4134.72, + 4134.72, 4134.72, 4134.72] }, E012 => { " total" => 99831.0444, C024 => [4854.3312, 994.74], C026 +=> [6393.24, 5860.47, 5860.47, 3729.39, 2755.3944, 2663.85, 2173.7016 +, 2131.08], C033 => [16761.7584, 4028.3784], C041 => [10822.2048], C0 +42 => [18219.2472, 1537.9884], C047 => [11044.8] }, E013 => { " total" => 99864.108, C002 => [1751.1672, 1078.992], C018 + => [23211.426, 3075.198, 1053.15], C021 => [15559.1496], C047 => [21 +905.52, 5614.44, 4141.8, 3552.744, 2282.592], C055 => [1619.55, 1619. +55, 539.85], C063 => [10392.8736, 1585.3536, 880.752] }, E014 => { " total" => 99856.5324, C002 => [27401.2992, 12540.2376, 9 +097.8, 7975.9032, 6749.4348, 6743.7, 1348.74, 472.1652], C055 => [178 +15.05, 9458.172], C060 => [254.0304] }, E015 => { " total" => 99690.7896, C002 => [4600.584, 3992.2704, 3788 +.4372, 1297.41, 909.78], C005 => [826.59], C045 => [861.4944, 861.494 +4], C059 => [16037.0496, 11652.972, 8889.8604, 6949.02, 6096.7296, 42 +12.1752, 3185.8584, 2208.96, 1104.48, 1104.48, 847.6884, 506.22], C06 +1 => [6980.3136, 5961.1476, 3811.5888, 1546.272, 1457.9136] }, E016 => { " total" => 99726.5436, C005 => [9588.444], C025 => [9081. +516, 2451.45], C037 => [6626.88, 3186], C045 => [13927.4928, 13855.70 +16, 717.912], C048 => [7948.4328, 7151.3664, 6549.8496, 5920.4376], C +066 => [6855.6348, 5865.426] }, E017 => { " total" => 99700.1352, C025 => [18737.5032, 14218.41, 735 +4.35, 6822.8544, 6595.02, 6373.77, 4902.9, 4652.976, 4106.1168, 3765. +852, 3714.876, 3432.03, 3392.8776, 3165.0432, 2288.964, 1790.532, 173 +1.06, 1731.06, 923.94] }, E018 => { " total" => 99870.9756, C011 => [12648.2076], C022 => [141 +98.232, 9324.7848, 3760.6128, 959.34], C025 => [879.336, 573.48, 490. +29, 490.29, 461.97], C043 => [23977.128, 15787.5504, 10575.5376, 1462 +.02, 555.5676], C057 => [923.94], C069 => [1383.1488, 476.13, 476.13, + 467.28] }, E019 => { " total" => 99939.5808, C011 => [21495.3048, 13817.8944, 1 +3446.6192, 12807.0828, 9052.9128, 7440.7968, 7376.652, 6991.7832, 643 +5.72, 1074.8148] }, E020 => { " total" => 99867.0108, C011 => [6392.3904, 5901.3216, 530 +2.6368, 4276.32, 4276.32, 4233.5568, 3207.24, 2681.55, 2629.9368, 252 +3.0288, 2469.0792, 2145.24, 2123.7876, 1692.2616, 1603.62, 1603.62, 1 +566.0252, 1143.42, 1072.62, 1026.3168, 571.71, 571.71, 536.31, 536.31 +, 536.31, 534.54, 534.54], C028 => [8562.4812, 6603.87, 4862.8272, 45 +71.91, 4571.91, 3047.94, 2519.6304, 2418.7404, 1015.98] }, E021 => { " total" => 99758.616, C003 => [2331.09], C009 => [759.33] +, C028 => [2158.8336, 1894.1832, 1599.7968, 1523.97, 1523.97, 1199.84 +76, 1015.98, 507.99, 483.21, 457.0848], C046 => [19876.1088, 9586.886 +4, 2633.76], C060 => [8658.2028, 6731.8056, 529.23], C067 => [1869.12 +, 467.28], C070 => [19788.6, 11496.5748, 1633.71, 576.0288, 456.0228] + }, E022 => { " total" => 99365.9592, C003 => [31858.23, 4610.0004, 1522 +.9788, 1505.4912], C010 => [10531.146, 4449.78], C017 => [14695.0356, + 7298.2056, 2465.61, 1972.488], C020 => [1331.748], C029 => [6377.097 +6], C038 => [9604.728, 1143.42] }, E023 => { " total" => 98840.9064, C009 => [10448.3808, 10068.1848, 8 +391.924, 6775.7016, 3822.9876, 3735.9036, 2851.6824, 2035.0044, 1522. +9788, 1305.4104, 727.47, 727.47, 698.3712], C020 => [17930.808, 15611 +.4, 9302.8368, 2884.392] }, E024 => { " total" => 96412.1832, C014 => [39789.6, 12931.62, 4476.3 +3, 3978.96, 2984.22], C023 => [24447.6648], C032 => [7803.7884] }, E025 => { " total" => 64669.1448, C023 => [23573.2848, 14864.46, 139 +90.08, 7869.42, 4371.9] }, }
With the machine set to 40,000, the minimum required to supply the largest specified flow of 39789.6, it requires 62:
C:\test>1179307 -MACHMAX=40000 { E001 => { " total" => 39995.6988, C015 => [24504.1632, 14837.91], C0 +56 => [548.7], C059 => [62.8704], C064 => [42.0552] }, E002 => { " total" => 39997.9644, C008 => [82.4112], C015 => [13323. +6396, 12250.6656, 6234.5772, 5720.64, 2386.0308] }, E003 => { " total" => 39983.8044, C004 => [3023.16, 1511.58], C009 = +> [58.1976], C015 => [5255.838, 4380.3252, 3468.138, 1716.192, 1501.6 +68, 1436.2488, 1430.16, 791.19, 703.4688], C025 => [75.048, 73.9152], + C054 => [5200.8264, 3073.2156], C056 => [5901.0384, 383.5944] } E004 => { " total" => 39955.4844, C012 => [350.0352], C030 => [3164. +76, 527.46], C056 => [6869.724, 4301.808, 2578.6068, 2186.8704], C064 + => [19976.22] }, E005 => { " total" => 39966.246, C001 => [22790.166, 2064.174], C012 + => [343.026], C030 => [12659.04, 2109.84] }, E006 => { " total" => 39839.3016, C001 => [1053.15, 1026.6, 1026.6, +513.3, 499.5648], C013 => [15214.92, 13190.04, 7315.1268] }, E007 => { " total" => 39896.154, C002 => [279.66], C013 => [7042.334 +4, 6690.6, 5977.29, 3874.53, 2442.6], C019 => [4471.02, 2891.2596], C +027 => [4230.3], C050 => [1996.56] }, E008 => { " total" => 39871.0908, C019 => [23934.8604], C027 => [156 +82.2], C060 => [254.0304] }, E009 => { " total" => 39918.81, C012 => [575.25], C027 => [29056.32, + 9409.32], C065 => [877.92] }, E010 => { " total" => 39863.586, C012 => [571.71], C027 => [26777.69 +28, 4062.15, 3101.04], C050 => [5350.9932] }, E011 => { " total" => 39854.4528, C027 => [25997.76], C050 => [3023. +16], C065 => [9060.1344, 1773.3984] }, E012 => { " total" => 39837.6024, C012 => [7258.9824], C027 => [2248 +2.54], C065 => [5267.52, 3072.72, 1755.84] }, E013 => { " total" => 39901.3932, C012 => [14273.28, 3735.762], C027 + => [21892.3512] }, E014 => { " total" => 39938.988, C027 => [21151.5], C065 => [18787.4 +88] }, E015 => { " total" => 39664.638, C012 => [12292.2252, 6281.73], C027 + => [21090.6828] }, E016 => { " total" => 39698.7636, C012 => [566.4], C027 => [19602.75 +], C050 => [19529.6136] }, E017 => { " total" => 39976.7244, C012 => [11228.88, 11145.5484, 110 +68.3056, 6071.808, 462.1824] }, E018 => { " total" => 39859.692, C012 => [7965.8496, 5841.2124, 5819 +.3352, 5671.3632, 4463.232, 3452.3496, 3217.86, 2876.25, 552.24] }, E019 => { " total" => 39602.9004, C012 => [2832, 2812.8132, 2265.6, +2195.3664, 1669.3932, 1087.488, 1029.7152, 1022.9184, 536.31, 525.973 +2, 490.1484], C036 => [14996.502, 883.23], C044 => [6781.0824], C068 +=> [474.36] }, E020 => { " total" => 39612.5292, C036 => [6818.5356, 2777.13, 883.2 +3], C058 => [2003.64], C062 => [1086.78, 543.39, 412.9764], C068 => [ +8094.21, 5085.0684, 3320.52, 2884.1088, 2846.16, 1904.52, 952.26] }, E021 => { " total" => 39949.254, C039 => [571.71], C058 => [10519.11 +, 5970.8472], C062 => [13215.2448, 9672.342] }, E022 => { " total" => 39958.6704, C016 => [36411.8736, 3546.7968] }, E023 => { " total" => 39981.7512, C016 => [34161.9912, 5819.76] }, E024 => { " total" => 39959.874, C008 => [1133.154], C016 => [22882. +56, 13821.93], C039 => [571.71], C071 => [1550.52] }, E025 => { " total" => 39775.1568, C008 => [803.5092], C016 => [9457. +11, 7274.7, 6375.3984, 5810.91, 4290.48, 4261.8768], C024 => [994.74] +, C063 => [506.4324] }, E026 => { " total" => 39947.2008, C026 => [2755.3944], C071 => [1705 +5.72, 10316.1264, 9819.96] }, E027 => { " total" => 39658.7616, C008 => [7624.8768, 4450.2048], C0 +26 => [6393.24], C071 => [4651.56, 4134.72, 4134.72, 4134.72, 4134.72 +] }, E028 => { " total" => 39773.0328, C026 => [11102.9268, 10570.1568, 7 +970.2392, 5860.47, 3729.39], C055 => [539.85] }, E029 => { " total" => 39767.3688, C026 => [5860.47, 3729.39, 2663.85 +, 2173.7016, 2131.08], C033 => [16761.7584, 4028.3784], C042 => [1537 +.9884], C063 => [880.752] }, E030 => { " total" => 39982.3884, C002 => [472.1652], C024 => [4854. +3312], C041 => [10822.2048], C042 => [18219.2472], C047 => [5614.44] +}, E031 => { " total" => 39747.2616, C021 => [15559.1496], C047 => [219 +05.52, 2282.592] }, E032 => { " total" => 39836.1864, C002 => [1751.1672], C018 => [3075 +.198, 1053.15], C047 => [11044.8, 4141.8, 3552.744], C055 => [1619.55 +, 1619.55], C063 => [10392.8736, 1585.3536] }, E033 => { " total" => 39925.2528, C002 => [6749.4348], C018 => [2321 +1.426], C055 => [9458.172], C059 => [506.22] }, E034 => { " total" => 39943.3776, C002 => [12540.2376, 9097.8], C025 + => [490.29], C055 => [17815.05] }, E035 => { " total" => 39977.7864, C002 => [27401.2992, 7975.9032, 46 +00.584] }, E036 => { " total" => 39982.0344, C002 => [6743.7, 3992.2704, 3788.4 +372, 1348.74, 1297.41, 1078.992, 909.78], C025 => [573.48], C059 => [ +16037.0496, 4212.1752] }, E037 => { " total" => 39831.0888, C059 => [11652.972, 8889.8604, 694 +9.02, 6096.7296, 3185.8584, 2208.96, 847.6884] }, E038 => { " total" => 39869.604, C005 => [9588.444, 826.59], C037 => + [6626.88], C045 => [861.4944], C059 => [1104.48, 1104.48], C061 => [ +6980.3136, 5961.1476, 3811.5888, 1546.272, 1457.9136] }, E039 => { " total" => 39681.4176, C025 => [490.29], C037 => [3186], +C045 => [861.4944, 717.912], C048 => [7948.4328, 7151.3664, 6549.8496 +, 5920.4376], C066 => [6855.6348] }, E040 => { " total" => 39937.4304, C025 => [4902.9, 923.94, 461.97], +C045 => [13927.4928, 13855.7016], C066 => [5865.426] }, E041 => { " total" => 39778.7676, C025 => [18737.5032, 14218.41, 682 +2.8544] }, E042 => { " total" => 39954.2808, C025 => [9081.516, 7354.35, 6595.0 +2, 6373.77, 4652.976, 4106.1168, 1790.532] }, E043 => { " total" => 39603.9624, C022 => [9324.7848], C025 => [3765 +.852, 3714.876, 3432.03, 3392.8776, 3165.0432, 2451.45, 2288.964, 173 +1.06, 1731.06, 879.336], C057 => [923.94], C069 => [1383.1488, 476.13 +, 476.13, 467.28] }, E044 => { " total" => 39930.5628, C011 => [3207.24], C022 => [14198. +232, 3760.6128, 959.34], C043 => [15787.5504, 1462.02, 555.5676] }, E045 => { " total" => 39855.3024, C011 => [5302.6368], C043 => [2397 +7.128, 10575.5376] }, E046 => { " total" => 39589.5192, C011 => [21495.3048, 13817.8944, 4 +276.32] }, E047 => { " total" => 39976.7244, C011 => [13446.6192, 12807.0828, 1 +2648.2076, 1074.8148] }, E048 => { " total" => 39979.4148, C011 => [9052.9128, 7440.7968, 737 +6.652, 6991.7832, 6435.72, 2681.55] }, E049 => { " total" => 39731.898, C011 => [6392.3904, 5901.3216, 4276 +.32, 4233.5568, 2629.9368, 2523.0288, 2469.0792, 2145.24, 2123.7876, +1692.2616, 1603.62, 1603.62, 1566.0252, 571.71] }, E050 => { " total" => 39912.8628, C011 => [1143.42, 1072.62, 1026.31 +68, 571.71, 536.31, 536.31, 536.31, 534.54, 534.54], C028 => [8562.48 +12, 6603.87, 4862.8272, 4571.91, 4571.91, 3047.94, 1199.8476] }, E051 => { " total" => 39642.4776, C028 => [2519.6304, 2418.7404, 215 +8.8336, 1894.1832, 1599.7968, 1523.97, 1523.97, 1015.98, 1015.98, 507 +.99, 483.21, 457.0848], C046 => [2633.76], C060 => [8658.2028, 6731.8 +056, 529.23], C067 => [1869.12, 467.28], C070 => [1633.71] }, E052 => { " total" => 39718.446, C003 => [4610.0004, 2331.09, 1522.9 +788], C009 => [759.33], C046 => [19876.1088, 9586.8864], C070 => [576 +.0288, 456.0228] }, E053 => { " total" => 39715.614, C003 => [1505.4912], C010 => [4449. +78], C020 => [1331.748], C038 => [1143.42], C070 => [19788.6, 11496.5 +748] }, E054 => { " total" => 39758.3064, C003 => [31858.23], C009 => [1522. +9788], C029 => [6377.0976] }, E055 => { " total" => 39996.4776, C009 => [727.47], C010 => [10531.1 +46], C017 => [14695.0356, 2465.61, 1972.488], C038 => [9604.728] }, E056 => { " total" => 39451.2468, C009 => [2035.0044], C017 => [7298 +.2056], C020 => [17930.808, 9302.8368, 2884.392] }, E057 => { " total" => 39950.9532, C009 => [10448.3808, 10068.1848, 3 +822.9876], C020 => [15611.4] }, E058 => { " total" => 37418.0832, C009 => [8391.924, 6775.7016, 3735 +.9036, 2851.6824, 1305.4104, 727.47, 698.3712], C014 => [12931.62] }, E059 => { " total" => 39789.6, C014 => [39789.6] }, E060 => { " total" => 38479.6584, C014 => [4476.33, 3978.96, 2984.22 +], C023 => [14864.46, 4371.9], C032 => [7803.7884] }, E061 => { " total" => 38437.7448, C023 => [24447.6648, 13990.08] }, E062 => { " total" => 31442.7048, C023 => [23573.2848, 7869.42] }, }

Each run requires a couple of seconds and would take no more if you have a different capacity for each machine; but you would have to supply them.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^7: Tricky chemicals optimization problem
by Anonymous Monk on Jan 11, 2017 at 08:40 UTC
    This is awesome .. I had no idea how to get started on building such an algo in perl. Thankyou so much for your help... I think you nailed the problem as far as I can see. To answer some of your questions:

    Right now there is a capacity set at 82,080 for each machine ( this is a estimation we are sticking with for now).

    There are a limit of nozzles per machine would be 25 - thats a great question I should have thought to put that earlier.

    My next questions are how can I download and learn from the code you have made to do this? Was it done in perl? Super excited to take a look. I will have to build a loop around what youve done so I can do it iteravely for a six month period ( day by day), but I think I can handle that. I'll definitely be making a large donation =)

      Here you go:

      #! perl -slw use strict; use List::Util qw[ sum ]; use Data::Dump qw[ pp ]; $Data::Dump::WIDTH = 1000; my %chemsAndFlows; while( <DATA> ) { my( $chem, $mach, $flow ) = split ' '; next if $flow == 0; push @{ $chemsAndFlows{ $chem } }, $flow; } @$_ = sort{ $a <=> $b } @$_ for values %chemsAndFlows; #pp \%chemsAndF +lows; ## Greedy; our $MACHMAX //= 11000; my( $iMach, %machsAssigned ) = 0; while( keys %chemsAndFlows ) { my( $machTotal, $mach ) = ( 0, sprintf "E%03d", ++$iMach); for my $chem ( keys %chemsAndFlows ) { for my $iFlow ( reverse 0 .. $#{ $chemsAndFlows{ $chem } } ) { my $flow = $chemsAndFlows{ $chem }[ $iFlow ]; die "MACHMAX too small for $chem:$flow" unless $flow < $MA +CHMAX; if( ( $machTotal + $flow ) <= $MACHMAX ) { $machTotal += $flow; push @{ $machsAssigned{ $mach }{ $chem } }, $flow; splice @{ $chemsAndFlows{ $chem } }, $iFlow, 1; delete $chemsAndFlows{ $chem } unless @{ $chemsAndFlow +s{ $chem } }; } } } } $_->{ ' total' } = sum( map @$_, values %$_ )for values %machsAssigned +; pp \%machsAssigned; #1st column is unique chemical identifier 2nd column is unique machine + identifier 3rd column is processing seconds __DATA__

      Append your posted data at the end after the __DATA__ line.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
      In the absence of evidence, opinion is indistinguishable from prejudice.
      p
        This works really awesome..... some of the code a bit over my head so I'm trying to break it down and understand all the pieces. Couple questions:

        1) the 'our' declaration - I read about the definition and usage but still don't really understand why you use it here instead of ''my'?

        2) to make sure I understood your code and the process, I set out to solve the problem if we want to minimize the number of nozzles per machine rather than minimize the number of machines. In other words we would want to minimize the average chemical per machine. How would you alter your code above to accomplish this?

        3) I get a bit lost when you get to the 'splice' and 'delete' lines of your code... I follow that you want to use splice on the HoHoA because after you assign the flow you want to remove it from consideration...but what is the delete part serving to do?

        4) do you have a good book recommendation or online exercises recommendation on these types of dynamic programming? The only language I know (barely) is perl...

        thanks again for your help... it's made huge difference in my learning!