## Search found 103 matches

- 2 weeks ago
- Forum: Syntax
- Topic: Could not spawn gamscmex error
- Replies:
**3** - Views:
**190**

### Re: Could not spawn gamscmex error

Roys, Fred's comment on running out of memory points to one likely cause. But if that's the case then GAMS should be giving you some sort of message and a cleaner exit. The output you have sent makes me suspect it could be some other sort of limit hit internally - we should be detecting and handling...

- 3 weeks ago
- Forum: Modeling
- Topic: Converting to Mixed Inter
- Replies:
**1** - Views:
**279**

### Re: Converting to Mixed Inter

Hello,

It is quite common that the variables x_s have some finite upper bounds U_s. In practice, it's important that these bounds be small. For example, 100 is small. 1e10 is not small.

With these bounds, you can do:

x_s <= U_s * b_s

This is a typical big-M MIP formulation.

-Steve

It is quite common that the variables x_s have some finite upper bounds U_s. In practice, it's important that these bounds be small. For example, 100 is small. 1e10 is not small.

With these bounds, you can do:

x_s <= U_s * b_s

This is a typical big-M MIP formulation.

-Steve

- 1 month ago
- Forum: Solvers
- Topic: Using Branch and Bound in Cplex
- Replies:
**3** - Views:
**1373**

### Re: Using Branch and Bound in Cplex

Hello,

Why does your instructor want you to solve with branch & bound?

-Steve

Why does your instructor want you to solve with branch & bound?

-Steve

- 1 month ago
- Forum: Syntax
- Topic: Equation Set Condition
- Replies:
**1** - Views:
**531**

### Re: Equation Set Condition

Hello, What you have will work in principle, although you should use ord() and an 'or' instead of 'and': EQ2(i,j)$(ord(j) = 1) or (ord(j) = 4).. X(i,j)=e=B(i,j); to get the complement of the tuples from EQ1. If it is really your intention to cover all the i,j tuples using one of the two equations th...

- 1 month ago
- Forum: Syntax
- Topic: Sum of Rows = Sum of Columns
- Replies:
**5** - Views:
**309**

### Re: Sum of Rows = Sum of Columns

It would make it easier to help if you followed the posting rules:

app.php/rules

app.php/rules

- 1 month ago
- Forum: Syntax
- Topic: Sum of Rows = Sum of Columns
- Replies:
**5** - Views:
**309**

### Re: Sum of Rows = Sum of Columns

Hi, Often, if you have a square matrix Q(i,j), the sets i and j are the same, e.g. you have alias(i,j). In this case, to force Q to be symmetric, you could do: equation forceSym(i,j); forceSym(i,j)$[ord(i) < ord(j)].. Q(i,j) =e= Q(j,i); Note that if you have such a constraint, you could enforce the ...

- 1 month ago
- Forum: Modeling
- Topic: Problem with constraint in MCP
- Replies:
**4** - Views:
**384**

### Re: Problem with constraint in MCP

Hello, Just following up on this issue. The problem has been analyzed and fixed by the PATH team (thanks Todd!). The fix will be available with PATH 5.0.2 released with the next GAMS distribution. Until that is released, please run this model with preprocessing turned off, as described earlier in th...

- 1 month ago
- Forum: Modeling
- Topic: Problem with constraint in MCP
- Replies:
**4** - Views:
**384**

### Re: Problem with constraint in MCP

Hi, I got the same results you did, and they didn't make sense to me either. I ran PATH without the preprocessor and then PATH returned a different (and consistent) solution. You can do the same thing by creating an option file path.opt with this line: preprocess 0 and tell PATH to use this option f...

### Re: Subsets

Gunners,

If you need to essentially have a subset of j defined for each value of i, the GAMS way to do this is with what I call a mapping set. The attached code illustrates what I mean.

-Steve

If you need to essentially have a subset of j defined for each value of i, the GAMS way to do this is with what I call a mapping set. The attached code illustrates what I mean.

-Steve

- 1 month ago
- Forum: Syntax
- Topic: Error 2- Identifier Expected
- Replies:
**13** - Views:
**745**

### Re: Error 2- Identifier Expected

Zohreh, GAMS does its calculations in double-precision arithmetic - there is no calculating "up to 2 digits" or anything like that. However, the listing file displays values in rounded form. Also, solvers do their calculations with tolerances, so an equation like LHS <= RHS is not satisfied exactly,...