Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  link to java and cplex

    Posted 02/28/16 01:08 AM

    Originally posted by: FiFila


    Hi all;

    I'm a beginner in CP optimizer and CPLEX. I have read user manual and some examles of CP and CPLEX.

    I do not know why some of programs have been written by Java or C++? When the compiler of CPLEX or CP needs a C++ environment and Java to run?

    Also, what is the different between CP and other constraints that we has been written by CPLEX (without writing using CP)?

    Thanks in advance


    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: link to java and cplex

    Posted 02/29/16 04:39 AM

    Originally posted by: Petr Vilím


    Hello FiFila,

    If you want to use CP Optimizer then you have several options. You can use OPL, then you don't need a compiler, you simply model the problem in OPL. But there is also a way to use CP Optimizer in C++, Java or C# programs and we provide examples how to do it. That's probably what you saw. The main advantage of OPL is simplicity and rapid development. On the other hand OPL is an interpreted language and so the translation of the model from OPL to the engine level could take more time. So if you want to save that time, you can use CP Optimizer directly from other languages. Another reason to use in particular C++ interface for CP Optimizer is that it offers functionalities that are not accessible from OPL: develop your own constraints or your own search procedure.

    To answer your second question, CP Optimizer offers many specialized constraints for combinatoric problems, for example allDiff(erent), distribute or pack and also many specialized constraint for scheduling problems such as precedences, noOverlap,  cumulative expressions etc. On the other hand, CP Optimizer does not support floating-point variables. It supports floating-point expressions though, so you can write constraints such as 1.5*x*y <= 100, but x and y must be integer variables (or another expressions).

    Petr


    #CPOptimizer
    #DecisionOptimization


  • 3.  Re: link to java and cplex

    Posted 02/29/16 09:19 AM

    Originally posted by: FiFila


    Hi Petr;

    Thanks for your time.

    In addition to this would you please say when we have written "using CP;", this means that we are using from the constraints and functionality of CP?

    Best

    Fila


    #CPOptimizer
    #DecisionOptimization


  • 4.  Re: link to java and cplex

    Posted 02/29/16 10:05 AM

    Originally posted by: Petr Vilím


    Yes, OPL is a common language for both CPLEX and CP Optimizer and the default solver is CPLEX. So by "using CP" you're telling OPL to use CP Optimizer instead of CPLEX.

    Best, Petr


    #CPOptimizer
    #DecisionOptimization


  • 5.  Re: link to java and cplex

    Posted 02/29/16 10:55 AM

    Originally posted by: FiFila


    Is it possible to use both of them in one program?


    #CPOptimizer
    #DecisionOptimization


  • 6.  Re: link to java and cplex

    Posted 02/29/16 11:15 AM

    Originally posted by: Petr Vilím


    The problem must be always solved by only one solver. There are some approaches that combines both solvers, usually it involves splitting the problem in two or more parts and optimizing each part by different solver.

    Petr


    #CPOptimizer
    #DecisionOptimization


  • 7.  Re: link to java and cplex

    Posted 02/29/16 11:20 AM

    Originally posted by: FiFila


    Thanks Petr.

    Would you please send me an example of this combination (if possible)?

    Fila


    #CPOptimizer
    #DecisionOptimization


  • 8.  Re: link to java and cplex

    Posted 03/07/16 02:08 AM

    Originally posted by: Petr Vilím


    Hello FiFila,

    I can only describe such combination on high level. Typical example is a decomposition of a problem into a master problem and a subproblem. For example, the master problem could be a planning problem (in which factory produce how much product) and the subproblem is detailed scheduling (what machines are used for the production, when exactly is each product produced). In this case the planning part is typically solved by CPLEX and the detailed scheduling by CP Optimizer. Such approach may be necessary when the problem is really huge.

    Petr


    #CPOptimizer
    #DecisionOptimization