Hey everyone I really hope I can get your help. I'm trying to solva a scheduling problem having some time and resource constraints. I work with time instances that are very very long and the optimizer is taking too long. I'm trying to switch on events, that is calculate the objective function when a new task starts or finishes. Therefore i inserted the following constraints:

```
for (int ist =0; ist < finalIstant; ist++)
{
IloIntExprArray futureEvents(env); //eventi profilo
IloIntExpr cond;
for (int m = 0; m< jobs.getSize(); m++)
{
condEq= ist==jobs[m];
}
for (int f = 0; f< jobs.getSize(); f++)
{
IloIntExpr condGreater=jobs[f] > ist;
futureEvent.add(condGreater);
}
nextEvent=IloMin(futureEvents);
IloIntExpr event=nextEvent-ist;
IloInt tempOot = itThis->optimal;
IloIntExpr diff = tempOpt - IloSum(risIst);
IloIntExpr diffQuad = diff * diff;
expression.add(condEq*diffQuad*event);
}
```

asked
**11 Feb '16, 12:26**

aled98

11●1●2

accept rate:
0%