/* Data Envelopment Analysis (DEA) model in Picat. Model from the GLPK examples dea.mod """ Data Envelopment Analysis (DEA) DEA quantifies the relative efficiency of decision making units (DMUs) by finding the efficient frontier in multiple input multiple output data. The inputs are resources (eg. number of employees, available machines, ...), the outputs are productive outputs (eg. contracts made, total sales, ...). The method is non-parametric. More details are available in the paper below. Models according to: Seiford, Threall, "Recent developments in DEA", 1990. Implementation: Sebastian Nowozin """ This Picat model was created by Hakan Kjellerstrand, hakank@gmail.com See also my Picat page: http://www.hakank.org/picat/ */ import mip. main => go. go => input_data(InputData), output_data(OutputData), Dmus = 69, Inputs = 4, Outputs = 2, Theta = new_list(Dmus), % Theta :: 0.0..1.0, Lambda = new_array(Dmus,Dmus), % Lambda :: 0.0..1.0, Z #= sum(Theta), foreach(Td in 1..Dmus) Theta[Td] #>= 0.0 end, foreach(I in 1..Dmus, J in 1..Dmus) Lambda[I,J] #>= 0.0 end, foreach(O in 1..Outputs, Td in 1..Dmus) sum([Lambda[D,Td]*OutputData[D,O] : D in 1..Dmus]) #>= OutputData[Td,O] end, foreach(I in 1..Inputs, Td in 1..Dmus) sum([Lambda[D,Td]*InputData[D,I] : D in 1..Dmus]) #<= Theta[Td]*InputData[Td,I] end, foreach(Td in 1..Dmus) sum([Lambda[D,Td] : D in 1..Dmus]) #= 1.0 end, % possibilities: % % i) (no constraint) % % % ii) % foreach(Td in 1..Dmus) % sum([Lambda[D,Td] : D in 1..Dmus]) #<= 1.0 % end, % % % iii) % foreach(Td in 1..Dmus) % sum([Lambda[D,Td] : D in 1..Dmus]) #>= 1.0 % end, solve($[min(Z)], Theta ++ Lambda), println(z=Z), foreach({I,Td} in zip(1..Dmus,Theta)) println([I,Td]) end, % println(theta=Theta), % println(lambda=Lambda), nl. % AvgInventory LaborCost OperatingCost Population := input_data(InputData) => InputData = [ [8000.00, 17030.00, 1280.00, 1410.00], [9000.00, 25890.00, 2779.00, 1523.00], [13694.00, 29076.00, 2372.00, 1354.00], [4250.00, 17506.00, 1385.00, 822.00], [6500.00, 23208.00, 639.00, 746.00], [7000.00, 12946.00, 802.00, 1281.00], [4500.00, 18001.00, 1130.00, 1016.00], [5000.00, 14473.00, 1097.00, 1070.00], [27000.00, 31760.00, 5559.00, 1694.00], [21560.00, 50972.00, 15010.00, 1910.00], [15000.00, 39523.00, 4799.00, 1745.00], [8500.00, 13076.00, 3489.00, 1353.00], [35000.00, 35427.00, 1704.00, 500.00], [18000.00, 27554.00, 2882.00, 1016.00], [59750.00, 53848.00, 14208.00, 2500.00], [19200.00, 38253.00, 1480.00, 2293.00], [40000.00, 109404.00, 83016.00, 2718.00], [8466.00, 18198.00, 1278.00, 2877.00], [16000.00, 40891.00, 7599.00, 4150.00], [10000.00, 45444.00, 5556.00, 4421.00], [25000.00, 35623.00, 2121.00, 3883.00], [14000.00, 20192.00, 5515.00, 3519.00], [12500.00, 34973.00, 10475.00, 32366.00], [17260.00, 32284.00, 14498.00, 3393.00], [7000.00, 17920.00, 7585.00, 4489.00], [14000.00, 42094.00, 3742.00, 2217.00], [16400.00, 35422.00, 14236.00, 4641.00], [13000.00, 19100.00, 3529.00, 5968.00], [30000.00, 72167.00, 8656.00, 8715.00], [12530.00, 19970.00, 1714.00, 5968.00], [31500.00, 39183.00, 4919.00, 5607.00], [10000.00, 32048.00, 3483.00, 7324.00], [22000.00, 68877.00, 12279.00, 8685.00], [10000.00, 29812.00, 3332.00, 8685.00], [16000.00, 47686.00, 2507.00, 5420.00], [10000.00, 33415.00, 4738.00, 7703.00], [9000.00, 12359.00, 4603.00, 4665.00], [16439.00, 23614.00, 2989.00, 6317.00], [14500.00, 36069.00, 1793.00, 31839.00], [39000.00, 76307.00, 9539.00, 15619.00], [24927.00, 40706.00, 12661.00, 30213.00], [13858.00, 39267.00, 4609.00, 34719.00], [33375.00, 29509.00, 11323.00, 31839.00], [29044.00, 44482.00, 5542.00, 34719.00], [32257.00, 61365.00, 20550.00, 32366.00], [8800.00, 49671.00, 3306.00, 43561.00], [47000.00, 40425.00, 10396.00, 31263.00], [12000.00, 33034.00, 4915.00, 31263.00], [28000.00, 69163.00, 4688.00, 15173.00], [13300.00, 28931.00, 16735.00, 73064.00], [13500.00, 29758.00, 4260.00, 62309.00], [24000.00, 40927.00, 8285.00, 23166.00], [16000.00, 40403.00, 2131.00, 99836.00], [17000.00, 38730.00, 2539.00, 60348.00], [25000.00, 35978.00, 2502.00, 99836.00], [16000.00, 37509.00, 6278.00, 99836.00], [20000.00, 46950.00, 10715.00, 85925.00], [14000.00, 35966.00, 3144.00, 85925.00], [22000.00, 68318.00, 8015.00, 108987.00], [21879.00, 69537.00, 7778.00, 108987.00], [15000.00, 25425.00, 2812.00, 201404.00], [10000.00, 19508.00, 2454.00, 201404.00], [20000.00, 28191.00, 3367.00, 201404.00], [18000.00, 37073.00, 8624.00, 108987.00], [19051.00, 23763.00, 3496.00, 201404.00], [15000.00, 28642.00, 3366.00, 201404.00], [10000.00, 35919.00, 3868.00, 201404.00], [24000.00, 54653.00, 26494.00, 108987.00], [1800.00, 6276.00, 3413.00, 60348.00] ]. %, default, 0.0 output_data(OutputData) => OutputData = [ [12293.00, 61.00], [18400.00, 92.00], [16789.00, 92.65], [10700.00, 45.00], [9800.00, 50.00], [6500.00, 29.00], [8200.00, 56.00], [8680.00, 45.00], [33800.00, 183.00], [23710.00, 156.00], [24000.00, 120.00], [17500.00, 75.00], [25000.00, 130.00], [26000.00, 122.00], [26830.00, 178.513], [16600.00, 106.00], [90000.00, 450.00], [11140.00, 73.624], [25868.00, 136.00], [32700.00, 191.295], [29117.00, 152.864], [18000.00, 100.00], [11100.00, 60.00], [23030.00, 137.778], [10656.00, 58.00], [24682.00, 152.095], [26908.00, 120.00], [16464.00, 80.00], [57000.00, 321.00], [17532.00, 94.747], [30035.00, 168.00], [16000.00, 100.00], [63700.00, 277.00], [18000.00, 90.00], [27339.00, 139.134], [19500.00, 116.00], [13000.00, 80.00], [15370.00, 102.00], [18446.00, 90.00], [56000.00, 260.00], [73845.00, 364.951], [28600.00, 145.00], [27000.00, 243.00], [52423.00, 279.816], [73759.00, 363.388], [20500.00, 80.00], [27100.00, 115.00], [15000.00, 110.00], [50895.00, 277.852], [19707.00, 128.00], [17994.00, 78.80], [36135.00, 167.222], [30000.00, 153.00], [26195.00, 125.00], [28000.00, 216.00], [24658.00, 152.551], [36850.00, 190.00], [29250.00, 183.69], [50000.00, 250.00], [40078.00, 265.443], [20200.00, 110.00], [12500.00, 75.00], [30890.00, 195.00], [31000.00, 175.00], [31277.00, 192.992], [11500.00, 75.00], [30000.00, 175.668], [38383.00, 190.00], [2075.00, 8.650] ].