Hello everyone I had mistakes in my mod, which I already corrected due to communication with my prof. but I still have two issues:
Once it says that the tern I is already defined, because I have “var I” , but also “param I”. Can I just change the var into another Letter?
And the other issue is that I get this error: syntax error
context: minimize Kosten: sum{a in t} >>> sx[a]+hI[ <<< a]; #Minimierung der Gesamtkosten
Also the term x in my sum command is marked blue. What does it mean?
Here is my whole mod:
param T; #Anzahl der Perioden
param I; #Anfangsbestand
param s; #Rüstkostensatz
param h; #Lagerhaltungskosten
param M; #Eine “hinreichend große Zahl”
set t:=1…T; #Anzahl der Perioden
param d{t}; #Nachfrage der Periode
var q{t}; #Produktionsmenge in Periode t=1…T
var x{t} binary; #Entweder 1 bei Rüstung, sonst 0
var I{t}>=0; #Lagerbestand am Ende der Periode t=1…T
minimize Kosten: sum{a in t} sx[a]+hI[a]; #Minimierung der Gesamtkosten
subject to Lagerbestand{a in t}:I[a-1]+q[a]-d[a]=I[a];
subject to Produktionsmenge {a in t}:q[a]<=M*x[t];
subject to Produktionsmenge {a in t}:q[a]>=0;
subject to Lagerbestand {a in t}: I[a]>=0;
Need help asap.
Thanks in advance.
Anwar