最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

two dimensional variable in pyomo - Stack Overflow

programmeradmin6浏览0评论

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?

发布评论

评论列表(0)

  1. 暂无评论