Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  How to creat a three-dimensional array in C/C++ of using CPLEX?

    Posted 05/21/15 04:07 AM

    Originally posted by: cplexbigfan


    Hello, everyone,

    I am using CPLEX to solve an optimization problem.  In the program, I have to creat a three-dimensional array in C/C++, but I  don't know how to do this.

    Can anyone help me this? 

    Thank you in advance.


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: How to creat a three-dimensional array in C/C++ of using CPLEX?

    Posted 05/26/15 01:40 AM

    Please search this Forum for an answer. This question has been asked and answered multiple times before.

    Building three-dimensional arrays for plain data types should be straightforward in C++.

    For building three-dimensional arrays of Ilo objects you could make use of the IloArray<> template:

    typedef IloArray<IloArray<IloArray<IloNumVar> > > IloNumVar3D;

    There are more sophisticated ways to do that, you will find them if you search this Forum.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: How to creat a three-dimensional array in C/C++ of using CPLEX?

    Posted 05/26/15 02:44 AM

    Originally posted by: cplexbigfan


    Thank you for your answer, Daniel.


    #CPLEXOptimizers
    #DecisionOptimization