Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  all solutions!!

    Posted 12/04/09 06:14 AM

    Originally posted by: SystemAdmin


    Hi,
    is there an option to get all solutions of a model?
    thanks in advance

    NL
    #ConstraintProgramming-General
    #DecisionOptimization


  • 2.  Re: all solutions!!

    Posted 12/07/09 09:50 AM

    Originally posted by: Didier Vidal


    You should call the next() method of the CP engine. This is straightforward in C++, java or C#. If you do this from OPL, you have first to create a 'main' function, where you can invoke the CP engine in the non default way (ie not just solve). I have written a simple example below. You can find other similar codes in the OPL examples of the distribution.

    
    using CP;   main 
    { var runConfig = 
    
    new IloOplRunConfiguration(
    "draft.mod"); runConfig.oplModel.generate(); runConfig.cp.startNewSearch(); 
    
    while (runConfig.cp.next()) 
    { writeln(runConfig.oplModel.i); 
    } writeln(
    "All solutions found"); 
    }   dvar 
    
    int i[1..5] in 1..5;   constraints 
    { allDifferent(i); 
    }
    

    #ConstraintProgramming-General
    #DecisionOptimization


  • 3.  Re: all solutions!!

    Posted 12/08/09 04:16 AM

    Originally posted by: SystemAdmin


    Thanks for your reply,

    if we have data in a file we have to use the constructor
    
    IloOplRunConfiguration(
    "***.mod",
    "***.dat")
    
    I think ?!
    #ConstraintProgramming-General
    #DecisionOptimization


  • 4.  Re: all solutions!!

    Posted 12/08/09 08:00 AM

    Originally posted by: Didier Vidal


    Yes. By the way, you can find the signature of ILoOplRunConfiguration in the OPL documentation (ILOG Script Reference Manual) for all variations of the signature.

    Didier.
    #ConstraintProgramming-General
    #DecisionOptimization


  • 5.  Re: all solutions!!

    Posted 12/08/09 08:14 AM

    Originally posted by: SystemAdmin


    thank you again!! :)

    NL
    #ConstraintProgramming-General
    #DecisionOptimization