Hi,
I would like to know how to express the continuity constraint without using a decision variable in the conditional form. My challenge is to stay with a linear formulation.
I will start to explain my model :
We would like to determine the optimal starting and finishing date of the project while respecting the human resource capacity available to execute the project.
One of the assumptions is that the project could not be interrupted during its executing period, means once it starts it should be executed continually. Thus, we would like to express this constraint : Act[j,t] should have the value 1 for t<= Fin[j]
However, if we write the following constraint :
subject to continuityConstraint { j in P, t in T : t<= Fin[j]-1} :
Act [j,t+1] >= Act[j,t];
We are not with a linear model anymore
Sets :
set P:= {1…n}; #set of projects
set RType:={“Project manager”, “Technical Expert”, “Financial Analyst”, “Estimator”, “Contractual manager”}; #set of human resources
set T:= {1…l}; #set of terms
set S:= {“SP”, “MP”, “LP”, “XLP”};#set of project sizes : small, medium, large and major
set PS within {P,S}; # Set of project-size combinations
Parameters :
param ES{j in P}; # Earliest starting of the project
param LF{j in P}; # Latest finishing of the project
param Duration{j in P};# duration of project j
param RDemand{s in S, r in RType}; # total number of required resource type r to be allocated to project j on any term within its duration
param Av{r in RType, t in T}>=0; #avaialibility of each human resource type r at the period t
Deicison variables :
var Act{j in P, t in T} binary; #=1 if the project j is executing durint period t and 0 otherwise
var FinMax {j in P} integer;
var Debut{j in P} integer; # starting date of the project j
var Fin{j in P} integer; # Finishing date of the project j
var Y{j in P, r in RType, t in T} integer;# number of human resource type r allocated to project j at period t
subject to DurationConstraint {j in P}:
sum{t in T} Act[j, t] = Duration[j];
subject to AffectConstraint {r in RType, t in T}:
sum {j in P, (j,s) in PS} RDemand[s,r]*Act[j,t]<= Av[r,t];
subject to DemandConstraint {j in P, (j,s) in PS, (j, m) in PM, r in RType,t in T}:
Y[j, r, t] =RDemand[s,m,r]*Act[j,t];
subject to Max_Constraint{j in P, t in T}:
t * Act[j, t] <= FinMax[j];
subject to Define_Fin{j in P}:
Fin[j] = FinMax[j];
subject to ActConstraint {j in P}:
(Fin[j]-Debut[j]) =(sum{t in T} Act[j,t])-1;
subject to FinishConstraint {j in P, t in T: t > LF[j]}:
Act[j,t]=0;
subject to SConstraint {j in P, t in T: t < ES[j]}:
Act[j,t]=0;
Thank you so much!!!
Do not hesitate if you have any question about the problem.
Best regards,