Decision Optimization

Decision Optimization

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

 View Only
  • 1.  CPOptimizer startNewSearch Failure

    Posted Thu October 18, 2012 01:11 PM

    Originally posted by: SystemAdmin


    I am performing a two-phase search where one set of dvars is being fixed, followed by a second set of dvars. However, there are many more dvars that are auxiliary to the model that I wish to leave unfixed... Therefore, I've created a custom IloCustomIntVarChooser whose choose() method returns -1 (skip this dvar) for all remaining dvars.

    By doing so, the search successfully fixes the anticipated dvars, followed by an exception being thrown, which states:

    ilog.concert.IloException: IloInt IloIntVarChooser::choose(...) : unfixed variables remains while the function return -1

    At this point, the IloCP instance is unstable - no matter whether I execute cp.abortSearch() or cp.endSearch(), any attempt to add new constraints to the Model are met with an exception stating:

    ilog.concert.IloException: This change is not allowed during a search.

    My question is, how do I clear out this previous "failed" search so that I can continue with manual constraint entry?
    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: CPOptimizer startNewSearch Failure

    Posted Fri October 19, 2012 09:11 AM

    Originally posted by: SystemAdmin


    The automatic search embedded is CP Optimizer does not support partial assignments. You need to have every variable instantiated when a solution is found and there is a check that a custom variable chooser complies with this rule. This is why you get the first exception (unfixed variables remains while the function return -1). If you want the remaining vars to be unfixed you need to change your model by transforming them into expressions for instance ans by replacing their bounds by <= and >= constraints on these expressions.

    About the second exception, when CP optimizer raises an exception, it means that there is a problem in the calling code. CP Optimizer is then in an unstable state and all you can do is display the exception an end the IloCP instance.

    Regards,

    Philippe
    #CPOptimizer
    #DecisionOptimization