Comments (9)
No, my version of SHOT with Cbc seems to solve this problem fine... Can you see the value of varIndex
?
from shot.
varIndex
is 1.
osiInterface->getColLower()[varIndex]
is -1.79769e+308, so that seems to be some mismatch about what is -infinity.
from shot.
#76 should fix this as well I assume. Can you verify @svigerske?
from shot.
No, I still get that one.
from shot.
Hmm... Cannot still reproduce this, but the asserts are there for a reason, because I noticed there was some issues with Cbc not saving the variable limits.
Can you try to set Model.Variables.Continuous.MaximumUpperBound=1e+10
and Model.Variables.Continuous.MinimumLowerBound=-1e+10
and see if that helps. I believe the "infinity" value in Cbc is 1e+50, which is set here, but perhaps that has changed.
from shot.
Yes, that makes the assert go away.
So that means that if SHOT sets the lower bound to -1e10, then Cbc accepts and keeps it, probably assuming that this really means -1e10 and is not just some proxy for -infinity.
But if one passes on -1e50, then Cbc turns this into a -1e308 (actually COIN_DBL_MAX = (std::numeric_limits< double >::max)()
).
This is where Clp changes everything below -1e27 to -COIN_DBL_MAX:
There is this line in MIPSolverCbc.cpp, which may then use a wrong constant:
double MIPSolverCbc::getUnboundedVariableBoundValue() { return 1e50; }
If I change this to 1e27, things also work. I guess that's the same reason why setting the parameter to 1e10 worked - it's still a finite bound for Cbc. But I suspect that this means that when there is an unbounded variable in SHOT, then it will have a very large finite bound for the MIP solver?
from shot.
Yes, the same is true for Gurobi and Cplex as well afaik: infinity is 1e+20. So perhaps I will change this into
double MIPSolverCbc::getUnboundedVariableBoundValue() { return 1e27; }
(or should it rather be 1e26 since there is strict inequality in the Clp code?).
from shot.
1e26 or 1e27 doesn't really matter. For both values, the solver will assume that the variable has a finite bound. If you want Cbc to handle the variable as unbounded, then you need to set it to something above 1e27.
Setting it to COIN_DBL_MAX would help to avoid the assert for unbounded variables, but Cbc will then set any (finite) bound above 1e27 to COIN_DBL_MAX.
Setting it to nextafter(1e27, DBL_MAX)
could make sense. But one would still need to adapt the assert to allow that if a Cbc bound is set to nextafter(1e27, DBL_MAX)
, then it will internally be changed to COIN_DBL_MAX.
from shot.
When I'm thinking about it everything except the assert works well now. I am afraid that if I change the logic behind this things might break down (for example, with regards to the infeasibility repair, unbounded MIP iterations, etc.). I think I will disable the assert for now, close this issue and create a new issue to look into changing the Cbc max variable bound to 1e27.
from shot.
Related Issues (20)
- building SHOT with CMAKE and MSVC HOT 3
- Compiling on Arch Linux HOT 4
- How to install with homebrew on Macos? HOT 1
- creating a optimization problem with SHOT HOT 2
- Constant Objective Function Cause ASL Error HOT 3
- Description of Model.Reformulation.Constraint.PartitionNonlinearTerms option HOT 1
- Compilation error HOT 4
- How can I specify solver options in Pyomo? HOT 2
- use of uninit value, probably Results::currentDualBound
- cutOffToUse used uninitialized
- "error while loading shared libraries: libSHOTSolver.so" HOT 1
- invalid read in CbcModel::setBestSolution() HOT 3
- Dual.MIP.NumberOfThreads ignored for Gurobi HOT 5
- cannot create std::vector larger than max_size() HOT 3
- Make error with cplex as subsolver HOT 7
- Problems finding spdlog and cppad HOT 1
- Simple problem with non-optimal solution HOT 6
- SHOT 1.1 doesn't have Windows binary HOT 1
- CPLEX not found in compiling
- Compile ld.lld: error: undefined symbol: __android_log_write HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shot.