芝麻web文件管理V1.00
编辑当前文件:/home/freeclou/resource.optimyar.com/Gams/ProductionInventory.gms
Sets T /t1*t7/ ; Parameters A c(t) h b U cap d(t) ; A = 100; c(t)= uniform(5,10); h = 2; b = 1.5; U = 200; cap = 100; d(t) = uniform(100,300); ; *************** Free Variable Z; Binary Variables x(t) ; Positive Variable Q(t) I(t) L(t) ; *L.fx('t7')=0; L.fx(t)$(ord(t)=card(t))=0; Equations obj cons1 cons2 cons3 ; obj.. z =e= sum(t,A*x(t) + c(t)*Q(t) + h*I(t) + b*L(t)) ; cons1(t).. Q(t) =L= U*x(t); Alias(t,tp); cons2(t).. Q(t) + I(t-1) =e= d(t)+sum(tp$(ord(tp)