For GAMS model library model gasnet, I get an assert failing in the first updateProperties call (
):
|
assert(properties.numberOfNumericConstraints |
|
== properties.numberOfLinearConstraints + properties.numberOfQuadraticConstraints |
|
+ properties.numberOfNonlinearConstraints); |
The problem is that there are 2 quadratic constraints that have no quadratic terms, so they are not accounted in
|
for(auto& C : quadraticConstraints) |
|
{ |
|
if(C->properties.hasQuadraticTerms) |
|
{ |
|
properties.numberOfQuadraticConstraints++; |
|
|
|
if(C->properties.convexity == E_Convexity::Convex) |
|
properties.numberOfConvexQuadraticConstraints++; |
|
else |
|
properties.numberOfNonconvexQuadraticConstraints++; |
|
} |
|
} |
These are
qbal(s0): -Q(s1) -3*b(c1) +600 <= 0
crdef(c1,s0,s1): -Pd(s1) +500*CR(c1) <= 0
This might be due to the quadratic terms becoming linear due to variable fixing (e.g., q.fx('s0') = 600).
Does this need some change in the GAMS interface, or in Problem.cpp ?
Similarly, on GAMS model library model hda, this assert is failing:
|
assert(C->variablesInNonlinearExpression.size() > 0); |
Constraint
antdistb(1,27,ch4)_rf became
+(-15.2243) <= -15.2243 after applying variable fixings.
I believe that the GAMS interface creates fixed variables as variables and does not fold constants in expressions. Somewhere there may be a simplification step that forgets to move constraints into different categories when necessary?
For GAMS model library model gasnet, I get an assert failing in the first
updatePropertiescall (SHOT/src/Model/Problem.cpp
Line 923 in cf7ec3a
SHOT/src/Model/Problem.cpp
Lines 699 to 701 in cf7ec3a
The problem is that there are 2 quadratic constraints that have no quadratic terms, so they are not accounted in
SHOT/src/Model/Problem.cpp
Lines 651 to 662 in cf7ec3a
These are
This might be due to the quadratic terms becoming linear due to variable fixing (e.g.,
q.fx('s0') = 600).Does this need some change in the GAMS interface, or in Problem.cpp ?
Similarly, on GAMS model library model hda, this assert is failing:
SHOT/src/Model/Problem.cpp
Line 684 in cf7ec3a
Constraint
antdistb(1,27,ch4)_rfbecame+(-15.2243) <= -15.2243after applying variable fixings.I believe that the GAMS interface creates fixed variables as variables and does not fold constants in expressions. Somewhere there may be a simplification step that forgets to move constraints into different categories when necessary?