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
q ;
Scalars
PermanentWorkers "Number of permanent workers"
PermanentProductionRate "Production rate of permanent worker per week"
TemporaryProductionRate "Production rate of temporary worker per week"
hiringcost "Cost of hiring a temporary worker"
firingcost "Cost of firing a temporary worker"
inventorycost "Inventory cost per item per week" ;
Parameters
capacityki capacity of each department in each week cutting insulating sewing packaging
cutting insulating sewing packaging
cutting insulating sewing packaging
cutting insulating sewing packaging
Xcoeffij Coefficients for products produced in departments cuttingshirts cutting.caps cutting.pants cutting.gloves
insulating.shirts insulating.caps insulating.pants insulating.gloves
sewing.shirts sewing.caps sewing.pants sewing.gloves
packaging.shirts packaging.caps packaging.pants packaging.gloves
demandkj demand for each product in each week shirts caps pants gloves
shirts caps pants gloves
shirts caps pants gloves
shirts caps pants gloves
productioncostkj production cost of each product shirts caps pants gloves
shirts caps pants gloves
shirts caps pants gloves
shirts caps pants gloves
penaltycostkj penalty cost for undelivered items of each product in each week shirts caps pants gloves
shirts caps pants gloves
shirts caps pants gloves
shirts caps pants gloves ;
Positive Variables
Xjk production of each product in each department and week
Hk number of temporary workers hired in each week
Fk number of temporary workers fired in each week
Mjk inventory of each product at the end of each week
Pjk undelivered items of each product at the end of each week;
Variable
totalcost total cost;
Equations
obj objective function
capacityconki capacity constraints
totalproductionconkj
demandconkj demand constraints
demandconkj
initialinvj initial inventory constraints
hiringconk hiring constraints
hiringconk
maxworkersk maximum temporary workers constraint;
obj.. totalcost e
sumjk productioncostkj Xjk
sumk hiringcost Hk firingcost Fk
sumjk inventorycost Mjk
sumjk penaltycostkj Pjk;
capacityconki sumj Xcoeffij Xjkl capacityki;
totalproductionconkj
Xjke PermanentProductionRate PermanentWorkers TemporaryProductionRate sumqordq le ordk$ordq le ordk HqFq;
demandconkj$ordk gt Xjk Mjk Mjke demandkj Pjk;
demandconk j
Xj Mje demandj Pj;
initialinvj Mje;
hiringconk$ordk gt Hkl Fk;
hiringconk He;
maxworkersk Hk Fkl;
Model productionmodel all;
Solve productionmodel using LP minimizing totalcost; 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 productioncon plz fix this error in my code of line second, fix error without changing my logic in total productioncon 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
