## Search found 128 matches

13 hours ago
Forum: API
Topic: Solvers error when calling from MatLab
Replies: 2
Views: 58

### Re: Solvers error when calling from MatLab

Hi
The error message has a typo, therefore the option doesn't work.
It should be plural (as you can see if you try it out in the error message you get)

option subsystems;

Hope this helps
Renger
4 days ago
Forum: Syntax
Topic: Sum limits
Replies: 1
Views: 51

### Re: Sum limits

Hi If you have a sets that uses numbers instead of strings, you can sum as follows: set i /1*10/; sum(i\$(i.val > 5), x(i)); .val gives you the numerical value of the set element (which is treated as a string, even when it is a number, so you can't use \$(i >5)). If you have strings as set elements, y...
5 days ago
Forum: Modeling
Topic: Parameter of different length
Replies: 1
Views: 104

### Re: Parameter of different length

Hi Hussain This might be done in a while condition and a loop using as well as a condition on which values to assign to the small parameter. set t /1*10/, sh /1*50/; parameter large(sh) small(t); large(sh) = uniform(0,1); parameter count /1/; * Inititalize small, so if there are not enough values th...
1 week ago
Forum: Modeling
Topic: Iterative models/ Dynamic sets
Replies: 3
Views: 101

### Re: Iterative models/ Dynamic sets

Hi Leon Instead of having everything based on the hours, you make them depending on hours (1*24) and days (1*31). You then loop over the days: loop(day, assing parameter values from tables solve mymodel assign solution to other parameters ) e.g. A parameter is also defined over days and hours table ...
1 week ago
Forum: Solvers
Topic: HELP: error - superbasics limit is too small !!!
Replies: 3
Views: 172

### Re: HELP: error - superbasics limit is too small !!!

Hi Have a look here how to set options for a solver https://www.gams.com/latest/docs/UG_SolverUsage.html. (under "The Solver Options File") and set the superbasics limit to a different value. (From the SNOPT documentation: "The performance of GAMS/SNOPT is controlled by a number of parameters or "op...
1 week ago
Forum: Solvers
Topic: HELP: error - superbasics limit is too small !!!
Replies: 3
Views: 172

### Re: HELP: error - superbasics limit is too small !!!

Hi
You probably have to increase this limit. Take a look at the snopt manual how to do this.
Cheers
Renger
1 week ago
Forum: Modeling
Topic: GAMS parameter issue
Replies: 4
Views: 182

### Re: GAMS parameter issue

Hi Hussain

Although you describe your problem well, it is hard to help as you don't show the code.
Try at least to reproduce the problem in a small example and send it to the forum if your code is too big.

Cheers

Renger
2 weeks ago
Forum: Syntax
Replies: 2
Views: 121

Hi If you want to sum over i leaving out the element j, you can do this as follows: myeq(j) A(j) =E= sum(i\$(not sameas(i,j), X(i,j)); How can you ensure that they start from the depot is, so I believe already part of your model: sum((i2(j),m), x('%depot%',j)\$offdiag0)) =e= 1; (i must to be diferent ...
2 weeks ago
Topic: Initial values for solves within a loop.
Replies: 3
Views: 799

### Re: Initial values for solves within a loop.

Hi If you really want to start from scratch, you might use put commands in a loop over the values from the original table input(t,instance) to write a batch file that would look a little bit like this, : call gams mygamsfile --myparam1 = 1 --myparam2 =2 call gams mygamsfile --myparam1 = 3 --myparam2...
3 weeks ago
Forum: Modeling
Topic: Division by zero for division of two continuous variables
Replies: 4
Views: 134

### Re: Division by zero for division of two continuous variables

Hi Here it is exactly the same problem: you did not initialize DmaxF, so add DmaxF.l(t) = 1; and it works. You don't need a loop for assigning values to x and y. As long as the index of the variables on the LHS is equal to the RHS in the assignment, without a loop the assignment works well. Cheers R...