Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SET n /One, Two, Three/
- t /One, Two, Three/;
- PARAMETER
- c(n) /one 5 , two 9 , three 13/
- q(n) /one 4 , two 3 , three 8/;
- POSITIVE VARIABLES x(n,t), mu(n,t), lambda(n,t);
- EQUATIONS KKT(n,t), sl(n,t);
- KKT(n,t).. 0 =e= c(n) + mu(n,t) + lambda(n,t);
- sl(n,t).. 0 =e= mu(n,t)*(x(n,t) - q(n))
- MODEL problem /ALL/;
- SOLVE problem using MCP;
- Output:
- GAMS 24.7.4 r58773 Released Sep 19, 2016 WEX-WEI x86 64bit/MS Windows 05/04/18 14:52:16 Page 1
- G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
- C o m p i l a t i o n
- 1 SET n /One, Two, Three/
- 2 t /One, Two, Three/;
- 3 PARAMETER
- 4 c(n) /one 5 , two 9 , three 13/
- 5 q(n) /one 4 , two 3 , three 8/;
- 6 POSITIVE VARIABLES x(n,t), mu(n,t), lambda(n,t);
- 7 EQUATIONS KKT(n,t), sl(n,t);
- 8 KKT(n,t).. 0 =e= c(n) + mu(n,t) + lambda(n,t);
- 9 sl(n,t).. 0 =e= mu(n,t)*(x(n,t) - q(n))
- 10 MODEL problem /ALL/;
- 11 SOLVE problem using MCP;
- 12
- 13
- COMPILATION TIME = 0.016 SECONDS 3 MB 24.7.4 r58773 WEX-WEI
- GAMS 24.7.4 r58773 Released Sep 19, 2016 WEX-WEI x86 64bit/MS Windows 05/04/18 14:52:16 Page 2
- G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
- Equation Listing SOLVE problem Using MCP From line 11
- ---- KKT =E=
- KKT(One,One).. - mu(One,One) - lambda(One,One) =E= 5 ; (LHS = 0
- , INFES = 5 ****)
- KKT(One,Two).. - mu(One,Two) - lambda(One,Two) =E= 5 ; (LHS = 0
- , INFES = 5 ****)
- KKT(One,Three).. - mu(One,Three) - lambda(One,Three) =E= 5 ;
- (LHS = 0, INFES = 5 ****)
- REMAINING 6 ENTRIES SKIPPED
- ---- sl =E=
- sl(One,One).. (0)*x(One,One) + (4)*mu(One,One) =E= 0 ; (LHS = 0)
- sl(One,Two).. (0)*x(One,Two) + (4)*mu(One,Two) =E= 0 ; (LHS = 0)
- sl(One,Three).. (0)*x(One,Three) + (4)*mu(One,Three) =E= 0 ; (LHS = 0)
- REMAINING 6 ENTRIES SKIPPED
- GAMS 24.7.4 r58773 Released Sep 19, 2016 WEX-WEI x86 64bit/MS Windows 05/04/18 14:52:16 Page 3
- G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
- Column Listing SOLVE problem Using MCP From line 11
- ---- x
- x(One,One)
- (.LO, .L, .UP, .M = 0, 0, +INF, 0)
- (0) sl(One,One)
- x(One,Two)
- (.LO, .L, .UP, .M = 0, 0, +INF, 0)
- (0) sl(One,Two)
- x(One,Three)
- (.LO, .L, .UP, .M = 0, 0, +INF, 0)
- (0) sl(One,Three)
- REMAINING 6 ENTRIES SKIPPED
- ---- mu
- mu(One,One)
- (.LO, .L, .UP, .M = 0, 0, +INF, 0)
- -1 KKT(One,One)
- (4) sl(One,One)
- mu(One,Two)
- (.LO, .L, .UP, .M = 0, 0, +INF, 0)
- -1 KKT(One,Two)
- (4) sl(One,Two)
- mu(One,Three)
- (.LO, .L, .UP, .M = 0, 0, +INF, 0)
- -1 KKT(One,Three)
- (4) sl(One,Three)
- REMAINING 6 ENTRIES SKIPPED
- ---- lambda
- lambda(One,One)
- (.LO, .L, .UP, .M = 0, 0, +INF, 0)
- -1 KKT(One,One)
- lambda(One,Two)
- (.LO, .L, .UP, .M = 0, 0, +INF, 0)
- -1 KKT(One,Two)
- lambda(One,Three)
- (.LO, .L, .UP, .M = 0, 0, +INF, 0)
- -1 KKT(One,Three)
- REMAINING 6 ENTRIES SKIPPED
- **** Unmatched variable not free or fixed
- x(One,One)
- **** Unmatched variable not free or fixed
- x(One,Two)
- **** Unmatched variable not free or fixed
- x(One,Three)
- **** Unmatched variable not free or fixed
- x(Two,One)
- **** Unmatched variable not free or fixed
- x(Two,Two)
- **** Unmatched variable not free or fixed
- x(Two,Three)
- **** Unmatched variable not free or fixed
- x(Three,One)
- **** Unmatched variable not free or fixed
- x(Three,Two)
- **** Unmatched variable not free or fixed
- x(Three,Three)
- **** Unmatched variable not free or fixed
- mu(One,One)
- **** Unmatched variable not free or fixed
- mu(One,Two)
- **** Unmatched variable not free or fixed
- mu(One,Three)
- **** Unmatched variable not free or fixed
- mu(Two,One)
- **** Unmatched variable not free or fixed
- mu(Two,Two)
- **** Unmatched variable not free or fixed
- mu(Two,Three)
- **** Unmatched variable not free or fixed
- mu(Three,One)
- **** Unmatched variable not free or fixed
- mu(Three,Two)
- **** Unmatched variable not free or fixed
- mu(Three,Three)
- **** Unmatched variable not free or fixed
- lambda(One,One)
- **** Unmatched variable not free or fixed
- lambda(One,Two)
- **** Unmatched variable not free or fixed
- lambda(One,Three)
- **** Unmatched variable not free or fixed
- lambda(Two,One)
- **** Unmatched variable not free or fixed
- lambda(Two,Two)
- **** Unmatched variable not free or fixed
- lambda(Two,Three)
- **** Unmatched variable not free or fixed
- lambda(Three,One)
- **** Unmatched variable not free or fixed
- lambda(Three,Two)
- **** Unmatched variable not free or fixed
- lambda(Three,Three)
- **** Counts do not match
- Single equations in unmatched =E= blocks 18
- Unmatched single free variables 0
- **** Unmatched free variables = 0
- **** Unmatched =E= equations = 18
- KKT(One,One)
- KKT(One,Two)
- KKT(One,Three)
- KKT(Two,One)
- KKT(Two,Two)
- KKT(Two,Three)
- KKT(Three,One)
- KKT(Three,Two)
- KKT(Three,Three)
- sl(One,One)
- sl(One,Two)
- sl(One,Three)
- sl(Two,One)
- sl(Two,Two)
- sl(Two,Three)
- sl(Three,One)
- sl(Three,Two)
- sl(Three,Three)
- GAMS 24.7.4 r58773 Released Sep 19, 2016 WEX-WEI x86 64bit/MS Windows 05/04/18 14:52:16 Page 4
- G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m
- Model Statistics SOLVE problem Using MCP From line 11
- MODEL STATISTICS
- BLOCKS OF EQUATIONS 2 SINGLE EQUATIONS 18
- BLOCKS OF VARIABLES 3 SINGLE VARIABLES 27
- NON ZERO ELEMENTS 36 NON LINEAR N-Z 18
- DERIVATIVE POOL 20 CONSTANT POOL 19
- CODE LENGTH 64
- GENERATION TIME = 0.015 SECONDS 4 MB 24.7.4 r58773 WEX-WEI
- **** SOLVE from line 11 ABORTED, EXECERROR = 28
- EXECUTION TIME = 0.015 SECONDS 4 MB 24.7.4 r58773 WEX-WEI
- USER: GAMS Development Corporation, Washington, DC G871201/0000CA-ANY
- Free Demo, 202-342-0180, sales@gams.com, www.gams.com DC0000
- **** FILE SUMMARY
- Input C:\Users\apfan\Documents\A (School)\General ISE\Research\KKT_research
- .gms
- Output C:\Users\apfan\Documents\gamsdir\projdir\KKT_research.lst
- **** USER ERROR(S) ENCOUNTERED
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement