Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  B&Cut with callable library

    Posted 07/10/08 09:23 PM

    Originally posted by: SystemAdmin


    [makhlouf said:]

    Hi every body,
      I have a MIP to solve with a Branch&Cut and i like to use callbacks, (with callabl library ), and i dont know how to do it.
    I looked to the Admipex5.c in the help of cplex, but i have not understand, and i can't do anything.
    Please, I need your help.

    Mak
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: B&Cut with callable library

    Posted 07/10/08 11:38 PM

    Originally posted by: SystemAdmin


    [prubin said:]

    The closest thing I know of to a tutorial on cutbacks is the section "Advanced Programming Techniques  > Using Callbacks" in the CPLEX User Guide, which describes the C++ version of this example (iloadmipex5.cpp) in detail.  Using C rather than C++ is a bit more painful, but fundamentally similar.  I suggest you read through that section of the User Guide until you understand how iloadmipex5.cpp works, then see if you can make the connection to the C version.  If you have a few specific questions, perhaps someone here can help.

    /Paul
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: B&Cut with callable library

    Posted 07/11/08 04:23 PM

    Originally posted by: SystemAdmin


    [makhlouf said:]

    Thanks for your reply,
    Q1-Really, I use the C++ Builder 6 to construct my project, i tried to use ILOG CPLEX Cancert Technology, but i have an error "...can't open generic.h", (I have included lot of paths in my IDE, but...), so now, i like to try Callable library to program a Branch& Cut , and the problem is after looking the examples "Admipex4, 5.c" , i dont know how can i use it?

    Q2- Mu second question is, I compiled successfully "Admipex5.c---->Admipex5.cpp", and when i looked to the Model, i didnt't find the added constraints (8 constraints)!!!  Why? Where did the compiler place them?

      Thank you in advance

    M
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: B&Cut with callable library

    Posted 07/19/08 06:43 PM

    Originally posted by: SystemAdmin


    [prubin said:]

    [quote author=makhlouf link=topic=390.msg1126#msg1126 date=1215775400]
    Thanks for your reply,
    Q1-Really, I use the C++ Builder 6 to construct my project, i tried to use ILOG CPLEX Cancert Technology, but i have an error "...can't open generic.h", (I have included lot of paths in my IDE, but...), so now, i like to try Callable library to program a Branch& Cut , and the problem is after looking the examples "Admipex4, 5.c" , i dont know how can i use it?


    First off, admipex4.c and admipex5.c are C examples, not C++ examples.  The C++ versions are named iloadmipex4.cpp and iloadmipex5.cpp.

    Second, Borland's C++ compiler is not one of the ones that ILOG supports (see [url=http://www.ilog.com/products/cplex/product/platforms.cfm]http://www.ilog.com/products/cplex/product/platforms.cfm[/url]).  That said, I had an earlier version of CPLEX running with an earlier version of C++ Builder years ago, before I saw the light and switched to Java.  The generic.h header file is part of C++ Builder, not an ILOG file, so you should look for it and make sure that C++ Builder can see it.  Trust me, you'll be much happier working with CPLEX in C++ than you will be in C.

    [quote author=makhlouf link=topic=390.msg1126#msg1126 date=1215775400]
    Q2- Mu second question is, I compiled successfully "Admipex5.c---->Admipex5.cpp",


    What does this mean?? Did you compile the C version or the C++ version?  I thought you said above that you couldn't compile it because the generic.h header was missing??

    [quote author=makhlouf link=topic=390.msg1126#msg1126 date=1215775400]
    and when i looked to the Model, i didnt't find the added constraints (8 constraints)!!!  Why? Where did the compiler place them?


    When cuts are added by a cut callback, they are added to the solver instance during the solution process, not to the model.  If you print out the model after solving it, you will see only the constraints that were present when you called solve().

    /Paul

    #CPLEXOptimizers
    #DecisionOptimization