Hi Clemens,
thank you so much for your answer, this really helps me a lot! I had looked into the documentation, but without understanding my mistake. So it would probably have taken me a long time to find the solution...
Best regards,
Luis
Search found 8 matches
- 5 years ago
- Forum: API
- Topic: Embedded Python code - Import parameter with gams.get
- Replies: 2
- Views: 5265
- 5 years ago
- Forum: API
- Topic: Embedded Python code - Import parameter with gams.get
- Replies: 2
- Views: 5265
Embedded Python code - Import parameter with gams.get
Hi all, I am stuck with the gams.get method. In particular, I am not able to use the parameters defined in GAMS in the Python section. For instance, I have tried the following: parameter ParA; ParA = 5; $onEmbeddedCode Python: ParA = int(gams.get("ParA")) $offEmbeddedCode I get the followi...
- 5 years ago
- Forum: Tools
- Topic: Gnuplot axis range (GNUPLOTXYZ.GMS)
- Replies: 0
- Views: 3373
Gnuplot axis range (GNUPLOTXYZ.GMS)
Hi all, I would like to plot the results from a GAMS model using gnuplotxyz . Is there a way to define the range of an axis with a parameter? At the moment, I am using a fixed value as in this example: $setglobal gp_style 'points' $setglobal gp_xrange '0 : 50000' $setglobal gp_yrange '0 : 50000' $li...
- 6 years ago
- Forum: Modeling
- Topic: Create all combinations of multiple parameters
- Replies: 4
- Views: 4759
Re: Create all combinations of multiple parameters
dirkse,
Thank you very much for the additional information! Mapping sets was actually my first idea, but I failed with the implementation and decided that a loop would be easier.
Thank you very much for the additional information! Mapping sets was actually my first idea, but I failed with the implementation and decided that a loop would be easier.
- 6 years ago
- Forum: Modeling
- Topic: Create all combinations of multiple parameters
- Replies: 4
- Views: 4759
Re: Create all combinations of multiple parameters
Hello Michael, thank you so much for your answer, this is exactly what I was looking for. I just did not know how to go through the indexing set. For instance, I was not aware that I could do this: nn('1')=yes; What I am trying to do with this is rearranging and aggregating some scenarios which are ...
- 6 years ago
- Forum: Modeling
- Topic: Create all combinations of multiple parameters
- Replies: 4
- Views: 4759
Create all combinations of multiple parameters
I have three parameters each depending on a different set, for example: Parameter par1(i) / 1 100 2 100 / ; Parameter par2(j) / 1 100 2 100 / ; Parameter par3(k) / 1 100 2 100 / ; Now I would like to have all of the parameter values depending on a single set n. In other words, I would like to create...
- 6 years ago
- Forum: Modeling
- Topic: Solving a quadratic problem using Lagrange multipliers
- Replies: 0
- Views: 2588
Solving a quadratic problem using Lagrange multipliers
Hi all, I would like to solve the following quadratic optimization problem: b1.JPG Solving this model with CONOPT works very well. However, I would also like to solve it using Lagrange multipliers. So I formulate the Lagrange functions and set the derivatives to zero: b2.JPG b3.JPG I had thought tha...
- 6 years ago
- Forum: Modeling
- Topic: Local sensitivity analysis at optimum
- Replies: 0
- Views: 2595
Local sensitivity analysis at optimum
Dear all, I would like to study the impact of a small variation of the optimal variables in an equlibrium problem. My question is related to this older thread Jacobian at optimal condition . It is explained there how to obtain the Jacobian matrix using the Convert utility of GAMS (at the example of ...