scipopt / scip Goto Github PK
View Code? Open in Web Editor NEWSCIP - Solving Constraint Integer Programs
License: Other
SCIP - Solving Constraint Integer Programs
License: Other
Hello Team,
I apologize if this is not the best place to post this request for help; having spent a few days trying to read documentation and figure out what to do. I need to get the entire search tree used during computation of a solution to an LP. This tree I assume would have unexplored nodes, pruned nodes etc. Is this possible on SCIP? Thanks for your help and guidance.
I compiled SCIP 7.0.3 on Mac and I am coding on C++.
I am very excited to use SCIP v8.0.3 under the Apache 2 license in a commercial product. When do you expect to schedule 8.0.3's release? I am asking so that I can plan around it in upcoming releases of my software.
If this is a question better directed to [email protected], please let me know.
Hello!
I came across a nasty issue when trying to solve a model from an LP file.
As far as I can tell, the SCIPOPT LP parser follows the LP specification of CPLEX:
From testing, I do know (now) that CPLEX does not support constant values within the constraint expressions. The specification itself does not explicitly state this:
This is not the nicest definition, but something that can be worked with.
If CPLEX is presented with an LP file that violates this rule, an error is raised:
invalid.lp
\none
Maximize
var_x
Subject To
var_x - 1 = 0
Bounds
1 <= var_x <= 1
Binary
var_x
End
CPLEX output
CPLEX> read invalid.lp
CPLEX Error 1616: Line 5: Expected identifier, found '='.
No file read.
CPLEX>
If the same LP is given to SCIPOPT, it is read without error, and solved:
SCIPOPT output
SCIP> read C:\temp\scip\invalid.lp
read problem <C:\temp\scip\invalid.lp>
============
original problem has 1 variables (1 bin, 0 int, 0 impl, 0 cont) and 1 constraints
SCIP> optimize
presolving:
presolving (1 rounds: 1 fast, 0 medium, 0 exhaustive):
1 deleted vars, 0 deleted constraints, 0 added constraints, 0 tightened bounds, 0 added holes, 0 changed sides, 0 changed coefficients
0 implications, 0 cliques
presolving detected infeasibility
Presolving Time: 0.00
SCIP Status : problem is solved [infeasible]
Solving Time (sec) : 0.00
Solving Nodes : 0
Primal Bound : -1.00000000000000e+20 (objective limit, 0 solutions)
Dual Bound : +1.00000000000000e+20
Gap : 0.00 %
SCIP simply omits the constant in the constraint expression, and solves the (inconsistent) problem. In this case, the model becomes infeasible by omitting the constant. However, with a slight adjustment to the LB of var_x, the model will become feasible and the result will deviate from the intended/expected solution:
feasible_invalid.lp
\none
Maximize
var_x
Subject To
var_x - 1 = 0
Bounds
0 <= var_x <= 1
Binary
var_x
End
SCIP output (var_x LB = 0)
SCIP> read C:\temp\scip\feasible_invalid.lp
read problem <C:\temp\scip\feasible_invalid.lp>
============
original problem has 1 variables (1 bin, 0 int, 0 impl, 0 cont) and 1 constraints
SCIP> optimize
feasible solution found by trivial heuristic after 0.0 seconds, objective value 0.000000e+00
presolving:
presolving (1 rounds: 1 fast, 0 medium, 0 exhaustive):
1 deleted vars, 0 deleted constraints, 0 added constraints, 1 tightened bounds, 0 added holes, 0 changed sides, 0 changed coefficients
0 implications, 0 cliques
Presolving Time: 0.00
SCIP Status : problem is solved [optimal solution found]
Solving Time (sec) : 0.00
Solving Nodes : 0
Primal Bound : +0.00000000000000e+00 (1 solutions)
Dual Bound : +0.00000000000000e+00
Gap : 0.00 %
If the same file is parsed + solved with, e.g., Gurobi (which supports constants in constraint expressions), the following output is produced:
Gurobi output
gurobi> m = read('feasible_invalid.lp')
Read LP format model from file feasible_invalid.lp
Reading time = 0.00 seconds
: 1 rows, 2 columns, 2 nonzeros
gurobi> m.optimize()
Gurobi Optimizer version 9.5.0 build v9.5.0rc5 (win64)
Thread count: 4 physical cores, 4 logical processors, using up to 4 threads
Optimize a model with 1 rows, 2 columns and 2 nonzeros
Model fingerprint: 0xf7308cbe
Variable types: 1 continuous, 1 integer (1 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [0e+00, 0e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 1 rows and 2 columns
Presolve time: 0.00s
Presolve: All rows and columns removed
Explored 0 nodes (0 simplex iterations) in 0.00 seconds (0.00 work units)
Thread count was 1 (of 4 available processors)
Solution count 2: 1 -0
Optimal solution found (tolerance 1.00e-04)
Best objective 1.000000000000e+00, best bound 1.000000000000e+00, gap 0.0000%
gurobi>
I hope this is the correct address for reporting such an issue. If this is not the case, please let me know where I can/should submit it.
Best Regards,
Jannick
Add a github action to build the SCIP Optimization Suite for different operating systems with the latest version of SCIP. It should be triggered when a tag is added.
Hello, I use or-tools with scip to solve my case. In one case, I get the message "violation: right hand side is violated by 1049.999",
it seems this is a numerical problem. I wonder how to resolve this problem.
[2023-05-30 19:57:41,156] [DEBUG] autorosterplant_model.py [line:545] [autorosterplant_model] - begin solve level 1
[linear] <auto_c_000000152>: +10<underSkillLevel_891_3_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_6189_2_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_61812_4_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_61814_3_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_891_4_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_61811_3_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_999_3_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_891_1_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_61814_2_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_6189_3_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3)
+10<underSkillLevel_6186_1_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_61811_4_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_999_4_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_61815_3_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_61810_3_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_61815_1_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_61815_2_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_61810_1_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_61814_4_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_6186_4_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_6189_4_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_6186_3_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_61810_4_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_61812_3_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_6186_2_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_891_2_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_999_2_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_61812_2_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_61812_1_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_999_1_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_6189_1_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_61810_2_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_61811_1_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_61811_2_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) +10<underSkillLevel_61815_4_3a0682b5-f814-46c3-8614-922161a72876_569>[I] (+3) <= 0.001;
;
violation: right hand side is violated by 1049.999
1/3 feasible solution given by solution candidate storage, new primal bound 4.800000e+04
presolving:
(round 1, fast) 92 del vars, 143 del conss, 0 add conss, 89 chg bounds, 32 chg sides, 0 chg coeffs, 0 upgd conss, 0 impls, 0 clqs
(0.0s) probing cycle finished: starting next cycle
Deactivated symmetry handling methods, since SCIP was built without symmetry detector (SYM=none).
presolving (2 rounds: 2 fast, 1 medium, 1 exhaustive):
92 deleted vars, 157 deleted constraints, 0 added constraints, 89 tightened bounds, 0 added holes, 32 changed sides, 0 changed coefficients
0 implications, 0 cliques
presolved problem has 17 variables (17 bin, 0 int, 0 impl, 0 cont) and 0 constraints
transformed objective value is always integral (scale: 1000)
Presolving Time: 0.00
transformed 1/1 original solutions to the transformed problem space
time | node | left |LP iter|LP it/n|mem/heur|mdpt |vars |cons |rows |cuts |sepa|confs|strbr| dualbound | primalbound | gap | compl.
t 0.0s| 1 | 0 | 0 | - | trivial| 0 | 17 | 0 | 0 | 0 | 0 | 0 | 0 | 3.100000e+04 | 3.100000e+04 | 0.00%| unknown
SCIP Status : problem is solved [optimal solution found]
Solving Time (sec) : 0.00
Solving Nodes : 1
Primal Bound : +3.10000000000000e+04 (2 solutions)
Dual Bound : +3.10000000000000e+04
Gap : 0.00 %
##################################
Good afternoon.
I have created an example model where SCIP finds an optimal solution, but if certain constraints are removed, SCIP claims the model is infeasible.
With these constraints (plus some bound constraints):
And simply deleting the temperature constraints:
Maybe I am not thinking clearly, but it seems that this should not happen. You can see the code here: incorrect_infeasibility.zip.
I have a simple model that has obvious symmetry. Solving the model for whatever number of Power Transformers, should be no more difficult than solving the model for just one, as the solution of one can be copied to the others. SCIP does not detect symmetry in this MINLP.
For PTs = [1,2,3] (so, for 3 Power Transformers), we get the following message:
If we solve the model for 1 Power Transformer, we get this result:
For 3 Power Transformers, we get this:
Notice that the solution for 3 Transformers is 3 times the solution for 1, as it should be. (The variables are also the same) You can find the code here: not_detecting_symmetry.zip
Hello,
SCIPcolGetNLPNonz() returns the number of LP rows a column appears in and SCIPcolGetNNonz() (call this nnz) is the total number of rows a column appears in. SCIPcolGetRows() (call this total) returns an array of rows that a column appears in. In my tests I observed that the first nnz rows returned by this function are in the LP and the remaining (total - nnz) rows are not in the LP. I was wondering if this is always true. Similarly, can we say the first set of columns returned by the SCIProwGetCols() function are in the LP and the remaining ones are not?
Thank you!
When trying to build SCIP in our Vagrant generic/FreeBSD13 box (note a FreeBSD VirtualBox img) we are facing some compilation issue...
here the relevant trace (please notice we are building SCIP using FetchContent from our or-tools CMake based build)
default: [ 48%] Building CXX object _deps/scip-build/src/CMakeFiles/libscip.dir/amplmp/src/os.cpp.o
default: cd /usr/home/vagrant/project/build/_deps/scip-build/src && /usr/bin/c++ -I/usr/home/vagrant/project/build/_deps/scip-src/src/amplmp/include -I/usr/home/vagrant/project/build/_deps/scip-build -I/usr/home/vagrant/project/build/_deps/scip-src/src -I/usr/home/vagrant/project/build/_deps/zlib-build -I/usr/home/vagrant/project/build/_deps/zlib-src -O3 -DNDEBUG -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++14 -MD -MT _deps/scip-build/src/CMakeFiles/libscip.dir/amplmp/src/os.cpp.o -MF CMakeFiles/libscip.dir/amplmp/src/os.cpp.o.d -o CMakeFiles/libscip.dir/amplmp/src/os.cpp.o -c /usr/home/vagrant/project/build/_deps/scip-src/src/amplmp/src/os.cpp
default: /usr/home/vagrant/project/build/_deps/scip-src/src/amplmp/src/os.cpp:108:4: error: GetExecutablePath is not implemented for this system
default: # error GetExecutablePath is not implemented for this system
default: ^
default: 1 error generated.
default: *** Error code 1
default:
default: Stop.
default: make[2]: stopped in /usr/home/vagrant/project/build
default: *** Error code 1
default:
default: Stop.
default: make[1]: stopped in /usr/home/vagrant/project/build
default: *** Error code 1
default:
default: Stop.
default: make: stopped in /usr/home/vagrant/project/build
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
ref: https://github.com/google/or-tools/runs/3672547012?check_suite_focus=true
Lines 107 to 109 in 9444e80
Have support of FreeBSD so we can use it in OR-Tools or at least a dummy function instead of this error message breaking the build ;)
Also it seems that amplmp is only use to read some .nl file so it's sad to break the build for this "optional" feature...
Line 2 in 9444e80
You can found our Vagrantfile here: https://github.com/google/or-tools/blob/master/cmake/vagrant/freebsd/cpp/Vagrantfile
note: I think it should be easy to adapt it to only build SCIP starting from your repo to get rid of or-tools shenanigan and/or add it as a CI job to this repo (if you are willing to use github action workflow) ;)
Hi all. Several months ago I opened an issue on the PySCIPOpt repo containing an example where PySCIPOpt 4.2 (running SCIP 8) incorrectly claimed that a small SOCP was infeasible. Since the issue has seen no activity over there and it probably belongs here, I'm posting just to make sure the SCIP devs are aware.
The relevant issue is: scipopt/PySCIPOpt#583.
Ping @BrannonKing, since he might be interested in this getting resolved.
Hello,
I am writing a software that uses MIP solvers interchangeably and I would like to include SCIP as an option.
I have been looking for an example of how to build a problem and run it without much luck.
The documentation points nowhere, and the MIP example is about reading files. Not exactly what I need.
To be precise:
I would like to pass all the problem information by memory using C-style functions since I need to link scip dynamically.
An example of what I need, but using Highs is this.
Any help figuring how to interface SCIP from C is appreciated.
/usr/local/bin/ld: ../bin/scip: hidden symbol `xlp_conname_exists' in CMakeFiles/scip.dir/scip/reader_zpl.c.o is referenced by DSO
/usr/local/bin/ld: final link failed: bad value
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** [bin/scip] Error code 1
It appears that the cause is that xlp_conname_exists
is defined in both SCIP
and ZIMPL
projects.
OS: FreeBSD 13
clang-11
Sorry to bring up this naive question. I have read the source code of these 2 functions and I know SCIPgetBestChild
returns the best node w.r.t the node selection strategy. However, I can't understand meaning of the attribute tree->childrenprio
in SCIPgetPrioChild
.
Thanks a lot.
Hi everyone,
First of all, thank you for the work and the documentation you have done here, this is great.
When trying to compile the simple example (that I putted in a test file) :
#include <scip/scip.h>
#include <string>
TEST(solver, solver_SCIP_SOPLEX_initializarion)
{
SCIP *scip = NULL;
SCIP_CALL(SCIPcreate(&scip)); // initialize SCIP
SCIPinfoMessage(scip, NULL, "Hello world.\n"); // output greeting
SCIP_CALL(SCIPfree(&scip)); // free SCIP
BMScheckEmptyMemory();
ASSERT_EQ(1, 1);
}
I am faced to a message error:
In member function ‘virtual void solver_solver_SCIP_SOPLEX_initializarion_Test::TestBody()’:
**[...]** error: return-statement with a value, in function returning ‘void’ [-fpermissive]
This can be solved by adding in cmake : set(CMAKE_CXX_FLAGS "-fpermissive -std=c++0x")
. This point solves the issue but is there a better way to solve this problem?
I have 2 questions:
Thanks.
Well I couldn't install ipopt
as Android lacks fortran
compilers & workarounds are beyond me. All were installed in /usr/local
What i can install successfully are papilo
. A bug is resolved as well
git clone https://github.com/scipopt/papilo.git
cd papilo
https://github.com/scipopt/papilo/issues/20
export LDFLAGS="-llog" && cmake -DCMAKE_INSTALL_PREFIX=$PREFIX/local .. && make -j8 && make install
soplex
was as well installed
git clone https://github.com/scipopt/soplex.git
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$PREFIX/local -DPAPILO=on ..
zimpl
was as well installed (very good small language). Its source was in the scioptsuite I couldn't find its separate git. On Android will throw error so link libm.so
as following
cd scipoptsuite-8.0.1/zimpl/build
ln -s /apex/com.android.runtime/lib64/bionic/libm.so $PREFIX/lib/
cmake -DCMAKE_INSTALL_PREFIX=$PREFIX/local .. && make -j8 && make install
Finally build scip
(I didnt use scioptsuite tar ball except for zimpl)
cd scip-8.0.1
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=$PREFIX/local -DIPOPT=off ..
make -j8 && make install
Further notes while configuring scip, I had COIN-OR cpl
installed in my system but still following gets reported, the documentation doesnt refer how to force-enable it -- Support CLP: OFF
scip -v
SCIP version 8.0.1 [precision: 8 byte] [memory: block] [mode: debug] [LP solver: Soplex 6.0.1.3] [GitHash: c84ee4283e]
Copyright (C) 2002-2022 Konrad-Zuse-Zentrum fuer Informationstechnik Berlin (ZIB)
External libraries:
Readline 8.1 GNU library for command line editing (gnu.org/s/readline)
Soplex 6.0.1.3 Linear Programming Solver developed at Zuse Institute Berlin (soplex.zib.de) [GitHash: 713be0fe]
CppAD 20180000.0 Algorithmic Differentiation of C++ algorithms developed by B. Bell (github.com/coin-or/CppAD)
ZLIB 1.2.12 General purpose compression library by J. Gailly and M. Adler (zlib.net)
GMP 6.2.1 GNU Multiple Precision Arithmetic Library developed by T. Granlund (gmplib.org)
ZIMPL 3.5.2 Zuse Institute Mathematical Programming Language developed by T. Koch (zimpl.zib.de)
AMPL/MP 4e2d45c4 AMPL .nl file reader library (github.com/ampl/mp)
PaPILO 2.1.1 parallel presolve for integer and linear optimization (github.com/scipopt/papilo) [GitHash: dea16d4]
bliss 0.77 Computing Graph Automorphism Groups by T. Junttila and P. Kaski (www.tcs.hut.fi/Software/bliss/)
Compiler: clang 14.0.6
Build options:
ARCH=aarch64
OSTYPE=Android-4.19.113-24856341
COMP=Clang 14.0.6
BUILD=RelWithDebInfo
DEBUGSOL=OFF
EXPRINT=cppad
SYM=bliss
GMP=ON
IPOPT=off
WORHP=OFF
LPS=spx
LPSCHECK=OFF
NOBLKBUFMEM=OFF
NOBLKMEM=OFF
NOBUFMEM=OFF
THREADSAFE=ON
READLINE=ON
SANITIZE_ADDRESS=OFF
SANITIZE_MEMORY=OFF
SANITIZE_UNDEFINED=OFF
SANITIZE_THREAD=OFF
SHARED=ON
VERSION=8.0.1.0
API_VERSION=104
ZIMPL=ON
ZLIB=ON
I have a MILP problem that is having trouble running through SCIP with pyscipopt. Two specific variables would occasionally cause an error. The error message is listed below:
[tree.c:1875] ERROR: cannot change bounds of multi-aggregated variable <t_x3377>
[tree.c:2098] ERROR: Error <-9> in function call
[scip_var.c:5388] ERROR: Error <-9> in function call
[presol_implics.c:278] ERROR: Error <-9> in function call
[presol.c:466] ERROR: Error <-9> in function call
[scip_solve.c:1081] ERROR: Error <-9> in function call
[scip_solve.c:1208] ERROR: Error <-9> in function call
[scip_solve.c:1374] ERROR: Error <-9> in function call
[scip_solve.c:2484] ERROR: Error <-9> in function call
[scip_solve.c:2722] ERROR: Error <-9> in function call
[dialog_default.c:2183] ERROR: Error <-9> in function call
[dialog.c:942] ERROR: Error <-9> in function call
[dialog.c:393] ERROR: Error <-9> in function call
[scip_dialog.c:243] ERROR: Error <-9> in function call
[scipshell.c:479] ERROR: Error <-9> in function call
[scipshell.c:533] ERROR: Error <-9> in function call
SCIP Error (-9): method cannot be called with this type of data
The attachment contains my test file. I saved the model in .lp and .cip formats before the error occurred.
test_lp_transform.cip is a file that tranfrom from test.lp. I figured out that the difference between test.cip and test_lp_transform.cip is the order of the variable, which would cause a different presolving result.
test.cip can reproduce the error in scip.
test.lp can be successfully optimized in scip.
test_lp_transform.cip can be successfully optimized in scip.
Hello!
I'm working with various models in the domain of Energy Markets. Some of my models are quite large (tens of millions of variables, millions of constraints) and I'm constantly looking for ways to improve the solving time. I would love to experiment with SCIP but I couldn't find a way to pass the entire problem to the solver with a single function call (well, 3-4 would be ok too but not millions ;)
I developed a generic solver interface for my kind of models, such that at the high level takes network objects (such as Supply/Transport/Demand nodes and Edges) and at the low level passes corresponding variables and constraints down to a solver in the form of ordered lower_bound/upper_bound/cost arrays for variables, and CSC matrix and bounds arrays for constraints.
So far, I managed to integrate my library with
I'm sure a similar method exists in Mosek but I haven't had a chance to integrate with it just yet.
These methods allow me to quickly integrate different solvers through thin driver libraries as my generic library outputs almost exactly what these methods accept. But I can't find any similar function in the C API of SCIP and the need to pass every variable and constraint with a function call holds me back.
I saw this struct_matrix.h in the docs but it seems this structure can only be read from the model once it is all set up and never used to actually create/load a problem.
I hope to be wrong, or let this be a feature request otherwise =)
Thank you!
First, thank you for the work you have done.
The version of CppAD used in SCIP (7.0.3) is 20180000.0. I tried to update the cppad folder contents inside the source codes, and it didn't work. I wonder if updating this library improves SCIP's performance? How can I update this library if there is improvement?
Hi, I found bug on SCIP concurrentopt function. I compiled IPOPT with HSL libraries contains HSL_MA97 which use OpenMP for parallel computation. I configure SCIP to use HSL_MA97 via command "set nlpi ipopt linear_solver ma97". When I try to start concurrentopt fails. I think, this problem hard to fix but some explanation can be added for wrong settings. Thanks for for your hard work.
Mr Matthias suggested me to create an issue here. I understand that there has have already been a huge amount of issues that have been resolved with regards to installation, but something seems to be going haywire in my installation process and I am very keen to understand why and how to resolve it. Please, if you could see the my doings below.
On downloading scip-8.0.0 from the official website, and following the commands listed here: https://github.com/scipopt/scip/blob/master/INSTALL.md. I get a weird error:
-- Build shared libraries: ON
-- Build type: Release
-- Finding ZLIB
-- Finding ZLIB - found
-- Finding Readline
-- Finding Readline - found
-- Finding GMP
-- Finding GMP - found
-- Finding PAPILO
CMake Error at CMakeLists.txt:298 (find_package):
Could not find a package configuration file provided by "PAPILO" with any
of the following names:
PAPILOConfig.cmake
papilo-config.cmake
Add the installation prefix of "PAPILO" to CMAKE_PREFIX_PATH or set
"PAPILO_DIR" to a directory containing one of the above files. If "PAPILO"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
I was wondering if you could please help me resolve this?
Many thanks for your time on this.
When I compile and install scipoptsuite-8.0.3 on centos7, an error occurs as follows:
[ 4%] Linking CXX executable unit_test
CMakeFiles/unit_test.dir/TestMain.cpp.o: In functionCatch::TestGroupStats::~TestGroupStats()': TestMain.cpp:(.text+0xd34): undefined reference to
operator delete(void*, unsigned long)'
CMakeFiles/unit_test.dir/TestMain.cpp.o: In functionCatch::TestRunStats::~TestRunStats()': TestMain.cpp:(.text+0xdb4): undefined reference to
operator delete(void*, unsigned long)'
CMakeFiles/unit_test.dir/TestMain.cpp.o: In functionCatch::Matchers::Exception::ExceptionMessageMatcher::match(std::exception const&) const': TestMain.cpp:(.text+0xf15): undefined reference to
std::__cxx11::basic_string<char, std::char_traits, std::allocator >::compare(char const*) const'
CMakeFiles/unit_test.dir/TestMain.cpp.o: In functionCatch::(anonymous namespace)::parseSpecialTag(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': TestMain.cpp:(.text+0xfc2): undefined reference to
std::__cxx11::basic_string<char, std::char_traits, std::allocator >::compare(char const*) const'
TestMain.cpp:(.text+0xfd9): undefined reference tostd::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(char const*) const' TestMain.cpp:(.text+0xff5): undefined reference to
std::__cxx11::basic_string<char, std::char_traits, std::allocator >::compare(char const*) const'
TestMain.cpp:(.text+0x1011): undefined reference tostd::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(char const*) const' CMakeFiles/unit_test.dir/TestMain.cpp.o:TestMain.cpp:(.text+0x102d): more undefined references to
std::__cxx11::basic_string<char, std::char_traits, std::allocator >::compare(char const*) const' follow
CMakeFiles/unit_test.dir/TestMain.cpp.o: In functionstd::vector<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > >::operator=(std::vector<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > const&) [clone .isra.0]': TestMain.cpp:(.text+0x1673): undefined reference to
operator delete(void*, unsigned long)'
CMakeFiles/unit_test.dir/TestMain.cpp.o: In functionCatch::ExceptionTranslatorRegistry::registerTranslator(Catch::IExceptionTranslator const*)': TestMain.cpp:(.text+0x1851): undefined reference to
operator delete(void*, unsigned long)'
CMakeFiles/unit_test.dir/TestMain.cpp.o: In functionvoid std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag) [clone .constprop.0]': TestMain.cpp:(.text+0x1aeb): undefined reference to
std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_create(unsigned long&, unsigned long)'
CMakeFiles/unit_test.dir/TestMain.cpp.o: In functionCatch::Detail::(anonymous namespace)::StreamBufImpl<Catch::Detail::(anonymous namespace)::OutputDebugWriter, 256ul>::sync()': TestMain.cpp:(.text+0x1bb1): undefined reference to
operator delete(void*, unsigned long)'
CMakeFiles/unit_test.dir/TestMain.cpp.o: In functionvoid std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) [clone .constprop.0]': TestMain.cpp:(.text+0x1c4b): undefined reference to
std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_create(unsigned long&, unsigned long)'
CMakeFiles/unit_test.dir/TestMain.cpp.o: In functionnon-virtual thunk to Catch::Matchers::Exception::ExceptionMessageMatcher::match(std::exception const&) const': TestMain.cpp:(.text+0x1e95): undefined reference to
std::__cxx11::basic_string<char, std::char_traits, std::allocator >::compare(char const*) const'
CMakeFiles/unit_test.dir/TestMain.cpp.o: In functionCatch::ExceptionTranslatorRegistry::~ExceptionTranslatorRegistry()': TestMain.cpp:(.text+0x1f6e): undefined reference to
operator delete(void*, unsigned long)'
CMakeFiles/unit_test.dir/TestMain.cpp.o: In functionstd::_Rb_tree<Catch::TestCase const*, Catch::TestCase const*, std::_Identity<Catch::TestCase const*>, std::less<Catch::TestCase const*>, std::allocator<Catch::TestCase const*> >::_M_erase(std::_Rb_tree_node<Catch::TestCase const*>*) [clone .isra.0]': TestMain.cpp:(.text+0x2043): undefined reference to
operator delete(void*, unsigned long)'
TestMain.cpp:(.text+0x205e): undefined reference tooperator delete(void*, unsigned long)' TestMain.cpp:(.text+0x2079): undefined reference to
operator delete(void*, unsigned long)'
TestMain.cpp:(.text+0x209d): undefined reference to `operator delete(void*, unsigned long)'
Minimal repo with SCIP, SoPLEX as submodules and a cmake
Building a certain MILP with indicator constraints produces the following the lines of error and causes the program to crash:
ELEAVE56 ERROR! Tried to put a fixed column variable into the basis. idx=72, lower=0, upper=0
ELEAVE56 ERROR! Tried to put a fixed column variable into the basis. idx=72, lower=0, upper=0
ELEAVE56 ERROR! Tried to put a fixed column variable into the basis. idx=79, lower=0, upper=0
The underlying issue was introduced between scip version 8.0.0 to 8.0.1 (scip 8.0.0 solves the problem correctly, scip 8.0.1 produces the error).
I use pyscipopt in python 3.7 to construct the problem. Both, version 4.2.0 and 4.0.0 work fine.
Here the "writeProblem" output (identical for scip 8.0.0 and 8.0.1):
\ SCIP STATISTICS
\ Problem name : model
\ Variables : 112 (26 binary, 0 integer, 0 implicit integer, 86 continuous)
\ Constraints : 123
Minimize
Obj: +1 x1 +0.6 x3 +1.1 x4 +0.75 x5 +1 x6 +0.8 x7 +1 x8 +1 x9 +1 x11 +1.5 x13 +1.2 x15
Subject to
c1: -1 x1 -0.6 x3 -1.1 x4 -0.75 x5 -1 x6 -0.8 x7 -1 x8 -1 x9 -1 x11 -1.5 x13 -1.2 x15 <= +0
c2: +1 x1 +0.6 x3 +1.1 x4 +0.75 x5 +1 x6 +0.8 x7 +1 x8 +1 x9 +1 x11 +1.5 x13 +1.2 x15 <= +4
c4: +1 x16 -1 x18 +1 x30 -1 x47 <= +0
c5: -1 x16 +0.4 x28 +1 x29 -1 x55 <= +0
c6: +1 x21 +1 x27 -1 x57 <= +0
c7: +1 x23 +1 x31 <= +0
c8: +1 x27 -1 x33 <= +0
c9: +4.5 x27 -1 x43 <= +0
c10: +1 x24 -100 x27 <= +0
c11: +1 x25 -100 x27 <= +0
c12: -100 x27 +1 x32 <= +0
c13: -100 x27 +1 x33 <= +0
c14: -100 x27 +1 x34 <= +0
c15: -1 x24 -100 x27 <= +0
c16: -100 x27 +1 x35 <= +0
c17: -100 x27 +1 x36 <= +0
c18: -1 x25 -100 x27 <= +0
c19: -100 x27 +1 x37 <= +0
c20: -100 x27 +1 x38 <= +0
c21: -10 x27 +1 x39 <= +0
c22: -100 x27 +1 x40 <= +0
c23: -100 x27 +1 x41 <= +0
c24: -100 x27 +1 x42 <= +0
c25: -0.1 x29 -1 x30 -4.5 x31 -1 x41 +100 x44 +100 x45 +100 x46 +100 x47 +100 x48 +100 x49 +100 x50 +100 x51
+100 x52 +100 x53 +100 x54 +10 x55 +100 x56 +100 x57 +100 x58 <= -1
c26: +1 x23 <= +0
c27: +1 x59 +9 x1 <= +9
c28: +1 x61 -4.9 x3 <= +0
c29: +1 x62 +10 x4 <= +10
c30: +1 x63 +10 x5 <= +10
c31: +1 x64 -10 x6 <= +0
c32: +1 x65 +9 x7 <= +9
c33: +1 x66 +9 x8 <= +9
c34: +1 x67 +5 x9 <= +5
c35: +1 x69 +9 x11 <= +9
c36: +1 x71 +9.8 x13 <= +9.8
c37: -1 x62 +4.9 x4 <= +4.9
c38: -1 x65 +10 x7 <= +10
c39: -1 x73 +5.5 x15 <= +5.5
c40: +1 x32 +1 x33 +1 x34 +1 x37 -1 x39 = +0
c41: -1 x25 -1 x32 +1 x36 +1 x38 = +0
c42: -1 x33 +1 x34 +1 x35 +1 x36 +1 x38 = +0
c43: +1 x24 -1 x34 +1 x35 = +0
c44: +1 x25 -1 x36 -1 x37 +1 x40 = +0
c45: -1 x35 -1 x36 -1 x38 +1 x41 = +0
c46: -1 x24 -1 x34 -1 x35 -1 x38 +1 x42 = +0
c47: +1 x26 -1 x36 +1 x43 = +0
c48: -1 x59 -1 x60 -1 x61 -1 x66 +1 x68 = +0
c49: +1 x59 -1 x64 -1 x65 -1 x67 = +0
c50: +1 x60 -1 x61 -1 x63 -1 x64 -1 x67 = +0
c51: +1 x61 +1 x62 -1 x63 = +0
c52: +1 x64 +1 x65 +1 x66 -1 x69 = +0
c53: +1 x63 +1 x64 +1 x67 -1 x70 = +0
c54: +1 x61 -1 x62 +1 x63 +1 x67 -1 x71 = +0
c55: +1 x64 -1 x72 +1 x73 = +0
constraint handler <xor> cannot print requested format
\ [xor] <XORcons>: xor(<x1>[B],<x74>[B]) = 1;
IndicatorCons: x74 = 1 -> +1 x16 -1 x17 -1 x46 <= +0
IndicatorCons: x3 = 1 -> +1 x16 +1 x18 -1 x19 -1 x22 -1 x48 <= +0
constraint handler <xor> cannot print requested format
\ [xor] <XORcons>: xor(<x5>[B],<x77>[B]) = 1;
IndicatorCons: x77 = 1 -> +1 x18 +1 x19 -1 x21 -1 x22 -1 x50 <= +0
IndicatorCons: x6 = 1 -> +1 x17 +1 x18 -1 x20 -1 x21 -1 x23 -1 x51 <= +0
constraint handler <xor> cannot print requested format
\ [xor] <XORcons>: xor(<x8>[B],<x80>[B]) = 1;
IndicatorCons: x80 = 1 -> +1 x16 -1 x20 -1 x53 <= +0
constraint handler <xor> cannot print requested format
\ [xor] <XORcons>: xor(<x9>[B],<x82>[B]) = 1;
IndicatorCons: x82 = 1 -> +1 x17 +1 x18 -1 x21 -1 x22 -1 x54 <= +0
constraint handler <xor> cannot print requested format
\ [xor] <XORcons>: xor(<x11>[B],<x84>[B]) = 1;
IndicatorCons: x84 = 1 -> +1 x20 -1 x28 -1 x56 <= +0
constraint handler <xor> cannot print requested format
\ [xor] <XORcons>: xor(<x13>[B],<x86>[B]) = 1;
IndicatorCons: x86 = 1 -> +1 x22 -1 x58 <= +0
constraint handler <xor> cannot print requested format
\ [xor] <XORcons>: xor(<x15>[B],<x88>[B]) = 1;
IndicatorCons: x88 = 1 -> -1 x23 <= +0
IndicatorCons: x1 = 1 -> +1 x32 <= +0
constraint handler <xor> cannot print requested format
\ [xor] <XORcons>: xor(<x3>[B],<x91>[B]) = 1;
IndicatorCons: x91 = 1 -> +1 x34 <= +0
IndicatorCons: x5 = 1 -> +1 x35 <= +0
constraint handler <xor> cannot print requested format
\ [xor] <XORcons>: xor(<x6>[B],<x94>[B]) = 1;
IndicatorCons: x94 = 1 -> +1 x36 <= +0
IndicatorCons: x8 = 1 -> +1 x37 <= +0
IndicatorCons: x9 = 1 -> +1 x38 <= +0
IndicatorCons: x11 = 1 -> +1 x40 <= +0
IndicatorCons: x13 = 1 -> +1 x42 <= +0
IndicatorCons: x15 = 1 -> +1 x73 <= +0
constraint handler <xor> cannot print requested format
\ [xor] <XORcons>: xor(<x4>[B],<x101>[B]) = 1;
IndicatorCons: x101 = 1 -> +1 x19 -1 x22 -1 x44 +1 x49 <= +0
IndicatorCons: x101 = 1 -> -1 x19 +1 x22 +1 x44 -1 x49 <= +0
constraint handler <xor> cannot print requested format
\ [xor] <XORcons>: xor(<x7>[B],<x104>[B]) = 1;
IndicatorCons: x104 = 1 -> -1 x17 +1 x20 -1 x45 +1 x52 <= +0
IndicatorCons: x104 = 1 -> +1 x17 -1 x20 +1 x45 -1 x52 <= +0
IndicatorCons: x4 = 1 -> +1 x24 <= +0
IndicatorCons: x4 = 1 -> -1 x24 <= +0
IndicatorCons: x7 = 1 -> +1 x25 <= +0
IndicatorCons: x7 = 1 -> -1 x25 <= +0
IndicatorCons: x15 = 1 -> +1 x26 <= +0
IndicatorCons: x15 = 1 -> -1 x26 <= +0
Bounds
0 <= x1 <= 1
0 <= x2 <= 0
0 <= x3 <= 1
0 <= x4 <= 1
0 <= x5 <= 1
0 <= x6 <= 1
0 <= x7 <= 1
0 <= x8 <= 1
0 <= x9 <= 1
0 <= x10 <= 0
0 <= x11 <= 1
0 <= x12 <= 0
0 <= x13 <= 1
0 <= x14 <= 0
0 <= x15 <= 1
0 <= x74 <= 1
0 <= x77 <= 1
0 <= x80 <= 1
0 <= x82 <= 1
0 <= x84 <= 1
0 <= x86 <= 1
0 <= x88 <= 1
0 <= x91 <= 1
0 <= x94 <= 1
0 <= x101 <= 1
0 <= x104 <= 1
x27 free
0 <= x59 <= 100
1 <= x60 <= 100
0 <= x61 <= 100
-100 <= x62 <= 100
0 <= x63 <= 100
0 <= x64 <= 100
-100 <= x65 <= 100
0 <= x66 <= 100
0 <= x67 <= 100
0 <= x68 <= 10
0 <= x69 <= 100
0.2 <= x70 <= 100
0 <= x71 <= 100
4.5 <= x72
x73 free
x16 free
x17 free
x18 free
x19 free
x20 free
x21 free
x22 free
x23 free
x24 free
x25 free
x26 free
Binaries
x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x74 x77 x80 x82 x84 x86 x88 x91 x94 x101 x104
End
Build fails on ubuntu-xenial (cmake 3.5.1, https://github.com/mkoeppe/PySCIPOpt/actions/runs/3457453303/jobs/5770894994)
Build succeeds on linuxmint-19 (cmake 3.10.2, https://github.com/mkoeppe/PySCIPOpt/actions/runs/3457453303/jobs/5770895677)
So it would make sense to use cmake_minimum_required(VERSION 3.10)
TLDR: It seems the SCIP source depends on M_PI
which is a GNU extension, i.e. compiling using -std=c99
won't work.
If here:
Lines 10 to 12 in a6142b7
set(CMAKE_C_EXTENSIONS OFF)
Then CMake will generate compile line using -std=c99
instead of the "default" -std=gnu99
ref: https://cmake.org/cmake/help/latest/variable/CMAKE_CXX_EXTENSIONS.html
note: You can also pass it on CMake configure line or could be given by a super project integrating SCIP from sources...
note2: Usually CMake default enable extensions seems to have change 17months ago see
Kitware/CMake@f034b0f
note: I'm doing some integration tests of multithread SCIP so technically I building SCIP using through FetchContent()
full project here: https://github.com/Mizux/scip-multithread
cmake --build build -v
...
[ 17%] Building C object _deps/scip-build/src/CMakeFiles/libscip.dir/scip/cons_soc.c.o
cd /home/mizux/dev/scip-multithread/build/_deps/scip-build/src && /usr/bin/clang
-I/home/mizux/dev/scip-multithread/build/_deps/scip-build
-I/home/mizux/dev/scip-multithread/build/_deps/scip-src/src
-I/home/mizux/dev/scip-multithread/build/_deps/zlib-build
-I/home/mizux/dev/scip-multithread/build/_deps/zlib-src
-fsanitize=thread -g -fPIC -fvisibility=hidden -std=c99 # SEE HERE the use of -std=c99
-MD -MT
_deps/scip-build/src/CMakeFiles/libscip.dir/scip/cons_soc.c.o
-MF CMakeFiles/libscip.dir/scip/cons_soc.c.o.d
-o CMakeFiles/libscip.dir/scip/cons_soc.c.o
-c /home/mizux/dev/scip-multithread/build/_deps/scip-src/src/scip/cons_soc.c
/home/mizux/dev/scip-multithread/build/_deps/scip-src/src/scip/cons_soc.c:1996:10: error: use of undeclared identifier 'M_PI'
val = M_PI;
^
/home/mizux/dev/scip-multithread/build/_deps/scip-src/src/scip/cons_soc.c:2238:13: error: use of undeclared identifier 'M_PI'
val = M_PI / pow(2.0, (double) (i+1));
^
/home/mizux/dev/scip-multithread/build/_deps/scip-src/src/scip/cons_soc.c:2313:19: error: use of undeclared identifier 'M_PI'
vals[0] = tan( M_PI / pow(2.0, (double) (N+1)) );
^
3 errors generated.
make[2]: *** [_deps/scip-build/src/CMakeFiles/libscip.dir/build.make:776: _deps/scip-build/src/CMakeFiles/libscip.dir/scip/cons_soc.c.o] Error 1
make[2]: Leaving directory '/home/mizux/dev/scip-multithread/build'
make[1]: *** [CMakeFiles/Makefile2:1057: _deps/scip-build/src/CMakeFiles/libscip.dir/all] Error 2
make[1]: Leaving directory '/home/mizux/dev/scip-multithread/build'
make: *** [Makefile:166: all] Error 2
note: I tweaked the indent of the trace
fun fact: PI only officially exist since C++20 (https://en.cppreference.com/w/cpp/numeric/constants)
If i were you:
set(CMAKE_C_EXTENSIONS ON)
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
FYI
%uname -a
Linux nuc10i7 5.13.5-arch1-1 #1 SMP PREEMPT Sun, 25 Jul 2021 18:02:58 +0000 x86_64 GNU/Linux
%gcc --version
gcc (GCC) 11.1.0
% clang --version
clang version 12.0.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
I am trying to use SCIP to solve a quadratic optimization problem.
As a baseline I tried to install cvxpy and SCIP and solve the MQIP sample problem at https://www.cvxpy.org/examples/basic/mixed_integer_quadratic_program.html
However I get a SIGILL termination message. after the SCIP solver is invoked, not 100% sure this is on SCIP to blame.
scip -v
output:
SCIP version 8.0.3 [precision: 8 byte] [memory: block] [mode: optimized] [LP solver: Soplex 6.0.3] [GitHash: 62fab8a2e3]
Copyright (C) 2002-2022 Konrad-Zuse-Zentrum fuer Informationstechnik Berlin (ZIB)
External libraries:
Readline 8.0 GNU library for command line editing (gnu.org/s/readline)
Soplex 6.0.3 Linear Programming Solver developed at Zuse Institute Berlin (soplex.zib.de) [GitHash: f900e3d0]
CppAD 20180000.0 Algorithmic Differentiation of C++ algorithms developed by B. Bell (github.com/coin-or/CppAD)
ZLIB 1.2.11 General purpose compression library by J. Gailly and M. Adler (zlib.net)
GMP 6.2.0 GNU Multiple Precision Arithmetic Library developed by T. Granlund (gmplib.org)
AMPL/MP 4e2d45c4 AMPL .nl file reader library (github.com/ampl/mp)
bliss 0.77 Computing Graph Automorphism Groups by T. Junttila and P. Kaski (www.tcs.hut.fi/Software/bliss/)
Compiler: gcc 9.4.0
Build options:
ARCH=x86_64
COMP=gnu
DEBUGSOL=false
EXPRINT=cppad
GMP=true
IPOPT=false
IPOPTOPT=opt
LPS=spx2
LPSCHECK=false
LPSOPT=opt
NOBLKBUFMEM=false
NOBLKMEM=false
NOBUFMEM=false
OPT=opt
OSTYPE=linux
THREADSAFE=true
PAPILO=false
READLINE=true
SANITIZE=
SHARED=false
SYM=bliss
USRARFLAGS=
USRCFLAGS=
USRCXXFLAGS=
USRFLAGS=
USRLDFLAGS=
USROFLAGS=
VERSION=8.0.3
WORHP=false
WORHPOPT=opt
ZIMPL=false
ZIMPLOPT=opt
AMPL=true
ZLIB=true
cat /proc/cpuinfo
output:
Linux [REDACTED] 5.15.0-56-generic #62~20.04.1-Ubuntu SMP Tue Nov 22 21:24:20 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Attaching a zip containing the dump file
DISCLAIMER: All details (and a minimal reproducible example) are in Mizux/scip-multithread#2
It seems, on GitHub linux hosted worker, the method
SCIPsyncstoreGetWinner()
will return-1
nearly each time
Open Questions:
* Why code didn't check the index value or retcode before using the return value ?
* Why we have so many-1
return bySCIPsyncstoreGetWinner()
?
* Whysyncstore->lastsync
is empty while SCIPtpiCollectJobs(jobid) seems to have correctly collected all results ?
Line 1138 in f20ba4b
SCIPdebugMsg
is defined in scip_message.h, but the file is not referenced, which causes the compilation to fail because the definition cannot be found at compile time.Hi, I need to solve numerically difficult LP problems, and would like to use SoPlex as an exact LP solver from SCIP. In order to use SoPlex in exact mode, I need to set some parameters(e.g. setting both feastol
and opttol
to
However, I can't find a way to set the params in SCIP. In https://scipopt.org/doc/html/PARAMETERS.php, I can only find numerics/feastol
and the minimal allowed value is
Is there a way to set the SoPlex parameters through SCIP to make it solve in exact mode? Thank you for any help
The documentation could be served well by adding an example of how one should add a quadratic objective function. While there is documentation for the API reference, it is very difficult to parse through all the possible handlers and find the right one. For instance here: https://www.scipopt.org/doc/html/group__CONSHDLRS.php#gad3707e7f7166bea83b7713cf2e52b0db
Even from here it isnt clear how a quadratic objective function should really be defined.
I've just tried to install SCIPOptSuite-8.0.3-Linux-debian.deb on a Debian machine, and I'm getting conflicts with the bliss package as both scipoptsuite and bliss want to install /usr/bin/bliss. I tried to find out how the debian package is actually built, but couldn't find any specific build script for creating the Debian package.
I do realise that SCIPOptSuite needs bliss 0.77, while debian stable (bullseye) and testing (bookworm) both only have bliss 0.73 available, so making SCIPOptSuite installable on debian stable is going to need some sort of internal bliss build (and possibly the same for other libraries), but would it be possible to create debian packages that won't have file collisions with other debian packages? I'm happy to attempt to make a build script for this if there is interest.
I have been experimenting with special ordered sets of type 2 and noticed that I have been getting different optimal solutions based on the weights and their order.
The following SOS2 constraint (in .lp format) is recognised and solved correctly (objective = -2):
SOS
x10: S2::
x4:1
x5:2
x6:3
The following SOS2 constraint (in .lp format) is recognised but not solved correctly (objective = 3):
SOS
x10: S2::
x4:25
x5:18
x6:22
The correct solution is only produced when the weights are in monotonically ascending or descending order. I also tried to swap the order of the variables but it did not produce the right solution.
I am enclosing the aforementioned problems:
sos2.zip
I found the same behaviour with CPLEX but not with CBC (correct result with both files). Is this a bug? Can somebody explain why this happens? Does the format require us to write the constraint with the variables and the weights in a specific order?
EDIT: Added information about the results with CBC.
(base) chengwei@chengwei-Latitude-5411:$ cd /home/chengwei/scipsdp-4.0.0/scipsdp-4.0.0$ mkdir lib
(base) chengwei@chengwei-Latitude-5411:
(base) chengwei@chengwei-Latitude-5411:/scipsdp-4.0.0$ cd lib/scipsdp-4.0.0/lib$ ln -s /home/chengwei/SCIPOptSuite-8.0.0-Linux/bin/scip
(base) chengwei@chengwei-Latitude-5411:
(base) chengwei@chengwei-Latitude-5411:/scipsdp-4.0.0/lib$ cd ../scipsdp-4.0.0$ make
(base) chengwei@chengwei-Latitude-5411:
make/make.scipsdpproj:113: .//lib/scip/bin/scip... not found
make/make.scipsdpproj:114: *** Please compile SCIP with options LPS= SUFFIX= OSTYPE= ARCH= COMP= TPI=. Stop.
(base) chengwei@chengwei-Latitude-5411:~/scipsdp-4.0.0$
How can handle this problem?
I install SCIPOptSuite-8.0.0-Linux by precompiling sh.
Best,
Chengwei
I have been using SCIP through pyomo and through the command line and have recently come across a funny result: the solution appears to be calculated correctly, since pyomo stores the variables with the correct result, but the solution is not shown in the printout. I have tested this also in the command line and the result is the same.
The optimal solution is 2.9242718553e-04 (determined through the variables stored in pyomo and confirmed manually and via CPLEX) but SCIP prints that it is +0.00000000000000e+00 instead.
I am using debian bookworm and SCIP 8.0.3 but I had to handle some dependencies in unusual ways to install it.
I am attaching the problem so that this may be confirmed.
scip_problem.zip
make install
output :
//usr/local/lib/libreadline.so.8: undefined reference to tgetstr' //usr/local/lib/libreadline.so.8: undefined reference to
tputs'
//usr/local/lib/libreadline.so.8: undefined reference to BC' //usr/local/lib/libreadline.so.8: undefined reference to
tgetent'
//usr/local/lib/libreadline.so.8: undefined reference to tgetflag' //usr/local/lib/libreadline.so.8: undefined reference to
tgoto'
//usr/local/lib/libreadline.so.8: undefined reference to UP' //usr/local/lib/libreadline.so.8: undefined reference to
tgetnum'
//usr/local/lib/libreadline.so.8: undefined reference to `PC'
collect2: error: ld returned 1 exit status
gcg/src/CMakeFiles/gcg.dir/build.make:2211: recipe for target 'bin/gcg' failed
make[2]: *** [bin/gcg] Error 1
CMakeFiles/Makefile2:2954: recipe for target 'gcg/src/CMakeFiles/gcg.dir/all' failed
make[1]: *** [gcg/src/CMakeFiles/gcg.dir/all] Error 2
Makefile:165: recipe for target 'all' failed
make: *** [all] Error 2
I am trying to understand
Looking at their documentation, both should do more or less the same
I originally opened a similar issue at PySCIPOpt (issue) they sent me here so I tried to recreate the issue using the C-API:
When trying to get the optimal dual values of an LP solution, only SCIPgetDualSolVal seems to return the correct value:
#include <stdio.h>
#include <stdbool.h>
#include "scip/scip.h"
#include <scip/scipdefplugins.h>
int main() {
// Setup
SCIP* scip;
SCIP_CALL_ABORT(SCIPcreate(&scip));
SCIP_CALL_ABORT(SCIPincludeDefaultPlugins(scip));
// Turn off features that seem problematic in conjunction with duals:
// https://www.solveforum.com/forums/threads/solved-how-to-completeley-disable-presolve-in-scip.2697850/
// https://github.com/scipopt/PySCIPOpt/issues/136
SCIP_CALL_ABORT(SCIPsetPresolving(scip, SCIP_PARAMSETTING_OFF, true));
SCIP_CALL_ABORT(SCIPsetHeuristics(scip, SCIP_PARAMSETTING_OFF, true));
SCIP_CALL_ABORT(SCIPsetIntParam(scip, "propagating/maxrounds", 0));
SCIP_CALL_ABORT(SCIPcreateProb(scip, "primal", NULL, NULL,
NULL, NULL, NULL, NULL, NULL));
SCIP_CALL_ABORT(SCIPsetObjsense(scip, SCIP_OBJSENSE_MAXIMIZE));
// Variables: x,y positive reals
SCIP_VAR* x;
SCIP_CALL_ABORT(SCIPcreateVar(scip, &x, "x", 0.0, SCIPinfinity(scip), 1.0,
SCIP_VARTYPE_CONTINUOUS, TRUE, FALSE,
NULL, NULL, NULL, NULL, NULL));
SCIP_CALL_ABORT(SCIPaddVar(scip, x));
SCIP_VAR* y;
SCIP_CALL_ABORT(SCIPcreateVar(scip, &y, "y", 0.0, SCIPinfinity(scip), 1.0,
SCIP_VARTYPE_CONTINUOUS, TRUE, FALSE,
NULL, NULL, NULL, NULL, NULL));
SCIP_CALL_ABORT(SCIPaddVar(scip, y));
// Constraints
SCIP_CONS* c1;
SCIP_VAR* vars[2] = {x, y};
double coeffs1 [2] = {1.0, 2.0};
SCIP_CALL_ABORT(SCIPcreateConsLinear(scip, &c1, "c1",
2, vars, coeffs1, 21.0, 21.0, TRUE,
TRUE, TRUE, TRUE, TRUE, FALSE,
FALSE, FALSE, FALSE, FALSE));
SCIP_CALL_ABORT(SCIPaddCons(scip, c1));
SCIP_CONS* c2;
double coeffs2 [2] = {2.0, 1.0};
SCIP_CALL_ABORT(SCIPcreateConsLinear(scip, &c2, "c2",
2, vars, coeffs2, 24.0, 24.0, TRUE,
TRUE, TRUE, TRUE, TRUE, FALSE,
FALSE, FALSE, FALSE, FALSE));
SCIP_CALL_ABORT(SCIPaddCons(scip, c2));
// Solution
SCIP_CALL_ABORT(SCIPsolve(scip));
SCIP_SOL* sol = SCIPgetBestSol(scip);
if (sol == NULL){
printf("No solution found\n");
}
else {
double x_val = SCIPgetSolVal(scip, sol, x);
double y_val = SCIPgetSolVal(scip, sol, y);
double c1_dual = SCIPgetDualsolLinear(scip, c1);
double c2_dual = SCIPgetDualsolLinear(scip, c2);
double c1_dual2;
double c2_dual2;
SCIP_CALL_ABORT(SCIPgetDualSolVal(scip, c1, &c1_dual2, NULL));
SCIP_CALL_ABORT(SCIPgetDualSolVal(scip, c2, &c2_dual2, NULL));
printf("Solution: x = %f, y = %f\n", x_val, y_val);
printf("getDualsolLinear: c1_dual = %f, c2_dual = %f\n", c1_dual, c2_dual);
printf("getDualSolVal: c1_dual = %f, c2_dual = %f\n", c1_dual2, c2_dual2);
}
// Cleanup
SCIP_CALL_ABORT(SCIPreleaseVar(scip, &x));
SCIP_CALL_ABORT(SCIPreleaseVar(scip, &y));
SCIP_CALL_ABORT(SCIPreleaseCons(scip, &c1));
SCIP_CALL_ABORT(SCIPreleaseCons(scip, &c2));
SCIP_CALL_ABORT(SCIPfree(&scip));
return 0;
}
output:
Solution: x = 9.000000, y = 6.000000
getDualsolLinear: c1_dual = 0.000000, c2_dual = 0.000000
getDualSolVal: c1_dual = 0.333333, c2_dual = 0.333333
The optimal dual values of constraints c1 and c2 are both 1/3, so only getDualSolVal returns the right value but getDualsolLinear doesn't.
I'm using SCIP 8.0.3 installed using conda on a Linux machine.
More details:
$ scip --version
SCIP version 8.0.3 [precision: 8 byte] [memory: block] [mode: optimized] [LP solver: Soplex 6.0.3] [GitHash: 62fab8a2e3]
Copyright (C) 2002-2022 Konrad-Zuse-Zentrum fuer Informationstechnik Berlin (ZIB)
External libraries:
Soplex 6.0.3 Linear Programming Solver developed at Zuse Institute Berlin (soplex.zib.de) [GitHash: f900e3d0]
CppAD 20180000.0 Algorithmic Differentiation of C++ algorithms developed by B. Bell (github.com/coin-or/CppAD)
ZLIB 1.2.13 General purpose compression library by J. Gailly and M. Adler (zlib.net)
GMP 6.2.1 GNU Multiple Precision Arithmetic Library developed by T. Granlund (gmplib.org)
ZIMPL 3.5.3 Zuse Institute Mathematical Programming Language developed by T. Koch (zimpl.zib.de)
AMPL/MP 4e2d45c4 AMPL .nl file reader library (github.com/ampl/mp)
PaPILO 2.1.2 parallel presolve for integer and linear optimization (github.com/scipopt/papilo) [GitHash: 2fe2543]
bliss 0.77 Computing Graph Automorphism Groups by T. Junttila and P. Kaski (www.tcs.hut.fi/Software/bliss/)
Ipopt 3.14.12 Interior Point Optimizer developed by A. Waechter et.al. (github.com/coin-or/Ipopt)
Compiler: gcc 12.2.0
Build options:
ARCH=x86_64
OSTYPE=Linux-5.15.0-1037-azure
COMP=GNU 12.2.0
BUILD=Release
DEBUGSOL=OFF
EXPRINT=cppad
SYM=bliss
GMP=ON
IPOPT=ON
WORHP=OFF
LPS=spx
LPSCHECK=OFF
NOBLKBUFMEM=OFF
NOBLKMEM=OFF
NOBUFMEM=OFF
THREADSAFE=ON;FORCE
READLINE=OFF
SANITIZE_ADDRESS=OFF
SANITIZE_MEMORY=OFF
SANITIZE_UNDEFINED=OFF
SANITIZE_THREAD=OFF
SHARED=ON
VERSION=8.0.3.0
API_VERSION=104
ZIMPL=ON
ZLIB=ON
to reflect the new license and to allow automatic downloads
Hello,
I am looking for a way to get all rows including those that are not in the current LP. I know that SCIPgetLPRows() returns the rows in the current LP but I also need those that are not in the current LP. I did not see a function that does this, so I was wondering if there is another way to achieve this? Thanks!
When trying to compile SCIP from source, the build fails with
error: cannot convert ‘void(void*, unsigned int, const unsigned int*)’ to ‘const std::function<void(unsigned int, const unsigned int*)>&
in
scip/src/symmetry/compute_symmetry_bliss.cpp
Line 1087 in 07dfd86
I looked up the reference, seems like Bliss has changed the signature (user_param
is no longer accepted as a param), Is SCIP using a forked version of the API?
I was able to surpass the error by rewriting the blisshook
to
auto blisshook = [&data](
unsigned int n, /**< size of aut vector */
const unsigned int* aut /**< automorphism */
)
{
assert( aut != NULL );
assert( data.scip != NULL );
assert( data.npermvars < (int) n );
assert( data.maxgenerators >= 0);
/* make sure we do not generate more that maxgenerators many permutations, if the limit in bliss is not available */
if ( data.maxgenerators != 0 && data.nperms >= data.maxgenerators )
return;
/* copy first part of automorphism */
bool isIdentity = true;
int* p = 0;
if ( SCIPallocBlockMemoryArray(data.scip, &p, data.npermvars) != SCIP_OKAY )
return;
for (int j = 0; j < data.npermvars; ++j)
{
/* convert index of variable-level 0-nodes to variable indices */
p[j] = (int) aut[j];
if ( p[j] != j )
isIdentity = false;
}
/* ignore trivial generators, i.e. generators that only permute the constraints */
if ( isIdentity )
{
SCIPfreeBlockMemoryArray(data.scip, &p, data.npermvars);
return;
}
/* check whether we should allocate space for perms */
if ( data.nmaxperms <= 0 )
{
if ( data.maxgenerators == 0 )
data.nmaxperms = 100; /* seems to cover many cases */
else
data.nmaxperms = data.maxgenerators;
if ( SCIPallocBlockMemoryArray(data.scip, &data.perms, data.nmaxperms) != SCIP_OKAY )
return;
}
else if ( data.nperms >= data.nmaxperms ) /* check whether we need to resize */
{
int newsize = SCIPcalcMemGrowSize(data.scip, data.nperms + 1);
assert( newsize >= data.nperms );
assert( data.maxgenerators == 0 );
if ( SCIPreallocBlockMemoryArray(data.scip, &data.perms, data.nmaxperms, newsize) != SCIP_OKAY )
return;
data.nmaxperms = newsize;
}
data.perms[data.nperms++] = p;
};
and the call to
G.find_automorphisms(stats, blisshook);
It is now working as expected, if you think that's a correct fix, I can prepare a patch :).
Thanks.
Since scipopt/PySCIPOpt#486 was closed but never solved I am making the same issue here.
is there a way to check what conditions are failing when the optimization result is infeasible or get the latest (infeasible) solution from the solver?
I've been studying nlhdlr_quadratic.c to understand how to iterate the extreme rays when at an optimum of the LP relaxation. It's more complex than expected. (It might be less complex if the code for handling quadratics was not part of it.) Is it possible to expose some public methods for iterating the extreme rays of an optimal corner? This is surely a common need for modern cutting techniques, no?
In the meantime, can you give some guidance on iterating extreme rays of the corner in a custom separator for MILP problems?
Hi there,
I was wondering if there will be an arm64/aarch64 binary of SCIP. I have used SCIP across all different platform (Windows, Linux x86_64, arm32). But currently run into some problem on Ubuntu arm64 (on a Raspberry Pi 4B). I have tried the Raspberry Pi binary but apparently it needs some kernel support to run arm32 binary.
It will be great if you will release aarch64 binary in the future.
Thanks!
Hi, I'm trying to use concurrentopt mode in SCIP. I compiled with CPLEX and IPOPT. While configuring with CMake I activated OpenMP library. So there is no problem with functionality. But my problem is working with Pyomo. Pyomo can not use internal functions as far as I know. I checked "scip --help" command and there is "-c "command" : execute single line of dialog commands (can be used multiple times)". So that I decided to pass "-c concurrentopt" but its not working.
I tried "scip -c concurrentopt -f example.nl" command and I get: "cannot mix batch mode '-c' and '-b' with file mode '-f'"
Is there any other alternatives to run parallel in default?
I downloaded last version of SCIP from git repo. I compiled without any error. But I get this error massage when try to install with "sudo make install":
fatal: unsafe repository ('/home/radxa/Downloads/scip' is owned by someone else)
To add an exception for this directory, call:
git config --global --add safe.directory /home/radxa/Downloads/scip
CMake Error at scip_update_githash.cmake:12 (string):
string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
command.
make[2]: *** [CMakeFiles/scip_update_githash.dir/build.make:70: CMakeFiles/scip_update_githash] Error 1
make[1]: *** [CMakeFiles/Makefile2:719: CMakeFiles/scip_update_githash.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
I tried to add safe directory but nothing changed. I'm working on ARM architecture Radxa Zero.(cmake 3.23.1, Make 4.3)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.