Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  How to display and export constraint matrix?

    Posted 06/04/11 03:14 PM

    Originally posted by: y82li


    I build model using C++ and cplex concert technology. The model works. But how can I display and export the constraint matrix A, and rhs b, etc.

    Please give an example!

    Thank you!
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: How to display and export constraint matrix?

    Posted 06/04/11 07:36 PM

    Originally posted by: SystemAdmin


    Please check the manual!
    The method cplex.exportModel() should do what you want. I think that you can also just pipe your CPLEX object to a stream using the << operator: cout << cplex.

    Tobias
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: How to display and export constraint matrix?

    Posted 06/04/11 07:39 PM

    Originally posted by: SystemAdmin


    // assume model has been built and extracted to IloCplex cplex
    // build model
    cplex.exportModel("mymodel.lp");  // exports model in LP format
    // ... or ...
    cplex.exportModel("mymodel.mps"); // exports model in MPS format
    


    If you want to be able to extract the constraint matrix, right hand side vector etc. separately (perhaps to feed into some other program), the MPS format is probably more suitable.

    Paul

    Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: How to display and export constraint matrix?

    Posted 06/05/11 04:18 PM

    Originally posted by: y82li


    Thank you, Dr. Achterberg and Prof Rubin. Your response is so clear and help me out already.
    #CPLEXOptimizers
    #DecisionOptimization