Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

extraction fails for State Resource Constraint

  • 1.  extraction fails for State Resource Constraint

    Posted 02/21/08 07:08 PM

    Originally posted by: SystemAdmin


    [jjacobsohn said:]

    I'm having a problem with extracting my model when I include a particular constraint. The constraint is constructed by 'requires' on an activity: IloResourceConstraint ct = iloDummyActivity.requires(iloStateResource, (IloAny)target);
    I verify that it is a StateConstraint via ct.isStateConstraint(), which returns IloTrue.

    When I extract the model, I get an exception: Solver Error : (33) IlcAltResConstraintI::IlcAltResConstraintI Negative capacity

    If I don't add the constraint to the model, extraction is fine.

    Any idea what may be happening here? Can someone suggest a workaround?

    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: extraction fails for State Resource Constraint

    Posted 02/26/08 06:42 PM

    Originally posted by: SystemAdmin


    [phlab said:]

    Hello,
    Is iloStateResource actually an instance of IloStateResource? Looking at the exception, it looks like it could be an IloAltResSet.

    By the way, in ILOG CP / ILOG Scheduler, alternative of state resources are not supported. If you want to model alternative of state resources, you need to post constraints on the boolean status of the 'require' constraint. For instance, for an activity requiring either state1 of stateResource1 or state2 of stateResource2, you could do:
      IloBoolVar x1(env);
      IloBoolVar x2(env);
      model.add(x1 == act.requires(stateResource1, state1));
      model.add(x2 == act.requires(stateResource2, state2));
      model.add(x1 != x2);

    Philippe

    #CPOptimizer
    #DecisionOptimization