Hello together,
so basically I got the variable var I and also s.t. I which has to be like that based on the task we got from our prof.
But if I put in the command for my mod, I get following error:
I is already defined
context: s.t. >>> I[ <<< t-1]+q[t]-d[t]=I[t];
For further understanding, I will send you my whole mod:
set T:= 1…4; #Anzahl der Perioden
param d; #Nachfrage in Periode
param I0; #Anfangslagerbestand
param s; #Rüstkostensatz
param h; #Lagerhaltungskostensatz
param M; #Eine hinreichend große Zahl
var q {t in T}>=0;
var x {t in T} binary;
var I {t in T}>=0;
minimize Kosten: sum{t in T} (sx[t]+hI[t]);
s.t. I[t-1]+q[t]-d[t]=I[t];
s.t. q[t]<=M*x[t];
s.t. q[t]>=0;
s.t. I[t]>=0;
s.t. x[t] binary;
Also another question: How come that some commands are in purple and some not ?
Thanks in Advance.
Anwar