Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  variable defined as IloNumVarArray

    Posted 11/16/11 10:52 AM

    Originally posted by: beckywang


    I have defined a variable xp = IloNumVarArray(env, totNum, 0, IloInfinity). My question is: does that define xp as positive? or Is there still a need to define a constraint con.add(xp >=0) in the model?
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: variable defined as IloNumVarArray

    Posted 11/16/11 01:58 PM

    Originally posted by: SystemAdmin


    > I have defined a variable xp = IloNumVarArray(env, totNum, 0,
    > IloInfinity). My question is: does that define xp as positive? or Is
    > there still a need to define a constraint con.add(xp >=0) in the model?

    Your declaration looks fine, and fits the following form of a IloNumVarArray declaration:
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    public IloNumVarArray(const IloEnv env, IloInt n, IloNum lb, IloNum ub, IloNumVar::Type type=ILOFLOAT)
    This constructor creates an extensible array of n numeric variables in env with lower and upper bounds and type as specified. The instances of IloNumVar to fill this array are constructed at the same time.
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    Consequently you need not add the (xp>=0) constraint.
    #CPLEXOptimizers
    #DecisionOptimization