V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
wuzhyjiu
V2EX  ›  问与答

求大佬指点; lingo 一直报错: Index variables may not share names with other variables

  •  
  •   wuzhyjiu · 2023 年 5 月 23 日 · 559 次点击
    这是一个创建于 1054 天前的主题,其中的信息可能已经有所发展或是发生改变。

    已经困扰了几个晚上了,一直找不出来哪里错了 我的代码: model: sets: S/1..56/:p ; T/1,2,3/; U(S,T):x; endsets data: p=41,45,44,44,26, 44,42,20,20,38, 37,25,45,45,45, 44,20,30,39,35, 38,38,38,25,30, 36,20,24,32,33, 41,33,51,39,20, 20,44,37,38,39, 42,40,37,50,50, 42,43,41,42,45, 42,19,39,75,17,17; enddata min = 680 - @sum(S(i):p(i)*x(i,j)); @for(S(i):@sum(T(j):x(i,j))=1); @for(T(j):@sum(S(i):x(i,j)*p(i))<=680); @for(U(i,j):@bin(x(i,j)));

    目前尚无回复
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2725 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 04:14 · PVG 12:14 · LAX 21:14 · JFK 00:14
    ♥ Do have faith in what you're doing.