IBM Support

RS00643: ILONUMVARARRAY::SETBOUNDS() DOESN'T WORK CORRECTLY IF THE NUM VARS INITIAL BOUND ARE DIFFERENT FROM 0..ILOINFINITY

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • IloNumVarArray::setBounds() doesn't work correctly if the num
    vars initial bound are different from 0..IloInfinity
    
    Consider the example below that leads to all vars in
    IloNumVarArray end-up with same bound. Issue is that when num
    var array is created with common bounds that is different from
    0..Infinity then shared domains are created but setBounds
    routine doesn't clone the shared domain before changing the
    values.
    
    int main() {
      const int n = 5;
      IloEnv env;
      try{
    IloNumVarArray x(env, n, -IloInfinity, IloInfinity,
    IloNumVar::Float); //doesn't work
    //IloNumVarArray x(env, n, 0, IloInfinity); //<--- works
    //IloNumVarArray x(env, n, 0, 0); //doesn't work
    IloNumArray lb(env);
    IloNumArray ub(env);
    for(int i=0; i<n; i++) {
    lb.add(-i);
    ub.add(i);
    cout<<"Setting lb[]="<<lb[i]<<"; ub[]="<<ub[i]<<endl;
    //x[i].setLB(-i);x[i].setUB(i);//workaround 1
    //x[i].setBounds(-i,i);//workaround 2
    }
    x.setBounds(lb, ub);
    cout<<"Retrieved bound values"<<endl;
    for(int i=0; i<n; i++) {
    cout<<"x["<<i<<"]: LB="<<x[i].getLB()<<";
    UB="<<x[i].getUB()<<endl;
    }
      }
       catch (IloException& e) {
          cerr << "Concert exception caught: " << e << endl;
       }
       catch (...) {
          cerr << "Unknown exception caught" << endl;
       }
      env.end();
    }
    

Local fix

  • Please refer to the sample in the APAR description. The
    workarounds involve setting the bounds individually for every
    variable in the IloNumVarArray. This can either be done using
    the setLB() and setUB() methods or the setBounds() method for
    the individual variables. The workarounds have been commented in
    the sample.
    

Problem summary

  • setBounds() routine on IloNumVarArray modifies bounds
    incorrectly if initial bounds are not 0..IloInfinity
    

Problem conclusion

  • This issue has been resolved and fix is in CPLEX Optimization
    Studio v12.3
    

Temporary fix

Comments

APAR Information

  • APAR number

    RS00643

  • Reported component name

    CPLEX OPTI STUD

  • Reported component ID

    5725A0600

  • Reported release

    C20

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-04-28

  • Closed date

    2011-07-29

  • Last modified date

    2011-07-29

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    CPLEX OPTI STUD

  • Fixed component ID

    5725A0600

Applicable component levels

  • RC20 PSN

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSSA5P","label":"IBM ILOG CPLEX Optimization Studio"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"12.2","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
29 July 2011