Question: Sets i departments / cutting , insulating, sewing, packaging / j products / shirts , caps, pants, gloves / k weeks / 1 , 2

Sets
i departments /cutting, insulating, sewing, packaging/
j products /shirts, caps, pants, gloves/
k weeks /1,2,3,4/
q /1,2,3,4,5,6,7,8,9,10/;
Scalars
PermanentWorkers "Number of permanent workers" /25/
PermanentProductionRate "Production rate of permanent worker per week" /12/
TemporaryProductionRate "Production rate of temporary worker per week" /10/
hiring_cost "Cost of hiring a temporary worker" /200/
firing_cost "Cost of firing a temporary worker" /400/
inventory_cost "Inventory cost per item per week" /5/;
Parameters
capacity(k,i) capacity of each department in each week /1.cutting 1000,1.insulating 1000,1.sewing 1000,1.packaging 1000
2.cutting 990,2.insulating 990,2.sewing 990,2.packaging 990
3.cutting 980,3.insulating 980,3.sewing 980,3.packaging 980
4.cutting 970,4.insulating 970,4.sewing 970,4.packaging 970/,
X_coeff(i,j) Coefficients for products produced in departments /cutting.shirts 0.3, cutting.caps 0.3, cutting.pants 0.25, cutting.gloves 0.15
insulating.shirts 0.25, insulating.caps 0.35, insulating.pants 0.3, insulating.gloves 0.7
sewing.shirts 0.45, sewing.caps 0.5, sewing.pants 0.4, sewing.gloves 0.22
packaging.shirts 0.15, packaging.caps 0.15, packaging.pants 0.1, packaging.gloves 0.5/,
demand(k,j) demand for each product in each week /1.shirts 800,1.caps 750,1.pants 600,1.gloves 500
2.shirts 900,2.caps 800,2.pants 650,2.gloves 550
3.shirts 950,3.caps 850,3.pants 700,3.gloves 600
4.shirts 1000,4.caps 900,4.pants 750,4.gloves 650/,
production_cost(k,j) production cost of each product /1.shirts 30,1.caps 40,1.pants 20,1.gloves 10
2.shirts 35,2.caps 45,2.pants 25,2.gloves 15
3.shirts 40,3.caps 50,3.pants 30,3.gloves 20
4.shirts 45,4.caps 55,4.pants 35,4.gloves 25/,
penalty_cost(k,j) penalty cost for undelivered items of each product in each week /1.shirts 15,1.caps 20,1.pants 15,1.gloves 8
2.shirts 20,2.caps 25,2.pants 20,2.gloves 13
3.shirts 25,3.caps 30,3.pants 25,3.gloves 18
4.shirts 30,4.caps 35,4.pants 30,4.gloves 23/;
Positive Variables
X(j,k) production of each product in each department and week
H(k) number of temporary workers hired in each week
F(k) number of temporary workers fired in each week
M(j,k) inventory of each product at the end of each week
P(j,k) undelivered items of each product at the end of each week;
Variable
total_cost total cost;
Equations
obj objective function
capacity_con(k,i) capacity constraints
total_production_con(k,j)
demand_con(k,j) demand constraints
demand_con_1(k,j)
initial_inv(j) initial inventory constraints
hiring_con(k) hiring constraints
hiring_con_1(k)
max_workers(k) maximum temporary workers constraint;
obj.. total_cost =e=
sum((j,k), production_cost(k,j)* X(j,k))
+ sum(k, hiring_cost * H(k)+ firing_cost * F(k))
+ sum((j,k), inventory_cost * M(j,k))
+ sum((j,k), penalty_cost(k,j)* P(j,k));
capacity_con(k,i).. sum(j, X_coeff(i,j)* X(j,k))=l= capacity(k,i);
total_production_con(k,j)..
X(j,k)=e= PermanentProductionRate * PermanentWorkers + TemporaryProductionRate * sum((q),(ord(q) le ord(k))$(ord(q) le ord(k))), H(q)-F(q));
demand_con(k,j)$(ord(k) gt 1).. X(j,k)+ M(j,k-1)- M(j,k)=e= demand(k,j)- P(j,k);
demand_con_1(k('1'), j)..
X(j,'1')- M(j,'1')=e= demand('1',j)- P(j,'1');
initial_inv(j).. M(j,'1')=e=0;
hiring_con(k)$(ord(k) gt 1).. H(k)=l= F(k-1);
hiring_con_1(k('1')).. H('1')=e=0;
max_workers(k)..25+ H(k)- F(k)=l=50;
Model production_model /all/;
Solve production_model using LP minimizing total_cost; NOTE: above is my GAMS software code for my linear programming optimization model. i am facing error in code of line with name of equation {total production_con} plz fix this error in my code of line .second, fix error without changing my logic in total production_con equation .third, i want to display my all decision variable and its objective function so plz also do it in given code and last thing plz introduce in my code that in week inventory will be zero. plz do all things in my GAMS code and share GAMS code with me . i need of GAMS code. dont answer me in form of text but answer me via sharing GAMS CODE and dont put data in gdx or local file all work do on GAMS

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!