Question: Could you convert the ample model file and the data file below to GAMS model? AMPL MODEL FILE set P; #set of plants set T;
Could you convert the ample model file and the data file below to GAMS model?
AMPL MODEL FILE
set P; #set of plants
set T; #set of all production units in network
set PU within PT; #set of production units for each plant
set S; #set of subassembly units in the network
set SU within PS; #set of subassembly units for each plant
set C; #set of components and parts
set M; #set of modules
set A; #set of assembly plants
param capcom PU integer ; #capacity of component at production unit
param capmod SU integer ; #capacity of module at subassembly unit
param ucom ij in PU c in C integer ; #utilized component at
production unit
param umod kl in SU m in M integer ; #utilized module capacity at
subassembly unit
param parea ij in PU; #area of each production unit
param sarea kl in SU; #area of each subassembly unit
param area p in P; #area of each plant
param demand a in A m in M integer; #demand of module at each assembly
unit
param lcom o in P p in P; #logistics cost of component from one plant to
another plant
param lmod p in P a in A; #logistics cost of module from one plant to
assemply
param vcom ij in PU c in C; #variable cost of component at each
production unit
param vmod kl in SU m in M; #variable cost of module at each assembly
unit
param fprod ij in PU; #fixed cost of operating production unit
param fsub kl in SU; #fixed cost of subassembly unit
param fplantp in P; #fixed cost of plant
param reqcom c in C m in M; #required amount of component for each
module
var xc in Cij in PUkl in SU integer ; #amount of component
produced on production unit and shipped to subassembly unit
var ym in Mij in SU a in A integer ; #amount of module produced
on subassembly unit and shipped to assembly unit
var Prodij in PU binary; #determines which production unit is
operating
var subkl in SU binary; #determines which subassembly unit is
operating
var plantp in P binary; #determines which plant is operating
minimize cost:
sumc in Cij in PUkl in SU o in P p in P
xcijkllcomopvcomijc
summ in Mkl in SU a in A p in P ymklalmodpavmodklm
sump in P plantpfplantp sumij in PUProdijfprodij
sumkl in SU subklfsubkl;
subject to moduledemandm in M a in A: sumij in SU ymija
demandam;
subject to componentdemandc in Cm in M: sumij in PUkl in SU
xcijkl reqcomcmsumij in SUa in Aymija;
subject to componentutilisedij in PU: sum c in Ckl in SU
ucomijcxcijkl Prodijcapcomij;
subject to moduleutilisedkl in SU: sum m in Mkl in SU a in A
ymklaumodklm subklcapmodkl;
subject to plantareap in P: sumij in PUProdij pareaij
sumkl in SUsubkl sareakl plantpareap;
AMPL DATA FILE
set P : plant plant;
set T : prod prod;
set PU :plantprodplantprodplantprodplantprod;
set S : sub sub;
set SU :plantsubplantsubplantsubplantsub;
set C : compcomp;
set M : modmod;
set A : assmblyassmbly;
param capcom :
plant prod plant prod
plant prod plant prod;
param capmod :
plant sub plant sub
plant sub plant sub;
param ucom: comp comp :
plant prod
plant prod
plant prod
plant prod;
param umod: mod mod :
plant sub
plant sub
plant sub
plant sub;
param parea :
plant prod plant prod
plant prod plant prod;
param sarea :
plant sub plant sub
plant sub plant sub;
param area :
plant plant;
param demand: mod mod :
assmbly
assmbly;
param lcom: plant plant :
plant
plant;
param lmod: assmbly assmbly :
plant
plant;
param vcom: comp comp :
plant prod
plant prod
plant prod
plant prod;
param vmod: mod mod :
plant sub
plant sub
plant sub
plant sub;
param fprod :
plant prod plant prod
plant prod plant prod;
param fsub :
plant sub plant sub
plant sub plant sub;
param fplant :
plant plant;
param reqcom: mod mod :
comp
comp;
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
