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.

222 lines
4.8 KiB

3 months ago
  1. /* Data Envelopment Analysis (DEA)
  2. *
  3. * DEA quantifies the relative efficiency of decision making units (DMUs) by
  4. * finding the efficient frontier in multiple input multiple output data. The
  5. * inputs are resources (eg. number of employees, available machines, ...),
  6. * the outputs are productive outputs (eg. contracts made, total sales, ...).
  7. * The method is non-parametric. More details are available in the paper
  8. * below.
  9. *
  10. * Models according to: Seiford, Threall, "Recent developments in DEA", 1990.
  11. *
  12. * Implementation: Sebastian Nowozin <nowozin@gmail.com>
  13. */
  14. ### SETS ###
  15. set dmus; # Decision Making Units (DMU)
  16. set inputs; # Input parameters
  17. set outputs; # Output parameters
  18. ### PARAMETERS ###
  19. param input_data{dmus,inputs} >= 0;
  20. param output_data{dmus,outputs} >= 0;
  21. ### PROGRAM ###
  22. var theta{dmus} >= 0;
  23. var lambda{dmus,dmus} >= 0;
  24. minimize inefficiency: sum{td in dmus} theta[td];
  25. s.t. output_lower_limit{o in outputs, td in dmus}:
  26. sum{d in dmus} lambda[d,td]*output_data[d,o] >= output_data[td,o];
  27. s.t. input_upper_limit{i in inputs, td in dmus}:
  28. sum{d in dmus} lambda[d,td]*input_data[d,i] <= theta[td]*input_data[td,i];
  29. s.t. PI1{td in dmus}:
  30. sum{d in dmus} lambda[d,td] = 1;
  31. /*
  32. possibilities:
  33. i) (no constraint)
  34. ii) s.t. PI1{td in dmus}:
  35. sum{d in dmus} lambda[d,td] <= 1;
  36. iii) s.t. PI1{td in dmus}:
  37. sum{d in dmus} lambda[d,td] >= 1;
  38. */
  39. ### SOLVE AND PRINT SOLUTION ###
  40. solve;
  41. printf "DMU\tEfficiency\n";
  42. for {td in dmus} {
  43. printf "%s\t%1.4f\n", td, theta[td];
  44. }
  45. ### DATA ###
  46. data;
  47. set dmus := 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
  48. 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
  49. 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
  50. 61 62 63 64 65 66 67 68 69 ;
  51. set inputs := AvgInventory LaborCost OperatingCost Population ;
  52. set outputs := PrescrVol kDollarValue ;
  53. param input_data default 0.0 :
  54. AvgInventory LaborCost OperatingCost Population :=
  55. 1 8000 17030 1280 1410
  56. 2 9000 25890 2779 1523
  57. 3 13694 29076 2372 1354
  58. 4 4250 17506 1385 822
  59. 5 6500 23208 639 746
  60. 6 7000 12946 802 1281
  61. 7 4500 18001 1130 1016
  62. 8 5000 14473 1097 1070
  63. 9 27000 31760 5559 1694
  64. 10 21560 50972 15010 1910
  65. 11 15000 39523 4799 1745
  66. 12 8500 13076 3489 1353
  67. 13 35000 35427 1704 500
  68. 14 18000 27554 2882 1016
  69. 15 59750 53848 14208 2500
  70. 16 19200 38253 1480 2293
  71. 17 40000 109404 83016 2718
  72. 18 8466 18198 1278 2877
  73. 19 16000 40891 7599 4150
  74. 20 10000 45444 5556 4421
  75. 21 25000 35623 2121 3883
  76. 22 14000 20192 5515 3519
  77. 23 12500 34973 10475 32366
  78. 24 17260 32284 14498 3393
  79. 25 7000 17920 7585 4489
  80. 26 14000 42094 3742 2217
  81. 27 16400 35422 14236 4641
  82. 28 13000 19100 3529 5968
  83. 29 30000 72167 8656 8715
  84. 30 12530 19970 1714 5968
  85. 31 31500 39183 4919 5607
  86. 32 10000 32048 3483 7324
  87. 33 22000 68877 12279 8685
  88. 34 10000 29812 3332 8685
  89. 35 16000 47686 2507 5420
  90. 36 10000 33415 4738 7703
  91. 37 9000 12359 4603 4665
  92. 38 16439 23614 2989 6317
  93. 39 14500 36069 1793 31839
  94. 40 39000 76307 9539 15619
  95. 41 24927 40706 12661 30213
  96. 42 13858 39267 4609 34719
  97. 43 33375 29509 11323 31839
  98. 44 29044 44482 5542 34719
  99. 45 32257 61365 20550 32366
  100. 46 8800 49671 3306 43561
  101. 47 47000 40425 10396 31263
  102. 48 12000 33034 4915 31263
  103. 49 28000 69163 4688 15173
  104. 50 13300 28931 16735 73064
  105. 51 13500 29758 4260 62309
  106. 52 24000 40927 8285 23166
  107. 53 16000 40403 2131 99836
  108. 54 17000 38730 2539 60348
  109. 55 25000 35978 2502 99836
  110. 56 16000 37509 6278 99836
  111. 57 20000 46950 10715 85925
  112. 58 14000 35966 3144 85925
  113. 59 22000 68318 8015 108987
  114. 60 21879 69537 7778 108987
  115. 61 15000 25425 2812 201404
  116. 62 10000 19508 2454 201404
  117. 63 20000 28191 3367 201404
  118. 64 18000 37073 8624 108987
  119. 65 19051 23763 3496 201404
  120. 66 15000 28642 3366 201404
  121. 67 10000 35919 3868 201404
  122. 68 24000 54653 26494 108987
  123. 69 1800 6276 3413 60348
  124. ;
  125. param output_data default 0.0 :
  126. PrescrVol kDollarValue :=
  127. 1 12293 61.00
  128. 2 18400 92.00
  129. 3 16789 92.65
  130. 4 10700 45.00
  131. 5 9800 50.00
  132. 6 6500 29.00
  133. 7 8200 56.00
  134. 8 8680 45.00
  135. 9 33800 183.00
  136. 10 23710 156.00
  137. 11 24000 120.00
  138. 12 17500 75.00
  139. 13 25000 130.00
  140. 14 26000 122.00
  141. 15 26830 178.513
  142. 16 16600 106.00
  143. 17 90000 450.00
  144. 18 11140 73.624
  145. 19 25868 136.00
  146. 20 32700 191.295
  147. 21 29117 152.864
  148. 22 18000 100.00
  149. 23 11100 60.00
  150. 24 23030 137.778
  151. 25 10656 58.00
  152. 26 24682 152.095
  153. 27 26908 120.00
  154. 28 16464 80.00
  155. 29 57000 321.00
  156. 30 17532 94.747
  157. 31 30035 168.00
  158. 32 16000 100.00
  159. 33 63700 277.00
  160. 34 18000 90.00
  161. 35 27339 139.134
  162. 36 19500 116.00
  163. 37 13000 80.00
  164. 38 15370 102.00
  165. 39 18446 90.00
  166. 40 56000 260.00
  167. 41 73845 364.951
  168. 42 28600 145.00
  169. 43 27000 243.00
  170. 44 52423 279.816
  171. 45 73759 363.388
  172. 46 20500 80.00
  173. 47 27100 115.00
  174. 48 15000 110.00
  175. 49 50895 277.852
  176. 50 19707 128.00
  177. 51 17994 78.80
  178. 52 36135 167.222
  179. 53 30000 153.00
  180. 54 26195 125.00
  181. 55 28000 216.00
  182. 56 24658 152.551
  183. 57 36850 190.00
  184. 58 29250 183.69
  185. 59 50000 250.00
  186. 60 40078 265.443
  187. 61 20200 110.00
  188. 62 12500 75.00
  189. 63 30890 195.00
  190. 64 31000 175.00
  191. 65 31277 192.992
  192. 66 11500 75.00
  193. 67 30000 175.668
  194. 68 38383 190.00
  195. 69 2075 8.650
  196. ;
  197. end;