Question: after i fixed my code with semicolon , it is not solved with following error. < > or1_2.mod, line 12 (offset 306): syntax error context:

after i fixed my code with semicolon , it is not solved with following error.

<>

or1_2.mod, line 12 (offset 306): syntax error context: minimize total_profit : sum{i in >>> 1..3}[ <<< (x[i]*C1[i] + x[3+i]*C2[i] + Ic[i]*I[i] + Ic[3+i]*I[3+i])]; ampl: include or1_2.mod; MINOS 5.51: optimal solution found. 2 iterations, objective 1280 total_profit = 1280

reset; param C1{1..3}; #operation 1 production cost param C2{1..3}; #operation 2 production cost param Ic{1..6}; # var I{1..6}>=0; # var x{1..6}>=0; # # x[1,2,3] operation1 each month # x[4,5,6] operation2 each month

minimize total_profit : sum{i in 1..3}(x[i]*C1[i] + x[3+i]*C2[i] + Ic[i]*I[i] + Ic[3+i]*I[3+i]); # = +

subject to Process_1 : x[1] + I[1] = x[4] + I[2]; Process_2 : x[4] + I[4] = I[5] + 500; Process_3 : x[2] + I[2] = x[5] + I[3]; Process_4 : x[5] + I[5] = I[6] + 450; Process_5 : x[3] + I[3] = x[6]; Process_6 : x[6] + I[6] = 600; Process_7 : x[1]*0.6 <= 800; Process_8 : x[2]*0.6 <= 700; Process_9 : x[3]*0.6 <= 550; Process_10 : x[4]*0.8 <= 1000; Process_11 : x[5]*0.8 <= 850; Process_12 : x[6]*0.8 <= 700;

#data data; param C1:= 1 10 2 12 3 11; param C2:= 1 15 2 18 3 16; param Ic:= 1 0.2 2 0.2 3 0.2 4 0.4 5 0.4 6 0.4; #run solve; display total_profit;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!