I cannot figure out why this problem is unbounded? Do I Need to add another constraint for one of the decision variables? I don't know which one isn't constrained right. Is it the bank variable being unbounded? That is my most likely guess. Any suggestions on why the objective function are not being solved and saying unbounded.
# AMPL code for "Titan Enterprise" problem
reset;
#set-up options
option solver cplex;
option cplex_options 'sensitivity';
# PARAMETERES and SETS
set year;
# Decision variables for all 5 projects with respect to returns
var A >= 0; # project A
var B >= 0; # project B
var C >= 0; # project C
var D >= 0; # project D
var E >= 0; # project E
var Bank{year} >= 0; # project years
# objective function
minimize risk: (B - B * .12) + (1.75*D - D * .20) + (1.4*E - E * .05) + 1.06*Bank[3];
maximize cash: B + 1.75*D + 1.4*E + 1.06*Bank[3];
# PROBLEMS
problem maxCash: cash, A, B, C, D, E, Bank[1], Bank[2], Bank[3];
problem minRisk: risk, A, B, C, D, E, Bank[1], Bank[2], Bank[3];
# constraints
subject to project_A: A <= 500000;
subject to project_B: B <= 500000;
subject to project_E: E <= 750000;
subject to year_1: A + B + C + D + E + Bank[1] <= 1000000;
subject to year2: B + Bank[2] <= 1.06*Bank[1] + 0.3*A + 1.1*C;
# The amount for investment for year 2 is from earnings of this year.
subject to year3: E + Bank[3] <= 1.06*Bank[2] + A + 0.3*B; # The amount of investment for
year 3 is from the earnings of this year.
data;
set year := 1 2 3 4;
printf "\n\EPSILON-CONSTRAINT METHOD ---------------------------------------------\n";
#get upper and lower bounds for objectives
param upperRisk;
param lowerRisk;
# in this example, put Cash as the objective function and use epsilon contstraints on the risk
# Let's get the lower and upper bounds for labor values by solving the independent problems
solve minRisk;
let lowerRisk:=risk;
solve maxCash;
let upperRisk:=risk;
param epsilon;
let epsilon := lowerRisk;
display upperRisk, lowerRisk, risk, cash;
s.t. epsilonRisk: (B - B * .12) + (1.75*D - D * .20) + (1.4*E - E * .05) + 1.06*Bank[3] <=
epsilon;
problem epsConst: cash, B, D, E, Bank[3], epsilonRisk;
param steps = 20;
printf "\n\nMultiple values for EPSILON-CONSTRAINT --------------------------------------- \n";
for {eps in 0..steps} {
let epsilon := lowerRisk + eps*(upperRisk - lowerRisk)/(steps+1);
solve epsConst;
display A, B, C, D, E, Bank[1], Bank[2], Bank[3], epsilon, cash, risk;
printf "%d, %7.4f, %7.4f, %7.4f\n", eps, epsilon, cash, risk >
"C:\Users\drewm\OneDrive\Documents\Advanced Data Analytics\hw4\HW4_iv_results.txt"};