Decision Optimization

Decision Optimization

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

 View Only
  • 1.  erreur: request for member 'getsize'

    Posted Wed June 24, 2009 06:46 PM

    Originally posted by: SystemAdmin


    [ammoun84 said:]

    hello,
    i had an error when compiling my program.
    i declared Lq as array:

    IloNumArray Lq(env);
    .
    .
    .
    and i used it as shown:
    for(q= 1; q <= N ; q++)<br />  {
      for(l=1; l<= Lq[q].getsize(); l++)<br /> {
    .....

    i get this error:
    [color=red]erreur: request for member 'getsize' in 'Lq. IloNumArray::operator[](q)', which is of non-class type 'double'[/color]

    i understood that "getsize" can't be used in this context..
    someone have an idea???


    Thanks
     
    #ConstraintProgramming-General
    #DecisionOptimization


  • 2.  Re: erreur: request for member 'getsize'

    Posted Thu June 25, 2009 05:33 PM

    Originally posted by: SystemAdmin


    [Didier Vidal said:]

    Lq[q] returns an IloNum (you can see it as a double).
    If you want to know the size of Lq, you should use Lq.getSize()

    But from your code, it seems that you want a 2 dimension array, not a 1 dimension one. If this is the case, you might consider using an IloArray<IloNumArray>

    Didier.
    #ConstraintProgramming-General
    #DecisionOptimization


  • 3.  Re: erreur: request for member 'getsize'

    Posted Tue July 07, 2009 02:28 PM

    Originally posted by: SystemAdmin


    [ammoun84 said:]

    Hi,
    Thank you for replying Sir...
    i declare Lq as two dimensional array as you told me...
    IloArray<IloNumArray>

    but another error occured:

    [color=red]'getsize' : is not a member of 'IloArray<class IloNumArray>'[/color]

    what shall i do??

    Thank you.
    #ConstraintProgramming-General
    #DecisionOptimization


  • 4.  Re: erreur: request for member 'getsize'

    Posted Wed July 08, 2009 12:26 PM

    Originally posted by: SystemAdmin


    [alain.chabrier said:]

    Don't you miss the upper case 'S' ?

    Alain
    #ConstraintProgramming-General
    #DecisionOptimization


  • 5.  Re: erreur: request for member 'getsize'

    Posted Wed July 08, 2009 02:16 PM

    Originally posted by: SystemAdmin


    [ammoun84 said:]

    I replaced "s" by " S" but the problem still occured..
    i changed the definition of my array..i declare it IloIntArray ( because i found that .getsize is a member of IloIntArray and not of IloNumVar..)

    this error occured:
    [color=red]left of '.GetSize' must have class/struct/union type.[/color]

    what that mean???
    #ConstraintProgramming-General
    #DecisionOptimization