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 {P,T}; #set of production units for each plant
set S; #set of subassembly units in the network
set SU within {P,S}; #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 >=0; #capacity of component at production unit
param capmod {SU} integer >=0; #capacity of module at subassembly unit
param ucom {(i,j) in PU, c in C} integer >=0; #utilized component at
production unit
param umod {(k,l) in SU, m in M} integer >=0; #utilized module capacity at
subassembly unit
param parea {(i,j) in PU}>=0; #area of each production unit
param sarea {(k,l) in SU}>=0; #area of each subassembly unit
param area {p in P}>=0; #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 {(i,j) in PU, c in C}; #variable cost of component at each
production unit
param vmod {(k,l) in SU, m in M}; #variable cost of module at each assembly
unit
param fprod {(i,j) in PU}; #fixed cost of operating production unit
param fsub {(k,l) in SU}; #fixed cost of subassembly unit
param fplant{p in P}; #fixed cost of plant
param reqcom {c in C, m in M}; #required amount of component for each
module
var x{c in C,(i,j) in PU,(k,l) in SU} integer >=0; #amount of component
produced on production unit and shipped to subassembly unit
var y{m in M,(i,j) in SU, a in A} integer >=0; #amount of module produced
on subassembly unit and shipped to assembly unit
var Prod{(i,j) in PU} binary; #determines which production unit is
operating
var sub{(k,l) in SU} binary; #determines which subassembly unit is
operating
var plant{p in P} binary; #determines which plant is operating
minimize cost:
sum{c in C,(i,j) in PU,(k,l) in SU, o in P, p in P}
x[c,i,j,k,l]*(lcom[o,p]+vcom[i,j,c])+
sum{m in M,(k,l) in SU, a in A, p in P} y[m,k,l,a]*(lmod[p,a]+vmod[k,l,m])
+
sum{p in P} plant[p]*fplant[p]+ sum{(i,j) in PU}Prod[i,j]*fprod[i,j]+
sum{(k,l) in SU} sub[k,l]*fsub[k,l];
subject to moduledemand{m in M, a in A}: sum{(i,j) in SU} y[m,i,j,a]>=
demand[a,m];
subject to componentdemand{c in C,m in M}: sum{(i,j) in PU,(k,l) in SU}
x[c,i,j,k,l]= reqcom[c,m]*sum{(i,j) in SU,a in A}y[m,i,j,a];
subject to componentutilised{(i,j) in PU}: sum{ c in C,(k,l) in SU}
ucom[i,j,c]*x[c,i,j,k,l]<= Prod[i,j]*capcom[i,j];
subject to moduleutilised{(k,l) in SU}: sum{ m in M,(k,l) in SU, a in A}
y[m,k,l,a]*umod[k,l,m]<= sub[k,l]*capmod[k,l];
subject to plantarea{p in P}: sum{(i,j) in PU}Prod[i,j]* parea[i,j]
+sum{(k,l) in SU}sub[k,l]* sarea[k,l]<= plant[p]*area[p];
AMPL DATA FILE
set P := plant1 plant2;
set T := prod1 prod2;
set PU :=(plant1,prod1)(plant1,prod2)(plant2,prod1)(plant2,prod2);
set S := sub1 sub2;
set SU :=(plant1,sub1)(plant1,sub2)(plant2,sub1)(plant2,sub2);
set C := comp1,comp2;
set M := mod1,mod2;
set A := assmbly1,assmbly2;
param capcom :=
plant1 prod150 plant1 prod270
plant2 prod130 plant2 prod265;
param capmod :=
plant1 sub115 plant1 sub230
plant2 sub120 plant2 sub213;
param ucom: comp1 comp2 :=
plant1 prod12025
plant1 prod23530
plant2 prod11510
plant2 prod22520;
param umod: mod1 mod2 :=
plant1 sub1510
plant1 sub21020
plant2 sub1200
plant2 sub267;
param parea :=
plant1 prod1100 plant1 prod2200
plant2 prod1300 plant2 prod2400;
param sarea :=
plant1 sub1150 plant1 sub2300
plant2 sub1300 plant2 sub2400;
param area :=
plant1760 plant21400;
param demand: mod1 mod2 :=
assmbly1412
assmbly21310;
param lcom: plant1 plant2 :=
plant1100010
plant2151000;
param lmod: assmbly1 assmbly2 :=
plant11020
plant21530;
param vcom: comp1 comp2 :=
plant1 prod123
plant1 prod2109
plant2 prod11510
plant2 prod2305;
param vmod: mod1 mod2 :=
plant1 sub155
plant1 sub21015
plant2 sub1205
plant2 sub2307;
param fprod :=
plant1 prod125 plant1 prod235
plant2 prod137 plant2 prod247;
param fsub :=
plant1 sub118 plant1 sub234
plant2 sub130 plant2 sub240;
param fplant :=
plant125 plant235;
param reqcom: mod1 mod2 :=
comp1510
comp2515;

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 Databases Questions!