Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  How to create an array of IloCplex instances in java

    Posted 02/18/10 07:29 PM

    Originally posted by: gizem


    Hi,

    I wanna have an array of IloCplex objects.

    This:

    int n=5;
    IloCplex[] cplex = new IloCplex[n]();

    or this:

    IloCplex[] cplex = new IloCplex()[n];

    did not work and I couldn't find anything online. Could somebody please help me?
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: How to create an array of IloCplex instances in java

    Posted 02/19/10 01:09 AM

    Originally posted by: SystemAdmin


    Note that this is a Java question :-)
    You create an array of objects like this:
    int n = 5;
     
    IloCplex[] cplex = new IloCplex[n];
    for (int i = 0; i < n; ++i)
        cplex[i] = new IloCplex(env);
    

    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: How to create an array of IloCplex instances in java

    Posted 02/19/10 08:02 AM

    Originally posted by: SystemAdmin


    > dju358 wrote:
    > Note that this is a Java question :-)
    ...
    >
    > cplex[i] = new IloCplex(env);

    Except there's no 'env' in Java (one of its many advantages :-) ).

    /Paul
    #CPLEXOptimizers
    #DecisionOptimization