Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Cplex vs CP-Optimazier

    Posted 06/28/08 10:47 PM

    Originally posted by: SystemAdmin


    [deborah said:]

    Hello,
    I am trying to make to resolve a model written by  MP approach to the CP-Optimizer solver instead that to the Cplex solver, but with several data in input, Cplex gives back an optimal solution, CP-Optimizer does not succeed and generates different errors, such us:
    - not enough memory
    - input buffer overflow
    - out of memory

    Why???? :-(

    Moreover, it is possible to obtain a sub-optimal solution resolving the model with CP-Optimizer?

    Thank you in advance!



    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: Cplex vs CP-Optimazier

    Posted 06/30/08 01:46 PM

    Originally posted by: SystemAdmin


    [Didier Vidal said:]

    ILOG CP Optimizer is an optimization engine for solving detailed scheduling problems as well as certain combinatorial optimization problems that cannot be easily linearized and solved using traditional mathematical programming methods.

    For combinatorial optimization problems that CPLEX solves well, there is little interrest to switch to CP Optimizer. If they are not solved well by MP, then, in general, you will have to write your model differently to take advantage of CP. For instance, in MP, a one-to-one relationship is often modeled with a 2-D array of boolean variables with contraints that sums on rows and columns are equals to 1 - in CP, it is more efficiently modeled with a 1-D array of integer variables and an 'allDifferent' constraint.

    Nevertheless, if you are new to CP, you will more easily see the benefits of CP Optimizer if you try to solve a detailed scheduling problems (available since OPL 6 / CP Optimizer 2.0). In OPL 6. the detailed scheduling examples can be found because they are prefixed by sched (eg: sched_cumul)

    Didier.
    #CPOptimizer
    #DecisionOptimization


  • 3.  Re: Cplex vs CP-Optimazier

    Posted 06/30/08 07:15 PM

    Originally posted by: SystemAdmin


    [deborah said:]

    Thank you very much for your quick replies.

    Exactly!! I'm new to CP. I've ILOG OPL Development Studio 5.5, for having the code of the scheduling's examples, I must necessarily download new version ILOG OPL Development Studio 6.0?

    Thank you very much for your help! 

    Deborah
    #CPOptimizer
    #DecisionOptimization


  • 4.  Re: Cplex vs CP-Optimazier

    Posted 06/30/08 08:05 PM

    Originally posted by: SystemAdmin


    [Didier Vidal said:]

    Yes, to see the examples of detailed scheduling, you should download the trial version of OPL 6.0 .

    For your convenience, here is an example that we comments in our Web Seminars of ILOG CP Optimizer 2.0 to introduce the modeling framework for scheduling.


    /* ------------------------------------------------------------

    Problem Description
    -------------------

    This is a problem of building five houses in different locations. The
    masonry, roofing, painting, etc. must be scheduled. Some tasks must
    necessarily take place before others and these requirements are
    expressed through precedence constraints.

    There are three workers, and each task requires a worker.  There is
    also a cash budget which starts with a given balance.  Each task costs
    a given amount of cash per day which must be available at the start of
    the task.  A cash payment is received periodically.  The objective is
    to minimize the overall completion date.

    ------------------------------------------------------------ */

    using CP;


    int NbWorkers = ...;
    int NbHouses  = ...;
    range Houses  = 1..NbHouses;

    {string} TaskNames  = ...;

    int Duration [t in TaskNames] = ...;

    tuple Precedence {
      string before;
      string after;
    };

    {Precedence} Precedences = ...;

    int ReleaseDate[Houses] = ...;

    dvar interval itvs[h in Houses][t in TaskNames] in ReleaseDate[h]..maxint size Duration[t];


    cumulFunction workersUsage =
      sum(h in Houses, t in TaskNames) pulse(itvs[h][t],1);

    cumulFunction cash =
      sum (p in 0..5) step(60*p, 30000)
      - sum(h in Houses, t in TaskNames) stepAtStart(itvs[h][t], 200*Duration[t]);

    execute {
      cp.param.FailLimit = 10000;
    }

    dexpr int totalDuration = max(h in Houses) endOf(itvs[h]["moving"]);
    minimize totalDuration;

    subject to {
      forall(h in Houses)
        forall(p in Precedences)
          endBeforeStart(itvs[h][p.before], itvs[h][p.after]);

      workersUsage <= NbWorkers;<br />
      cash >= 0;
    }



    #CPOptimizer
    #DecisionOptimization