Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

how to define a matrix using IloNumArray in c++?

  • 1.  how to define a matrix using IloNumArray in c++?

    Posted Wed November 19, 2008 12:25 AM

    Originally posted by: SystemAdmin


    [billdoors said:]

    hi,
    [i]IloNumArray m(env,10)[/i] has no problem
    but I need to define a 10x9 matrix
    any one know how? Thank you

    I tried

    IloNumArray m(env,10);
    for (i=0;i<10;i++)<br />{
    m[i]=IloNumArray(env,9);
    }

    but this is wrong, said illegal use IloNumArray... Thanks a lot
    #ConstraintProgramming-General
    #DecisionOptimization


  • 2.  Re: how to define a matrix using IloNumArray in c++?

    Posted Wed November 19, 2008 01:05 AM

    Originally posted by: SystemAdmin


    [alain.chabrier said:]

    HI,

    m needs to be 2 dimensions.

    I think
    IloNumArray2 m(env, 10);
    will do the trick.

    Alain
    #ConstraintProgramming-General
    #DecisionOptimization


  • 3.  Re: how to define a matrix using IloNumArray in c++?

    Posted Wed November 19, 2008 04:31 AM

    Originally posted by: SystemAdmin


    [billdoors said:]

    thank you man~~~~~~
    #ConstraintProgramming-General
    #DecisionOptimization