GAMS 基础语法
例子程序:
?????????? SETS
?????? I?? canning plants?? / SEATTLE, SAN-DIEGO /
?????? J?? markets????????? / NEW-YORK, CHICAGO, TOPEKA / ;
? PARAMETERS
?????? A(I)? capacity of plant i in cases
???????? /??? SEATTLE???? 350
????????????? SAN-DIEGO?? 600? /
?????? B(J)? demand at market j in cases
???????? /??? NEW-YORK??? 325
????????????? CHICAGO???? 300
????????????? TOPEKA????? 275? / ;
? TABLE D(I,J)? distance in thousands of miles
??????????????????? NEW-YORK?????? CHICAGO????? TOPEKA
????? SEATTLE????????? 2.5?????????? 1.7????????? 1.8
????? SAN-DIEGO??????? 2.5?????????? 1.8????????? 1.4? ;
? SCALAR F? freight in dollars per case per thousand miles? /90/ ;
? PARAMETER C(I,J)? transport cost in thousands of dollars per case ;
??????????? C(I,J) = F * D(I,J) / 1000 ;
? VARIABLES
轉載于:https://www.cnblogs.com/end/archive/2012/03/10/2389433.html
《新程序員》:云原生和全面數字化實踐50位技術專家共同創作,文字、視頻、音頻交互閱讀總結
- 上一篇: sock编程(一)
- 下一篇: 记ThoughtWorks面试失败之旅