Search found 13 matches
- 3 years ago
- Forum: Modeling
- Topic: SOCP constraints
- Replies: 2
- Views: 2694
Re: SOCP constraints
The left-hand side of each constraint shows the two-norm of a vector. See the following link, which will help you transform them. Also, you'll want to use the sqrt() and power() commands in GAMS. Alternatively, you can square both sides and avoid the sqrt() representation. https://mathworld.wolfram....
- 3 years ago
- Forum: Solvers
- Topic: Why is GAMS stucked at an elapsed time during searching for a solution?
- Replies: 9
- Views: 6904
Re: Why is GAMS stucked at an elapsed time during searching for a solution?
To verify that it's not your computer, try solving it via the NEOS Optimization Server. There's an 8 hour time limit on jobs (if I recall correctly), and you can't write output files, but you can get the GDX output returned to you!
- 3 years ago
- Forum: Modeling
- Topic: QCP under CPLEX
- Replies: 3
- Views: 2799
Re: QCP under CPLEX
The reason is because the function is not convex. In standard form for an NLP, it's
x^2 + y^2 - z^2 <= 0
The function has a Hessian that is indefinite, having eigenvalues equal to 1, 1, and -1. Thus, the function is not convex.
x^2 + y^2 - z^2 <= 0
The function has a Hessian that is indefinite, having eigenvalues equal to 1, 1, and -1. Thus, the function is not convex.
- 3 years ago
- Forum: Syntax
- Topic: Clear variables and parameters to perform a loop
- Replies: 2
- Views: 3547
Re: Clear variables and parameters to perform a loop
The parameters won't change because they are... parameters... unless you modify them within the loop.
As for the variables, just reset their levels to zero to affect a cold start.
For example...
x.l=0;
y.l=0;
As for the variables, just reset their levels to zero to affect a cold start.
For example...
x.l=0;
y.l=0;
- 3 years ago
- Forum: Modeling
- Topic: Integral of demand function
- Replies: 1
- Views: 2395
Re: Integral of demand function
Don't bother with Simpson's Rule. Just use either the Left Hand Rule or Right Hand Rule. They're easier to implement and, as the width of the intervals approaches zero, the numerical integration approaches the exact value, anyway. (Just use a very small interval.)
- 3 years ago
- Forum: Modeling
- Topic: ARIMA model in GAMS
- Replies: 5
- Views: 3877
Re: ARIMA model in GAMS
Thank you for the clarification! (I also use GAMS as a "first choice" tool, whenever possible.) I haven't coded any forecast model identification problem, but it's surely possible. It would require hard coding the process (via loops or a similar structure) of altering model parameters, rec...
- 3 years ago
- Forum: Modeling
- Topic: Constraint problem with maximum
- Replies: 1
- Views: 2264
Re: Constraint problem with maximum
The easiest way is to break (15) into three constraints, each of which uses a term within the set to impose a lower bound on x. For the second such constraint, instead of a max operator, index the constraint on i.
A similar scheme can be applied for (16).
A similar scheme can be applied for (16).
- 3 years ago
- Forum: Modeling
- Topic: ARIMA model in GAMS
- Replies: 5
- Views: 3877
Re: ARIMA model in GAMS
It may be possible, and I work with GAMS weekly, but it's easier to do in R. Try the forecast package by Hyndman! The R software is free, the package is free, and the techniques are well documented in his text, which is available free online at https://otexts.com/fpp2/ It's worth investigating the a...
- 3 years ago
- Forum: Syntax
- Topic: Is it possible to calculate an integral in GAMS?
- Replies: 2
- Views: 2296
Re: Is it possible to calculate an integral in GAMS?
Whereas Simpson's Rule or even the Trapezoid Rule are theoretically preferable to the Left Hand Rule or Right Hand Rule, one can just integrate with a higher granularity (i.e., smaller intervals) and use one of the simpler approaches. A "loop" structure works nicely, incrementally adding t...
- 4 years ago
- Forum: Modeling
- Topic: Subtour elimination
- Replies: 3
- Views: 2523
Re: Subtour elimination
It's not a conversion. They are alternatives. You need to read the text by Ahuja (1993), read a published article on MTZ constraints, or read one of the articles on MTZ enhancements. The three articles below are a starting point for your research. Laporte, G. (1986). Generalized subtour elimination ...