Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change scip to scipmp #206

Merged
merged 44 commits into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
9e94ee1
init scip solver driver
jurgen-lentz Feb 18, 2023
e2f8006
minimal driver
jurgen-lentz Feb 26, 2023
da7fc5b
add basic functionalities
jurgen-lentz Mar 3, 2023
98e4d82
Merge branch 'ampl:develop' into scip
jurgen-lentz Mar 3, 2023
b33252d
fix primal solution
jurgen-lentz Mar 5, 2023
28e035d
change getPROBDATA to cons
jurgen-lentz Mar 5, 2023
597124e
change getPROBDATA v2
jurgen-lentz Mar 5, 2023
ec059d9
fix test
jurgen-lentz Mar 5, 2023
9ac8689
add indicator constraint LinLE
jurgen-lentz Mar 5, 2023
bc2ecfb
add indicator constraint LinGE
jurgen-lentz Mar 5, 2023
c39f303
add indicator constraint LinEQ
jurgen-lentz Mar 5, 2023
da52fce
change indicator constraint to recommended
jurgen-lentz Mar 5, 2023
2c15d0c
add or, and constraint
jurgen-lentz Mar 5, 2023
d3dc919
handle char and bool param
jurgen-lentz Mar 7, 2023
bedfc9d
add more options
jurgen-lentz Mar 7, 2023
752b7f0
improve readme and changes
jurgen-lentz Mar 8, 2023
6dbbf96
disable sepa of indicator cons
jurgen-lentz Mar 8, 2023
e8d43f3
Merge branch 'ampl:develop' into scip
jurgen-lentz Mar 8, 2023
9f29a41
improve memory handling
jurgen-lentz Apr 2, 2023
af8e3d2
add linearHelper method
jurgen-lentz Apr 8, 2023
5acffa0
add indicator helper method
jurgen-lentz Apr 9, 2023
aeeee8a
add quadratic helper method
jurgen-lentz Apr 9, 2023
fccbffd
add pool solution
jurgen-lentz Apr 12, 2023
5de320a
add abs, sin and cosfunctions
jurgen-lentz Apr 17, 2023
cebbbf1
add exp and log function
jurgen-lentz Apr 17, 2023
493398c
add pow function
jurgen-lentz Apr 18, 2023
650bddb
add more options and concurrent mode
jurgen-lentz Apr 24, 2023
19d9199
improve tests
jurgen-lentz Apr 25, 2023
aa2e055
add more options
jurgen-lentz Apr 26, 2023
c5ee537
Merge branch 'develop' into scip
jurgen-lentz Apr 26, 2023
cf7083b
add last options
jurgen-lentz Apr 26, 2023
e952175
Merge branch 'scip' of github.com:jurgen-lentz/mp into scip
jurgen-lentz Apr 26, 2023
1496506
adapt mipstart header
jurgen-lentz Apr 27, 2023
8c50816
Update CHANGES.scip.md
jurgen-lentz Apr 27, 2023
61403f5
add option to x-multimip1
jurgen-lentz Apr 27, 2023
9278cb8
Merge branch 'scip' of github.com:jurgen-lentz/mp into scip
jurgen-lentz Apr 27, 2023
2a1eccb
change cmake
jurgen-lentz Apr 27, 2023
77b8137
add variable names
jurgen-lentz Apr 27, 2023
94d4a6a
change scip to scipmp
jurgen-lentz May 2, 2023
99af261
change cmake
jurgen-lentz May 2, 2023
17f1dfd
add docu
jurgen-lentz May 2, 2023
6b989c9
add scipmp test
jurgen-lentz May 3, 2023
39cb6a2
Merge branch 'develop' into scip
jurgen-lentz May 3, 2023
5e27b4d
delete scip
jurgen-lentz May 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions doc/rst/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,18 @@ does not have automatic dependency detection), you can use the following::
-DCOPT_LIBS=d:/copt/libs/win64/copt.lib
-DCOPT_INCLUDE_DIRS=d:/copt/include

To build the solver *scipmp* statically (on Linux or MacOS), you need to make sure
to add all its dependencies. The following cmake command builds *scipmp* assuming
that it is installed with the LP solver SoPlex, the arithmetic library GMP and
the library bliss for symmetry detection (*SCIP* and its dependencies are all
installed in the standard location)::

cmake .. -DBUILD=scipmp
-DSCIP_LIBS="/usr/local/lib/libscip.a;/usr/local/lib/libsoplex.a;/usr/local/lib/libgmp.a;/usr/local/lib/libbliss.a"
-DSCIP_INCLUDE_DIRS=/usr/local/include

Note: Any other dependency can be used in the same way.

Similarly, for *ortoolsmp* (on MacOS) assuming *ortools* is installed in
the standard location::

Expand Down
2 changes: 1 addition & 1 deletion solvers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ add_ampl_backend(cbcmp DLL_RUNTIME SHARED_LIB MODULE CBC
LIBRARIES ${CBC_LIBS} ${CMAKE_DL_LIBS})


add_ampl_backend(scip DLL_RUNTIME SHARED_LIB MODULE SCIP
add_ampl_backend(scipmp DLL_RUNTIME SHARED_LIB MODULE SCIP
LIBRARIES ${SCIP_LIBS} ${CMAKE_DL_LIBS})

add_ampl_backend(highsmp DLL_RUNTIME SHARED_LIB MODULE HIGHS
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion solvers/scip/main.cc → solvers/scipmp/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/// Declare a backend factory
std::unique_ptr<mp::BasicBackend> CreateScipBackend();

extern "C" int main1(int, char **argv) {
int main(int, char **argv) {
return
mp::RunBackendApp(argv, CreateScipBackend);
}
File renamed without changes.
2 changes: 1 addition & 1 deletion solvers/scip/scip-lib.c → solvers/scipmp/scipmp-lib.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "scip/scip-ampls-c-api.h"
#include "scipmp/scipmp-ampls-c-api.h"

#ifdef _WIN32
#define APIEXPORT __declspec(dllexport)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "mp/flat/redef/MIP/converter_mip.h"
#include "mp/flat/model_api_connect.h"

#include "scipmodelapi.h"
#include "scipmpmodelapi.h"


namespace mp {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

#include "mp/env.h"
#include "mp/flat/model_api_base.h"
#include "scipbackend.h"
#include "scipmpbackend.h"

extern "C" {
#include "scip-ampls-c-api.h" // Scip AMPLS C API
#include "scipmp-ampls-c-api.h" // Scip AMPLS C API
}
#include "mp/ampls-cpp-api.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "mp/backend-mip.h"
#include "mp/flat/backend_flat.h"
#include "scipcommon.h"
#include "scipmpcommon.h"

namespace mp {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "mp/format.h"
#include "scipcommon.h"
#include "scipmpcommon.h"

static
SCIP_DECL_PROBDELORIG(probdataDelOrigNl)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "scipmodelapi.h"
#include "scipmpmodelapi.h"

namespace mp {

Expand Down Expand Up @@ -28,8 +28,10 @@ void ScipModelAPI::AddVariables(const VarArrayDef& v) {
vartype = SCIP_VARTYPE_INTEGER;
else
vartype = SCIP_VARTYPE_CONTINUOUS;
//const char* name = v.pnames()[i];
SCIP_CCALL( SCIPcreateVarBasic(getSCIP(), &var, NULL, lb, ub, objcoef, vartype) );
const char* name = NULL;
if (v.pnames() != NULL)
const char* name = v.pnames()[i];
SCIP_CCALL( SCIPcreateVarBasic(getSCIP(), &var, name, lb, ub, objcoef, vartype) );
SCIP_CCALL( SCIPaddVar(getSCIP(), var) );
getPROBDATA()->vars[i] = var;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <memory>

#include "mp/env.h"
#include "scipcommon.h"
#include "scipmpcommon.h"
#include "mp/flat/model_api_base.h"
#include "mp/flat/constr_std.h"

Expand Down
1 change: 1 addition & 0 deletions test/end2end/scripts/python/SolverCollection.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def addStdSolvers(solvers: SolverCollection, binPath=""):
solvers.addSolver(Solver.MosekSolver(path.join(binPath,"mosek")))
solvers.addSolver(Solver.CbcMPSolver(path.join(binPath, "cbc")))
solvers.addSolver(Solver.SCIPSolver(path.join(binPath, "scip")))
solvers.addSolver(Solver.SCIPSolver(path.join(binPath, "scipmp")))
solvers.addSolver(Solver.CPLEXODHSolver(path.join(binPath, "cplexodh")))
solvers.addSolver(Solver.GUROBIODHSolver(path.join(binPath, "gurobiodh")))

Expand Down