Search found 8 matches

by Hefeng Zhai
4 years ago
Forum: Solvers
Topic: How to set the default solver for gams studio 27.3?
Replies: 2
Views: 19014

How to set the default solver for gams studio 27.3?

hello,everyone!

I know that gameside is able to set default solver,but How to set the default solver for gams studio 27.3?

Anyone can help me?
by Hefeng Zhai
6 years ago
Forum: Modeling
Topic: Random sampling problem of Stochastic Programming
Replies: 2
Views: 2946

Re: Random sampling problem of Stochastic Programming

Thanks a lot, I will try it.
Best Regards~~
by Hefeng Zhai
6 years ago
Forum: Modeling
Topic: Random sampling problem of Stochastic Programming
Replies: 2
Views: 2946

Random sampling problem of Stochastic Programming

Hello, everyone when I do a simple SP problem, when running the problem, the result show that unknown keywords sample,can anyone help? Best regards The code are as fllows: variables y objective Cvmax valve maximum Positive Variables Cv valve; Scalars P1 "inlet pressure of liquid flow rate"...
by Hefeng Zhai
6 years ago
Forum: Syntax
Topic: Max operator in MINLP
Replies: 1
Views: 2756

Re: Max operator in MINLP

I am trying to model MINLP formulation in which I need to use max operator to find the maximum between two values like max(a,b) so it should either give a or b depending on whichever is maximum. However, in my model a is a variable and b is constant value so can someone suggest me how to use max fu...
by Hefeng Zhai
6 years ago
Forum: Modeling
Topic: Unit commitment - Stntax for min run/down time
Replies: 6
Views: 6519

Re: Unit commitment - Stntax for min run/down time

There may be the program code you want. Please see attached file.

Best Regards!
by Hefeng Zhai
6 years ago
Forum: Syntax
Topic: Logic assignment for parameters
Replies: 3
Views: 4419

Re: Logic assignment for parameters

This seems to work: set n /1*10/; parameter Mn(n) /#n 0/; loop(n, Mn(n)$(mod(n.val,2)=1) = n.val-2 + Mn(n-((n.val+1)/2)) + Mn(n-((n.val-1)/2)); Mn(n)$(mod(n.val,2)=0) = n.val-2 + 2*Mn(n-(n.val/2)); ); display Mn; This gives: ---- 7 PARAMETER Mn 1 -1.000, 2 -2.000, 3 -2.000, 4 -2.000, 5 -1.000, 7 1....
by Hefeng Zhai
6 years ago
Forum: Syntax
Topic: Logic assignment for parameters
Replies: 3
Views: 4419

Logic assignment for parameters

I’m trying to use the following logic to assign parameters for Mn(n) For n=1to 100 by 1; Mn(1)=0, Mn(2)=0, is the initial value; If n is odd, then Mn(n)=n-2+ Mn( (n-1)/2 ) + Mn( (n+1)/2 ) ; If n is even, then Mn(n)=n-2+ 2*Mn( (n)/2 ); I am trying to run the following model, but I am not successful. ...