Hallo everybody,
who can rewrite these Gams funtions in mathematical notation (Form)?
Sets
V Aktivitaeten
K Ressourcen /k1/
T Zeithorizont
;
alias
(T, t, tau)
(V, i, j)
;
sets
p(i,j) Pfeilmenge
;
binary variables
x(i,t) Equals 1 if activity i starts during time period t otherwise 0
y(i,t) Equals 1 if activity i is not finished yet otherwise 0
;
parameters
availability(k,t) Verfügbarkeit der Ressource k in periode t
cost_earliness(i) of Aktivity i
cost_tardiness(i) of Aktivity i
due_date(i) (Deadline) of i
ES(i) earler start of Aktivity i
LS(i) Latest start of Aktivity i
M Hinreichend große Zahl M /1000/
min_r(i,k) minimale erlaubte Nutzung der Ressource r von Aktivität i pro Zeitperiode
max_r(i,k) maximale erlaubte Nutzung der Ressource r von Aktivität i pro Zeitperiode
w(i,k) Gesamtmenge an Ressourcen k die von der Aktivität i benötigt werden
;
Zielfkt…
F =E= sum(i, cost_earliness(i)*earliness(i) + cost_tardiness(i)*tardiness(i));
start(i)…
sum(t$(ord(t) - 1 >= ES(i) AND ord(t) - 1 <= LS(i)), x(i,t)) =E= 1;
flexible_resources_1(i,k,t)…
min_r(i,k) * (y(i,t)+ sum(tau$(ord(tau) <= ord(t)), x(i,tau)) - 1) =L= r(i,k,t);
flexible_resources_2(i,k,t)…
max_r(i,k) * (y(i,t)+ sum(tau$(ord(tau) <= ord(t)), x(i,tau)) - 1) =G= r(i,k,t);
earliness_constraint(i)…
earliness(i) =G= due_date(i) - sum((t), (ord(t)-1) * x(i,t)) - d(i);
tardiness_constraint(i)…
tardiness(i) =G= sum((t), (ord(t)-1) * x(i,t)) + d(i) - due_date(i);