What is wrong with this forall -statement in CPLEX?

柔情痞子 提交于 2019-12-19 11:58:09

问题


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:


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.



来源:https://stackoverflow.com/questions/13291906/what-is-wrong-with-this-forall-statement-in-cplex

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!