Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  (Concert, Java) How to get IloLPMatrix object from an active model

    Posted 05/28/10 01:29 AM

    Originally posted by: Heungjo


    I am trying to use Concert Technology with Java.
    I read the problem instance from a MPS file.

    cplex.importModel("model.mps");

    After reading the problem instance, I would like to populate the matrix information to change some part of it.
    Based on the API document, it seems that I have to use IloLPMatrix object.
    But, I am not sure how I can get IloLPMatrix object from the active model.

    Could somebody help me?

    Thank you.
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: (Concert, Java) How to get IloLPMatrix object from an active model

    Posted 05/28/10 02:59 AM

    Originally posted by: SystemAdmin


    You are right, the constraints will be stored as IloLPMatrix in the model after reading the model from a file. A model can comprise of multiple IloLPMatrix instances (though in your case there should only be one). To iterate over these instances use
    for (Iterator it = cplex.LPMatrixIterator(); it.hasNext(); /* nothing */) {
       IloLPMatrix matrix = (IloLPMatrix)it.next();
       ...
    }
    

    Or, if you are sure that there is exactly one such instance (like in your case) just do
    IloLPMatrix matrix = (IloLPMatrix)cplex.LPMatrixIterator().next();
    

    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: (Concert, Java) How to get IloLPMatrix object from an active model

    Posted 05/28/10 05:51 PM

    Originally posted by: Heungjo


    Thank you so much for fast answer.
    I really appreciate that.
    #CPLEXOptimizers
    #DecisionOptimization