Hello Everybody,
I am facing a problem with multiple set. i.e between m and p in the following command
My problem in short:
I have two machines, but want to produce three different products.
Each machine can produce only one product at a time. production time is 5 days.
2 machines - 3 products is the problem.
if it is 3 machine- 3 products… i would have produce each product in each machine separately.
pls chek the blue line. any suggestion for improvement. Thanks in Advance…
Set t time /120/
Set p product /13/
Set m machine /1*2/
Parameter Demand(t,p),Ordermin,Production,ptime;
Ordermin=50;
Demand(t,p) = normal(20,1);
Production=50;
ptime=5;
Variables Order(t,p), Startt(t,m), Endd(t,m), cumorder;
Binary variables b(t,p), Macstatus(t,m);
Equations Eq1(t,p,m), con1(t,p), Eq2(t,m), Eq3(t,p,m), Eq4(t,m), obj;
Eq1(t,p,m)… Order(t,p) =e= Order(t-1,p) + Demand(t,p) -ProductionEndd(t,m);
con1(t,p)… Order(t,p) =l= Ordermin + 100000b(t,p);
Eq2(t,m)… Macstatus(t,m) =e= Macstatus(t-1,m) + Startt(t-1,m) - Endd(t,m); Macstatus(t,m) = 0 (idle), 1( in-production)
Eq3(t,p,m)… Startt(t,m) =e= b(t,p)*(1-Machinestatus(t,m)); Startt(t,m)= 1(begining), 0 otherwise
Eq4(t,m)… Endd(t,m) =e= Startt(t-ptime,m); Endd(t,m) = 1(production finished), 0 otherwise
obj… cumorder =e= sum((t,p),Order(t,p));
Model productionn /all/;
OPTION OPTCR = 0.0, OPTCA = 0.0;
SOLVE productionn MINIMIZING cumorder USING MINLP ;
Display Demand,Order.L,Machinestatus.L,Startt.L,Endd.L,cumorder.L
Thanks
Swin
–~–~---------~–~----~------------~-------~–~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~–~—