Search found 7876 matches

by Archiver
8 years ago
Forum: Archive Google Group
Topic: How do I call the gams solvers with a .gms but without openning gams ? (python)
Replies: 8
Views: 8157

Re: How do I call the gams solvers with a .gms but without openning gams ? (python)

<r><br/> Thank's!<br/> I changed my code and before this code I defined:<br/> <br/> gamspath= "F:\Otim\correct"<br/> filename= "F:\Otim\correct\El_GrV03.gms"<br/> <br/> but still gives error: <br/> "Runtime error <br/> Traceback (most recent call last):<br/> File "", line 47, in <br/> File "C:\Pytho...
by Archiver
8 years ago
Forum: Archive Google Group
Topic: How do I call the gams solvers with a .gms but without openning gams ? (python)
Replies: 8
Views: 8157

Re: How do I call the gams solvers with a .gms but without openning gams ? (python)

<r><br/> Hola Sofía: <br/> <br/> Py error is pretty clear: "NameError: name 'gamspath' is not defined". <br/> <br/> In the code you are reusing, probably Lucas defined gamspath as a string holding the path to a folder where the .gms file is to be found and where the output will be placed. <br/> <br...
by Archiver
8 years ago
Forum: Archive Google Group
Topic:
Replies: -1
Views:

Run a gams file in background with python

<r><br/> Hi!<br/> I'm working with ArcGis program who read python scripts.<br/> I need to run in background a gams file, .gms but I don't know how can I do this.<br/> I searched at the internet and I saw this in this forum:<br/> startupinfo = subprocess.STARTUPINFO()<br/> startupinfo.dwFlags |= subp...
by Archiver
8 years ago
Forum: Archive Google Group
Topic: How do I call the gams solvers with a .gms but without openning gams ? (python)
Replies: 8
Views: 8157

Re: How do I call the gams solvers with a .gms but without openning gams ? (python)

<r><br/> Hi!<br/> I'm trying to do the same, but what's the gamspath? When I run your code it gives me an error at this line "output = subprocess.Popen("gams " + gamspath + "\\" + filename + ".gms Lo=2 Lf="+ gamspath + "\\" + filename +"solved.txt" , stdout=subprocess.PIPE, startupinfo=startupinfo)"...
by Archiver
8 years ago
Forum: Archive Google Group
Topic:
Replies: -1
Views:

Re: SOS1

<r><br/> Dear Ehsan,<br/> <br/> I know that paper. In the GAMS website you can find information about how to define and use that type of variables. How to specifically use this type of variables depends on your model and what you want to achieve. Attached please find the link to another useful docum...
by Archiver
8 years ago
Forum: Archive Google Group
Topic:
Replies: -1
Views:

Re: SOS1

<r><br/> <br/> Dear Pedro<br/> <br/> Thank you my friend. Unfortunately I can't find relation between the document mentioned in the gams user guide and my work.<br/> My research is similar to the paper " An SOS1-Based Approach for Solving MPECs with a Natural Gas Market Application " <br/> <br/> -- ...
by Archiver
8 years ago
Forum: Archive Google Group
Topic:
Replies: -1
Views:

Re: SOS1

<r><br/> Dear Ehsan,<br/> <br/> Please check the online documentation in <URL url="http://www.gams.com">www.gams.com</URL>, specifically:<br/> <br/> <URL url="https://www.gams.com/help/topic/gams.doc/userguides/mccarl/specially_ordered_set_variables_of_type_1_%28sos1%29.htm?cp=0_2_1_20_0_2"><LINK_TE...
by Archiver
8 years ago
Forum: Archive Google Group
Topic:
Replies: -1
Views:

Variable Index when using summation

<r><br/> Hey<br/> <br/> <br/> I am implementing a program on IGDT which requires the summation index to be variable. I want to define a set which is variable. The equation is attached as a image file.<br/> <br/> Please help on how to write this index.<br/> <br/> Thanking you<br/> Raunak Agrawal<br/>...
by Archiver
8 years ago
Forum: Archive Google Group
Topic:
Replies: -1
Views:

Second Order Conic Programming

<t><br/> I am doing an optimization on a grid. I am using a second order conic programming. <br/> <br/> I am programming in GAMS using MOSEK as a solver.<br/> <br/> I have my problem formulated, I just have problem expressing it in GAMS. <br/> <br/> You will see what I need to express on the photo.<...
by Archiver
8 years ago
Forum: Archive Google Group
Topic:
Replies: -1
Views:

SOS1

<r><br/> Does anyone can help me to implement the SOS1 variables in gams<br/> <br/> Positive variable<br/> <br/> U<br/> Vp<br/> Vn<br/> g<br/> DualVar<br/> <br/> U = (DualVar+(G-g))/2;<br/> <br/> Vp-Vn = (DualVar-(G-g))/2; <br/> <br/> U - (Vp+Vn) =0;<br/> <br/> Although it doesn't give me any error ...