Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

Urgent, How to add user cuts in java, sample code required please

  • 1.  Urgent, How to add user cuts in java, sample code required please

    Posted 06/25/12 08:05 AM

    Originally posted by: PersianGulf


    Hello everybody

    I know how to call Cplex from java and solve a problem. But I am strugelling for 3 long days to find out "how I can add a user-defined cut to Cplex when model is defined in cplex not in an .mps file format" If the model is already defined in .mps format, there is an example in cplex example for java, but this sample reads the mathematical model from a .mps which makes it different from what I want.

    I appreciate it a lot and a lot if someone could provide me with such a code in java.
    Thanks in advance for any help
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Urgent, How to add user cuts in java, sample code required please

    Posted 06/27/12 12:27 PM

    Originally posted by: SystemAdmin


    It works in exactly the same way. The only difference is: If you build the model in memory (and don't read it from a file) then you already have the references to the variables. That means you can skip the first part of AdMIPEx4.makeCuts(). With "first part" I mean all the stuff that looks up the variables by name and assigns the variables to references like 'w54'. You don't need that since you know what your variables are.
    The rest is exactly the same.
    #CPLEXOptimizers
    #DecisionOptimization