Originally posted by: Guiheng
Dear rdumeur,
thanks for your reply, I am working with a JSSP and I want to calculate the time gap between two consecutive operations for the same job and the time gap between two consecutive operations in the same machine. I want to use the code below to make sure that every first operation in the machine, the horizontal delays should be equal to zero.
forall(m in Mchs){
forall(o in Ops,md1 in Modes : o.id==md1.opId && md1.mch==m ){
if(startOfPrev(mchs[m],ops[o],-1,0)==-1);{
horizontaldelays[o] == 0;}
}
}
tuple Operation
{
key int id; // Operation id
int jobId; // Job id
int pos; // Position in job
};
//Maschinenfähigkeiten (Realisierung Redundanz)
tuple Mode
{
int jobId; // Job id
int opId; // Operation id
int mch; // Machine
int pt; // Processing time
float mchavail; // Maschinenverfügbarkeit
float delays; //Stoerung
};
{Operation} Ops = ...;
{Mode} Modes = ...;
I truly want to add a constraint only if a condition startofPrev(...)==0 is true. how can I make it?
#ConstraintProgramming-General#DecisionOptimization