! Project Selection Model in LINGO.						
  Many large firms have a yearly capital budgeting process for deciding	
which projects to initiate each year.  This model is perhaps the simplest	
one to start with in doing this process.  Each project is characterized by	
just two numbers:  a) the initial cost,  and b) the net present value(NPV)	
of both the initial cost and all future cash flows associated with the	
project.  For various reasons,  e.g., borrowing agreements with its	
banks,  the firm has a constraint on how much can be invested this	
year.  An additional detail in this model is that the projects are	
partitioned into a number of sectors or departments.  There is an additional
budget constraint for each sector.  The purpose of this constraint might
be to	enforce diversification in its projects so that
"not all the eggs are in one basket".							
!     Keywords: capital budgeting, project selection, portfolio selection;						
SETS:
 sector: budgets, invests, npvs;
 project: CostInit, NPV, insector, z;
 sxp( sector, project);
ENDSETS
DATA: budgetall = 995; sector, budgets = Telecom 125 StorageDev 275 Processors 150 Software 265 ProjXanadu 95 ScmUpgrade 56 BioEng 110 ; insector project CostInit NPV = 1 T01 58.061 1297.967 1 T02 4.490 28.402 1 T03 4.694 11.963 1 T04 3.659 31.993 1 T05 2.408 253.973 1 T06 62.449 293.118 1 T07 7.912 60.517 1 T08 8.014 60.769 1 T09 30.510 1568.305 1 T10 1.512 1.866 2 S01 22.132 715.384 2 S02 12.128 -231.668 2 S03 14.433 15.598 2 S04 26.034 326.355 2 S05 10.772 1064.016 2 S06 12.416 235.212 2 S07 13.817 14.402 2 S08 37.509 1322.074 2 S09 8.216 258.255 2 S10 12.071 193.213 2 S11 7.390 199.755 2 S12 4.226 441.368 2 S13 82.749 493.065 2 S14 6.637 294.389 2 S15 18.048 9.867 2 S16 56.167 112.282 2 S17 9.402 4.517 2 S18 26.658 -46.993 2 S19 49.315 879.116 2 S20 62.441 -37.169 3 P01 0.884 4.427 3 P02 13.605 -192.925 3 P03 77.753 845.868 3 P04 8.322 458.337 3 P05 5.549 21.757 3 P06 10.118 497.286 3 P07 26.054 282.725 3 P08 5.844 144.539 3 P09 2.041 92.281 3 P10 7.551 113.852 3 P11 14.462 594.122 3 P12 0.493 352.952 3 P13 25.761 122.266 3 P14 2.041 147.420 3 P15 5.467 25.115 3 P16 3.308 59.420 3 P17 54.537 189.190 4 SFA 2.077 51.721 4 SFB 8.179 69.135 4 SFC 6.247 255.384 4 SFD 5.876 -2.748 4 SFE 8.244 116.322 4 SFF 1.234 105.742 4 SFG 1.762 54.430 4 SFH 3.561 72.710 4 SFI 151.125 1779.601 4 SFJ 11.410 160.371 4 SFK 30.988 300.916 4 SFL 5.706 149.407 4 SFM 3.805 390.987 4 SFN 97.795 2552.557 4 SFO 1.248 483.741 4 SFP 6.113 90.506 4 SFQ 6.796 62.080 4 SFR 0.000 21.703 4 SFS 2.374 34.604 4 SFT 8.534 -0.734 4 SFU 8.310 8.715 4 SFV 7.171 16.856 5 X01 8.354 265.987 5 X02 4.407 89.480 5 X03 3.872 51.198 5 X04 4.865 20.534 5 X05 5.548 4.357 5 X06 28.367 3.128 5 X07 1.359 417.070 5 X08 9.592 34.341 5 X09 7.740 87.943 5 X10 5.734 31.076 5 X11 5.779 31.492 5 X12 27.726 87.396 5 X13 5.426 235.560 5 X14 6.425 589.464 5 X15 2.789 264.163 5 X16 7.824 151.027 5 X17 6.290 37.140 6 SCMA 4.379 149.022 6 SCMB 1.973 151.199 6 SCMC 8.435 198.997 6 SCMD 10.870 25.107 6 SCME 4.102 95.469 6 SCMF 6.803 222.574 6 SCMG 18.367 453.727 6 SCMH 2.041 112.069 6 SCMI 3.878 300.836 6 SCMJ 3.061 94.230 6 SCMK 3.265 18.567 7 Proj01 3.510 46.988 7 Proj02 5.670 9.878 7 Proj03 23.380 591.363 7 Proj04 54.080 1170.593 7 Proj05 14.700 349.808 7 Proj06 6.570 820.784 7 Proj07 2.100 94.075 7 Proj08 2.890 44.401 7 Proj09 1.480 26.646 7 Proj10 5.760 70.395 7 Proj11 15.010 217.027 7 Proj12 2.630 85.436 7 Proj13 9.250 489.851 7 Proj14 5.330 62.160 7 Proj15 3.150 112.597 7 Proj16 18.180 390.352 ; ENDDATA ! Variables: z(j) = 1 if we choose project j; !Maximize NPV of selected projects; MAX = npvtot; npvtot = @SUM( project(j): npv(j)* z(j)); ! The z(j) are binary, i.e., 0 or 1 variables; @FOR( project(j): @BIN( z( j))); ! Compute spend and npv for each sector; @FOR( sector( i): invests(i) = @SUM( project(j) | insector(j) #eq# i: CostInit(j)*z(j)); npvs(i) = @SUM( project(j) | insector(j) #eq# i: npv(j)*z(j)); ! Must be within the sector budget; invests(i) <= budgets(i); ); ! Total investment <= total budget; @SUM( project( j): CostInit(j)*z(j)) <= budgetall;