Search found 10 matches
- 1 month ago
- Forum: Syntax
- Topic: $ifThen set X or Y
- Replies: 2
- Views: 5145
Re: $ifThen set X or Y
Thanks Michael!
- 1 month ago
- Forum: Syntax
- Topic: $ifThen set X or Y
- Replies: 2
- Views: 5145
$ifThen set X or Y
Hello,
Is there a way to execute the following condition when solving a model?
X and Y are compilation variables, and either one exists at a time.
Thanks,
Zamry
Is there a way to execute the following condition when solving a model?
Code: Select all
$ifThen set X or Y
Solve MODEL using nlp minimizing OBJ;
$else
Solve MODEL using lp minimizing OBJ;
$endIf
Thanks,
Zamry
- 1 year ago
- Forum: Modeling
- Topic: GUSS Grid for parallizeable timeseries NLP
- Replies: 4
- Views: 1721
Re: GUSS Grid for parallizeable timeseries NLP
The alias definitely works but I'm still solving the entire timepoints in each loop. In a toy problem shown below, I'm expecting to solve only t1 in the first loop, and only t2 in the second loop. option LP = cbc; option limrow = 0; option limcol = 0; option solprint = off; option dispwidth = 20; Se...
- 1 year ago
- Forum: Modeling
- Topic: GUSS Grid for parallizeable timeseries NLP
- Replies: 4
- Views: 1721
Re: GUSS Grid for parallizeable timeseries NLP
Hi Fred, Thanks for replying. My rough idea to form the loop is as follows, loop(t, Solve Model using NLP minimizing z_obj; ); However, GAMS does not permit any controlling set inside the body of the loop since the scenario t constitutes the construct of my model. Seems like the only way to go for m...
- 1 year ago
- Forum: Modeling
- Topic: GUSS Grid for parallizeable timeseries NLP
- Replies: 4
- Views: 1721
GUSS Grid for parallizeable timeseries NLP
Hello, I solve timeseries NLPs of 6 million variables in GAMS using the IPOPTH solver. The same model base is used for various objective analyses. The model is discretized at a 1 hr interval over a 24 hour duration. There exist some optional temporal constraints that link between subsequent timepoin...
- 2 years ago
- Forum: Modeling
- Topic: Parallel model generation
- Replies: 2
- Views: 1772
Re: Parallel model generation
Hi Michael, Thank you for this useful insight. My model is indeed huge, containing almost 23 million non-zero elements and 12 million nonlinear non-zero elements. Here is the model statistics: MODEL STATISTICS BLOCKS OF EQUATIONS 88 SINGLE EQUATIONS 6,674,951 BLOCKS OF VARIABLES 34 SINGLE VARIABLES ...
- 2 years ago
- Forum: Modeling
- Topic: Parallel model generation
- Replies: 2
- Views: 1772
Parallel model generation
I'm solving large-scale non-convex NLPs that typically consist of 6-10 million equalities. On average, the model generation time is 10 min and the solve time is 15 min, so the model generation itself becomes a performance bottleneck. Some sets of equalities are complex and take a long time to genera...
- 2 years ago
- Forum: Syntax
- Topic: Sequence solve stages using one model instance
- Replies: 0
- Views: 5657
Sequence solve stages using one model instance
Hello, I'm solving large-scale power flow problems (NLPs) in GAMS. On average, a problem consists of 5 million variables in which the model generation time alone takes about 10 min. My strategy involves two solve stages: Stage 1: solve model X (converged in 50 min), Stage 2: re-solve model X with so...
- 2 years ago
- Forum: Syntax
- Topic: Compilation of $ifThenE statement
- Replies: 2
- Views: 2359
Re: Compilation of $ifThenE statement
Thank you Michael. Your response cleared things up.
Zamry
Zamry
- 2 years ago
- Forum: Syntax
- Topic: Compilation of $ifThenE statement
- Replies: 2
- Views: 2359
Compilation of $ifThenE statement
Hello, I have an issue with the code block below. The logic $ifThenE cleanup_solve>0 picks up the original 0 value of the scalar, but not the updated value. Any suggestion to make the $ifThenE picking the updated postsolve value ? Scalar postsolve / 0 /; postsolve = card(devices); $ifThenE postsolve...