Hello together.
So basically we have to solve a task with AMPL and the task has the var I and the s.t. I.
When I type in both and want to load my mod, it tells me that the term I is already defined but I need the term I as a var and as s.t.
To give you a quick overview. Here is my 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} (s*x[t]+h*I[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: All commands are purple besides the last 4 . How come (what does it mean)?
Thanks in advance.
Anwar