I want to define a two dimensional variable, X_t^i in Pyomo, while i<=t. I don't know if the second index could be defined dependent on the first index to satisfy : i<= t. So far, I have defined X as: model.X = Var(model.t, range(1, T ), within=Reals) and I have defined a function if i>t: model.X[t,i]==0. Is there anyway to define it directly?
two dimensional variable in pyomo - Stack Overflow
评论列表(0)
- 暂无评论