Question: Im trying to integrate mathematical modelformulation into lingo but im getting syntax errors what are my mistakes and how can i correct them. Please provide

Im trying to integrate mathematical modelformulation into lingo but im getting syntax errors what are my mistakes and how can i correct them. Please provide me the correct runnable code.
Formulation of model:Qt= Number of cars to be produced in period t, t=1,...,4.
It= Inventory level of cars at the end of period t, t=1,...,4.
zt=1 if production is initiated in period t, and =0 otherwise. (Binary)
Dt= Assumed demand forecasts for the next 4 months are, 200,250,230 and 210 respectively.
ht= $500 per car per month. The cost of storing an unsold car in month t, t=1,...,4.
At= $500 per setup at month t,t=1,...,4.
ct= $15,000 per car
Min Z=[(500)*(z1)+(15,000)*(Q1)+(500)*(I1)+(500)*(z2)+(15,000)*(Q2)+(500)*(I2)+(500)*(z3)+(15,000)*(Q3)+(500)*(I3)+(500)*(z4)+(15,000)*(Q4)+(500)*(I4)]
Subject to:
I1=0+Q1-200
I2= I1+Q2-250
I3= I1+Q2-230
I4= I1+Q2-210
(I0 is assumed to to be zero)
Q1=10,000*zt
Q2=10,000*zt
Q3=10,000*zt
Q4=10,000*zt
It, Qt >=0 t=1,2,3,4
zt in {0,1} for each period t=1,2,3,4
Lingo Code:
SETS:
TIME /1..4/;
! Define parameters for each period directly;
DATA:
Demand(1) :=200;
Demand(2) :=250;
Demand(3) :=230;
Demand(4) :=210;
! Define constants;
SetupCost :=500;
UnitProdCost :=15000;
HoldingCost :=500;
VARIABLES:
Q(TIME)>=0; ! Number of cars to be produced in each period;
I(TIME)>=0; ! Inventory level at the end of each period;
z(TIME) binary; !1 if production is initiated, 0 otherwise;
! Objective function to minimize total costs;
MIN = @SUM(TIME: SetupCost * z(TIME)+ UnitProdCost * Q(TIME)+ HoldingCost * I(TIME));
! Inventory balance constraints;
@FOR(TIME:
IF(TIME =1) THEN
I(1)= Q(1)- Demand(1);
ELSE
I(TIME)= I(TIME-1)+ Q(TIME)- Demand(TIME);
ENDIF;
);
! Ordering link constraint ensuring that orders only occur if indicated by z(TIME);
@FOR(TIME:
Q(TIME)=10000* z(TIME);
);
! Set initial inventory to zero;
I(0) :=0;
MODEL:
END;
Lingo Model - Lingo1
SETS:
TIME /1..4/;
! Define parameters for each period directly;
DATA :
Demand(1) :=200;
Demand (2) :=250;
Demand (3) :=230;
Demand (4) :=210;
! Define constants;
SetupCost := :=00;
UnitProdCost :=15000 ;
HoldingCost :=500;
VARIABLES:
Q(TIME)0; ! Number of cars to be produced in each period;
I (TIME)0; ! Inventory level at the end of each period;
z (TIME) binary; ! l if production is initiated, 0 otherwise;
! Objective function to minimize total costs;
MIN = @SUM(TIME: SetupCost * TIME)+ UnitProdCost *Q(TIME)+ HoldingCost * I(TIME));
! Inventory balance constraints;
IF (TIME =1 THEN
I(1)=Q(1)- Demand (1);
ELSE
I(TIME)=I(TIME-1)+Q(TIME)- Demand (TIME);
ENDIF;
;
! Ordering link constraint ensuring that orders only occur if indicated by z(TIME);
@FOR (TIME:
Q(TIME)10000*z(TIME);
; Lingo Model - Lingo1
S Lingo Model - Lingo1
MODEL :
END;
 Im trying to integrate mathematical modelformulation into lingo but im getting

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!