Search found 8 matches
- 6 years ago
- Forum: Modeling
- Topic: Neos Server using BARON
- Replies: 0
- Views: 2541
Neos Server using BARON
Hi, I run a model through neos-server. I chose BARON solver to find the global optimum but I got messages with star sign on the left, please see the attachment. What does it mean? Are these points local optimum? and how can I use them? If one of them is the global optimum how I see the rest of resul...
- 6 years ago
- Forum: Syntax
- Topic: Equation based on set number
- Replies: 2
- Views: 3102
Re: Equation based on set number
Hi Renger, Thank you for your help Hi This is not a problem for Gams. For i = 2, it writes the equation as Z1(i).. X_V_ce("2") =e= 0; If you want another formulation for this case, you could use the cardinality of set i (the number of elements): Z1(i).. X_V_ce(i) =e= X_V_ce(i+1)$(ord(i) ne...
- 6 years ago
- Forum: Syntax
- Topic: Equation based on set number
- Replies: 2
- Views: 3102
Equation based on set number
Hi,
I defined a set and a parameter as
one of the constraints is
How it can be defined, i cannot be set i+1 !!
What can I do to add 1 or 2 to an element?
Regards
I defined a set and a parameter as
Code: Select all
Sets i /1, 2/;
Positive Variable X_V_ce(i);
Code: Select all
Z1(i).. X_V_ce(i) =e= X_V_ce(i+1) + ....
What can I do to add 1 or 2 to an element?
Regards
- 6 years ago
- Forum: Modeling
- Topic: call external function
- Replies: 6
- Views: 5389
Re: call external function
thank you, Micheal, for your time. I saw the code and even your codes. I should confess GAMS is the most complicated programming languages I have ever seen! Unfortunately, it's like decoding... even the guides don't provide any clear explanation. I don't know why. When I google GAMS tutorial or sour...
- 6 years ago
- Forum: Modeling
- Topic: call external function
- Replies: 6
- Views: 5389
Re: call external function
When I changed the code: $FuncLibIn gams_fun mylib\gamsfun I got this: Entry not found: QueryLibrary in mylib\gamsfun.dll again the file is not loaded properly. GAMS can work with a DLL (but this needs to provide a special function API). See external equations (https://www.gams.com/24.9/docs/UG_Exte...
- 6 years ago
- Forum: Modeling
- Topic: call external function
- Replies: 6
- Views: 5389
Re: call external function
$FuncLibIn gams_fun mylib/gamsfun the dll file is "gamsfun.dll" and the error is: Problem occured when trying to load mylib/gamsfun64.ll I don't know why 64 is added at the end! GAMS can work with a DLL (but this needs to provide a special function API). See external equations (https://www...
- 6 years ago
- Forum: Modeling
- Topic: call external function
- Replies: 6
- Views: 5389
Re: call external function
Michael, The function - callfun(x2) - get x2 and then return an int value. It has no derivation. I tried to make dll in c# like this Public static int callfun(int x_in) { x_in = x_in + 1 Return x_in } When I imported it through $Funlibin, I encountered a problem regarding loading error. In guideline...
- 6 years ago
- Forum: Modeling
- Topic: call external function
- Replies: 6
- Views: 5389
call external function
Hi,
I want to define a constraint like this:
x1 + callfun(x2) =E= 1;
callfun(x2) is a function exists in MATLAB directory.
Is it possible to call it from GAMS?
if no, MATLAB code can be converted to C# (dll) and then the dll can be used as an external function?
Thank you
I want to define a constraint like this:
x1 + callfun(x2) =E= 1;
callfun(x2) is a function exists in MATLAB directory.
Is it possible to call it from GAMS?
if no, MATLAB code can be converted to C# (dll) and then the dll can be used as an external function?
Thank you