What is wrong with this forall -statement in CPLEX?

后端 未结 1 1365
借酒劲吻你
借酒劲吻你 2021-01-16 23:52

I am trying to answer here but err:

   forall(t in 0..4){
    a[t]<=z[t];
    -a[t]<=z[t];
    x[t+1]==x[t]+v[t];
    v[t+1]==v[t]+a[t];
   }                   


        
1条回答
  •  离开以前
    2021-01-17 00:21

    The recursive equation enters into un-initialized interval hence index out of exeption. You can avoid this bug by tweaking: initialize not-needed valuations and assign them to zero.

    This creates some overhead but simplifies the logic, cannot think about any simpler way to do this.

    0 讨论(0)
提交回复
热议问题