Topic
  • 1 reply
  • Latest Post - ‏2014-05-19T07:43:23Z by AlexFleischer
m.i.907
m.i.907
7 Posts

Pinned topic index out of array

‏2014-05-18T12:16:52Z |

Hi all,

Could you please help me with this model? I get an error message for one of the constraints and don't know how to solve it.

Thanks in advance.

Melike

Attachments

Updated on 2014-05-18T13:29:34Z at 2014-05-18T13:29:34Z by m.i.907
  • AlexFleischer
    AlexFleischer
    1918 Posts

    Re: index out of array

    ‏2014-05-19T07:43:23Z  

    Hi,

    for cons3 can you try to protect out of bounds for Time with

    forall(k in Freight, j in DCities, m in Mode, t in Periods )
        cons3:
          sum(i in CCities:
          (intValue(i) in 1..nbMode)  &&
          (t-Time[intValue(i)][intValue(j)][intValue(m)] in Periods) )
            (x[i][j][k][m][t-Time[intValue(i)][intValue(j)][intValue(m)]]) ==Demand[intValue(k)][intValue(j)][t]-  e [k][j][t];

     

    Regards