Topic
  • 3 replies
  • Latest Post - ‏2013-07-17T13:21:56Z by AlexFleischer
ostaz
ostaz
4 Posts

Pinned topic Tuple with index out of bound

‏2013-07-17T09:55:17Z |

Hi everyone,

Assume I ahev a tuple like this

Market{

int org;

int dst

};

and a constraint label d[Maket] associated with Market. Initially, the tuple Market is empty.

I add a new element (a,b) to the tuple Market by Market.add(a,b) and the new elements is added correctly.

Neverthless, when processing d[Market] in the OPL script, an error message arose "index out of bound for array d"

 

Is there any mean to fix this problem?

 

  • AlexFleischer
    AlexFleischer
    1857 Posts

    Re: Tuple with index out of bound

    ‏2013-07-17T12:02:59Z  

    Hi,

     

    can you attach your model ?

     

    regards

  • ostaz
    ostaz
    4 Posts

    Re: Tuple with index out of bound

    ‏2013-07-17T12:52:19Z  

    Hi,

     

    can you attach your model ?

     

    regards

    The problem is decomposed into two subproblems that are solved iteratively. The second subproblem (not given here) serves to determine the element of Markets1 to be added to Markets2. Then a constraint is added to the first model and solved again.

    Sincerely yours

    Attachments

  • AlexFleischer
    AlexFleischer
    1857 Posts

    Re: Tuple with index out of bound

    ‏2013-07-17T13:21:56Z  
    • ostaz
    • ‏2013-07-17T12:52:19Z

    The problem is decomposed into two subproblems that are solved iteratively. The second subproblem (not given here) serves to determine the element of Markets1 to be added to Markets2. Then a constraint is added to the first model and solved again.

    Sincerely yours

    Hi,

     

    you will find an example of solve and then change the model and solve again in

     

    https://www.ibm.com/developerworks/community/forums/html/topic?id=243675ee-3045-41b5-ada9-d1613686b44c&ps=25

     

    Regards