Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Heuristics like Silver-Meal

    Posted 11/25/18 01:44 PM

    Originally posted by: Martin.Polz@gmx.de


    Hello everybody,

     

    i am very new to ilog. So far I found only models which are solving problems optimally. 

    Is it also possible to program heuristics in ilog like the silver-meal heuristic? Or do I have to use other programs for such heuristics?

    Thanks in advance


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Heuristics like Silver-Meal

    Posted 11/26/18 02:36 AM

    Maybe you should take a look at the documentation here to learn what this product is exactly.

    Among other things, it contains

    1. Two very powerful engines to solve mixed integer programs and constraint programming problems.
    2. Interactive command line tools to interact with these engines.
    3. Libraries for various programming languages to interact with these engines.
    4. A modeling language (called "OPL") that provides simple ways to define models, consume data and produce results.
    5. An IDE that makes using OPL very easy.
    6. A scripting language (called "OPLScript") that makes OPL more dynamic (you can programatically modify models, create data, process results, ...). That scripting language is based on JavaScript.

    Thanks to item 6, you could implement something like the Silver-Meal heuristic in OPLScript but I am pretty sure that this is not what you want to do. Coding this in another programming language would probably be more efficient.

    The question is: if you have CPLEX at your disposal and want to use it, why do you want to do something like the Silver-Meal heuristic? Why not just setup the model and have CPLEX solve it for you?

    Note that you can use CPLEX as a heuristic as well: you can have it solve heuristic relaxations of your model, you can have stopping criteria that stop with solutions that have not yet proven to be optimal, ...

    Another use for CPLEX in heuristics is as a sub-routine of more complex heuristics. Such subroutines find (near-)optimal solutions to subproblems that must be solved within heuristics.

    You may also want to take a look at the various examples shipped with CPLEX, in particular at the OPL examples. In your case I would start with opl/examples/opl/models/SupplyChain/supply.mod.

    You can even browse through these examples by category by starting the IDE, then choosing File->Import->Example... and then clicking on "IBM ILOG OPL Examples".


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Heuristics like Silver-Meal

    Posted 11/26/18 03:49 AM

    Originally posted by: Martin.Polz@gmx.de


    Thank you very much for your reply. I will have a lotsizing problrem which is too big for solving it optimally. Therefore I will need heuristic where the silver-meal is only one part of it. 

    You mentioned other programming languages are more sensefull concerning programming a heuristic. What languages could you recommend? I am trying currently Matlab and VB.net. 

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Heuristics like Silver-Meal

    Posted 11/26/18 04:57 AM

    Note that you don't have to solve to optimality with CPLEX! You can stop at any point and go with the best solution found so far. The good thing about the approach that CPLEX takes compared to a lot of other heuristics: you will get a guarantee on the solution quality. This is known as the "gap" and will give you an estimate how far away from an optimal solution you are in the worst case.

    Which programming language to use highly depends on what you are familiar with, IMO. CPLEX is available for C, C++, Python, Java, .NET and matlab. There are also other languages (like for example Julia) with which you can use CPLEX although there is not an official connector by IBM. If I had to choose between matlab and .NET I would probably go for .NET. If the code I plan to write has to crunch through a lot of numbers or similar I would probably go for the fastest thing possible: C or C++. Note that this is for writing *my own* heuristics. If I want to use CPLEX then I would really go with what I am most familiar with and which has the smallest development/maintenance cost for me. If you use CPLEX then only the model building part happens in the language of your choice. Once you start solving everything happens in the CPLEX library and that is compiled native code that is the same for all the programming languages that use it.

    EDIT: To be more explicit about what using CPLEX as a heuristic means: you can for example ask CPLEX to stop after a certain time and return the best solution found. Or you can ask to stop if it can prove that the best solution found so far is at least within x% of a potential optimal solution.


    #CPLEXOptimizers
    #DecisionOptimization