param T; # Anzahl der Perioden
set j := 1..J;
set t := 1..T;
set j0:=0;
param d{j,t}; # Nachfrage nach Produkt j in Periode t
param I0; # Anfangslagerbestand des Produktes j
param s{j}; # Rüstkostensatz des Produktes j
param h{j}; # Lagerhaltungskostensatz des Produktes j
param C{t}; # Verfügbare Kapazität in Periode t
param p{j}; # Produktionskoeffizient des Produktes j
var q{j,t} >= 0; # Produktionsmenge von j in Periode t
var x{j,t} binary; # 1 wenn in Periode t für j gerüstet wird, sonst 0
var I{j,t} >= 0; # Lagerbestand von Produkt j am Ende der Periode t
minimize costs: sum {a in J, b in T} (s[a] * x[a,b] + h[a] * I[a,b]);
subject to Lager {a in J, b in T}: (if a = 1 then 0 else I[a-1,b]) + q[a,b] - d[a,b] = I[a,b];
subject to Kapazität {a in J, b in T}: p[a] * q[a,b] <= C[a] * x[a,b];
subject to Lager seems to be alright because first i couldnt do another subejct to command after it, but when i fixed it, it turned out to be right, because then another subejct to command was possible.
But now it seems that something is wrong with subject to Kapazität, because i cant put in another subject to command after that one, which shows me that something is incorrect but so far I couldnt figure out the mistake.
Help ASAP pls :)
Anwar
--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ampl/09085bf2-bef8-4d12-8a30-bcf621b5b72an%40googlegroups.com.