first of all: I am new to GAMS and have only worked with OPL/CPLEX before but was not required to switch languages due to preferences of my professor.
I am currently dealing with the task of implementing a cutting plane approach for solving an LP. This means that I
- solve a subproblem
- evaluate the results
- add a cutting plane (i.e. a constraint) to my problem
- loop until an ending condition is met.
I was able to implement a few simpler problems on my own, but am now struggling with this task. The problem is that I do not know how to define a parameter step by step.
I have defined a set
Code: Select all
Set
j
/j1 * j3/
Code: Select all
Parameter all_g(*, j);
Code: Select all
Parameter g(j) Subgradient
Code: Select all
Scalar k /1/;
What I need to do now is to add the computed single parameter g(j) to the "set of parameters" all_g(*,j) so what I'd like to do is something like
Code: Select all
all_g(k, j) = g(j);
Can anybody tell me what my mistake is or how I might implement such an iterative approach in GAMS?
Thanks in advance!