Search found 149 matches

by bussieck
13 hours ago
Forum: Modeling
Topic: Error 141 and Error 143 in optimization for devices' capacity
Replies: 3
Views: 25

Re: Error 141 and Error 143 in optimization for devices' capacity

Again, HP Williams is a good source for piecewise linear approximations and how to model them. There are a couple of example in the GAMS Model Library, e.g. https://www.gams.com/latest/gamslib_ml/ ... nspwl.html.

-Michael
by bussieck
18 hours ago
Forum: Modeling
Topic: Error 141 and Error 143 in optimization for devices' capacity
Replies: 3
Views: 25

Re: Error 141 and Error 143 in optimization for devices' capacity

You can't write constraints like this in GAMS: if((ud11=0)and(ud12=0)and(ud13=0), ud1.fx=1; else ud1.fx=0;); GAMS requires your to rewrite your constraint without if , and and else . While there are systems that automatically rewrite this for you they often do a poor job. Often you can reuse subexpr...
by bussieck
2 days ago
Forum: Archive Google Group
Topic: tell to GAMS, an element isn't belong to set.
Replies: 1
Views: 38

Re: tell to GAMS, an element isn't belong to set.

The answer is not so clear. When you write " k$ k isn't belong to symAB " could this mean that k is part of the intersection of A and B or the intersection plus the elements that are neither in A nor in B. My code shows what I mean: set N / 1*500 /; set A(N) /45*200/, B(N) /39*443/, C(N) /12*187/; s...
by bussieck
2 days ago
Forum: Syntax
Topic: Add Heuristic to CPLEX Bender's decomposition under GAMS
Replies: 1
Views: 57

Re: Add Heuristic to CPLEX Bender's decomposition under GAMS

BCH works for Cplex' branch-and-cut, not for Benders. Moreover, Cplex does not provide callbacks to add user cuts or post heuristic solution as stated here https://www.ibm.com/developerworks/community/forums/html/topic?id=be0578fb-1dcb-4f6b-9e99-0667fe9028e6 . It is not so difficult to build your ow...
by bussieck
3 days ago
Forum: Modeling
Topic: Cannot get optimal solution for a very simple model
Replies: 1
Views: 65

Re: Cannot get optimal solution for a very simple model

That is not surprising. Conopt, Ipopt, Snopt, ... are local solvers. They terminate in a local optimum (KKT conditions are fulfilled). You see this in the model status: **** MODEL STATUS 2 Locally Optimal . You need a solver with a global perspective to get the global optimum for a non-convex proble...
by bussieck
3 days ago
Forum: Modeling
Topic: A little help
Replies: 3
Views: 56

Re: A little help

Juan, I still don't get the problem. You try to explain by example. It really helps if you have you math straight. Try to explain the problem in as few words as possible or better mathematics. The latter one can be very easily translated into GAMS. If you have a short and consistent problem definiti...
by bussieck
4 days ago
Forum: Modeling
Topic: A little help
Replies: 3
Views: 56

Re: A little help

Hi,

You might want to pin-point us to the part of the solution you don't like (e.g. that you have two arcs with flow coming out if v4 (v4->v7, v4->v8)) and why the equations your though about are "no luck".

-Michael
by bussieck
6 days ago
Forum: Modeling
Topic: Accelerate Bender's decomposition using CPLEX
Replies: 2
Views: 83

Re: Accelerate Bender's decomposition using CPLEX

I am not sure I understand the question "if I am doing it the right way". But with BendersStrategy=3 you use Benders by putting the discrete variables in the first stage and the rest in the second stage. Benders requires all discrete variables to be in the first stage, but perhaps some continuous va...
by bussieck
1 week ago
Forum: Solvers
Topic: Ranging report output to the cplex.opt
Replies: 1
Views: 222

Re: Ranging report output to the cplex.opt

From the GAMS/Cplex docs (https://www.gams.com/latest/docs/S_CPLEX.html#CPLEXobjrng): Range information will be printed to the beginning of the solution listing in the GAMS listing file unless option RngRestart is specified. Check your Mitchell.lst file. This should have a section after the solution...
by bussieck
1 week ago
Forum: Syntax
Topic: variable syntax problem
Replies: 7
Views: 143

Re: variable syntax problem

So if the variable only shows up squared in the model then it is a "naming" issue. Just call the variable Vsqr and after the solve you get the value of V by taking sqrt of Vsqr and decide about the sign.

-Michael