Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  The obsolete IlcSolve, local search ?

    Posted 07/25/11 03:36 PM

    Originally posted by: SystemAdmin


    Hi all,

    Does anyone know about this old function ?
    Is it equivalent to a local search like:
    IloSolver lsolver (_Model)
    lsolver.solve (LGoal) ?

    Do you know if variables were propagated after a IlcSolve (LGoal) call ?

    Thanks very much!

    Cheers.
    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: The obsolete IlcSolve, local search ?

    Posted 07/26/11 07:40 AM

    Originally posted by: SystemAdmin


    Hello,

    > Does anyone know about this old function ?
    > Is it equivalent to a local search like:
    > IloSolver lsolver (_Model)
    > lsolver.solve (LGoal) ?

    Which old function? What is LGoal ? An IloGoal or an IlcGoal ?

    > Do you know if variables were propagated after a IlcSolve (LGoal) call ?

    This function creates a new goal stack, initializes it with the IlcGoal LGoal and runs the goal stack. So during this process, yes variables are propagated. But if the execution of LGoal fails (no solution found) or if the restore flag was true ( IlcSolve(LGoal,IlcTrue) ), then, at the end of the function, the current state of the solver is restored, that is, you will be in the same state as just before calling IlcSolve.

    Now, back to your first question and assuming the old function you mention is IlcSolve(LGoal).
    When you are doing:
    
    IloSolver lsolver (_Model) lsolver.solve (LGoal)
    

    Here, you are calling IloSolver::solve(...) at the top level of the search (just after creation of the solver on a model) so you need to use an IloGoal as argument ( IloSolver::solve(IloGoal, ...) ), that is, a top level search goal. So if the goal in IlcSolve(LGoal) is the top level goal of your search, yes, the two versions are equivalent.

    But if you are calling IlcSolve(LGoal) inside the code of a search goal (internal solve), then you need to use an IlcGoal instead: IloSolver::solve(IlcGoal, ...).

    Philippe
    #CPOptimizer
    #DecisionOptimization