wuzhyjiu
V2EX  ›  问与答

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

  •  
  •   wuzhyjiu · May 23, 2023 · 629 views
    This topic created in 1091 days ago, the information mentioned may be changed or developed.

    已经困扰了几个晚上了,一直找不出来哪里错了 我的代码: 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)));

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1219 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 23:21 · PVG 07:21 · LAX 16:21 · JFK 19:21
    ♥ Do have faith in what you're doing.