Add soplex and scip (LP and MIP solver)
This commit is contained in:
committed by
Norman Feske
parent
053a038bf8
commit
cce6a99fc7
1
lib/import/import-scip.mk
Normal file
1
lib/import/import-scip.mk
Normal file
@@ -0,0 +1 @@
|
|||||||
|
INC_DIR += $(call select_from_ports,scip)/include
|
||||||
214
lib/mk/scip.mk
Normal file
214
lib/mk/scip.mk
Normal file
@@ -0,0 +1,214 @@
|
|||||||
|
SCIP_DIR = $(call select_from_ports,scip)/src/lib/scip/src
|
||||||
|
LIBS += libc zlib
|
||||||
|
INC_DIR += $(SCIP_DIR)
|
||||||
|
|
||||||
|
# plugin files
|
||||||
|
SRC_C = scip/branch_allfullstrong.c \
|
||||||
|
scip/branch_cloud.c \
|
||||||
|
scip/branch_fullstrong.c \
|
||||||
|
scip/branch_inference.c \
|
||||||
|
scip/branch_leastinf.c \
|
||||||
|
scip/branch_mostinf.c \
|
||||||
|
scip/branch_pscost.c \
|
||||||
|
scip/branch_random.c \
|
||||||
|
scip/branch_relpscost.c \
|
||||||
|
scip/cons_abspower.c \
|
||||||
|
scip/cons_and.c \
|
||||||
|
scip/cons_bivariate.c \
|
||||||
|
scip/cons_bounddisjunction.c \
|
||||||
|
scip/cons_conjunction.c \
|
||||||
|
scip/cons_countsols.c \
|
||||||
|
scip/cons_cumulative.c \
|
||||||
|
scip/cons_disjunction.c \
|
||||||
|
scip/cons_indicator.c \
|
||||||
|
scip/cons_integral.c \
|
||||||
|
scip/cons_knapsack.c \
|
||||||
|
scip/cons_linear.c \
|
||||||
|
scip/cons_linking.c \
|
||||||
|
scip/cons_logicor.c \
|
||||||
|
scip/cons_nonlinear.c \
|
||||||
|
scip/cons_or.c \
|
||||||
|
scip/cons_orbitope.c \
|
||||||
|
scip/cons_pseudoboolean.c \
|
||||||
|
scip/cons_quadratic.c \
|
||||||
|
scip/cons_setppc.c \
|
||||||
|
scip/cons_soc.c \
|
||||||
|
scip/cons_sos1.c \
|
||||||
|
scip/cons_sos2.c \
|
||||||
|
scip/cons_superindicator.c \
|
||||||
|
scip/cons_varbound.c \
|
||||||
|
scip/cons_xor.c \
|
||||||
|
scip/dialog_default.c \
|
||||||
|
scip/disp_default.c \
|
||||||
|
scip/heur_actconsdiving.c \
|
||||||
|
scip/heur_clique.c \
|
||||||
|
scip/heur_coefdiving.c \
|
||||||
|
scip/heur_crossover.c \
|
||||||
|
scip/heur_dins.c \
|
||||||
|
scip/heur_dualval.c \
|
||||||
|
scip/heur_feaspump.c \
|
||||||
|
scip/heur_fixandinfer.c \
|
||||||
|
scip/heur_fracdiving.c \
|
||||||
|
scip/heur_guideddiving.c \
|
||||||
|
scip/heur_zeroobj.c \
|
||||||
|
scip/heur_intdiving.c \
|
||||||
|
scip/heur_intshifting.c \
|
||||||
|
scip/heur_linesearchdiving.c \
|
||||||
|
scip/heur_localbranching.c \
|
||||||
|
scip/heur_mutation.c \
|
||||||
|
scip/heur_nlpdiving.c \
|
||||||
|
scip/heur_objpscostdiving.c \
|
||||||
|
scip/heur_octane.c \
|
||||||
|
scip/heur_oneopt.c \
|
||||||
|
scip/heur_proximity.c \
|
||||||
|
scip/heur_pscostdiving.c \
|
||||||
|
scip/heur_rens.c \
|
||||||
|
scip/heur_randrounding.c \
|
||||||
|
scip/heur_rins.c \
|
||||||
|
scip/heur_rootsoldiving.c \
|
||||||
|
scip/heur_rounding.c \
|
||||||
|
scip/heur_shiftandpropagate.c \
|
||||||
|
scip/heur_shifting.c \
|
||||||
|
scip/heur_simplerounding.c \
|
||||||
|
scip/heur_subnlp.c \
|
||||||
|
scip/heur_trivial.c \
|
||||||
|
scip/heur_trysol.c \
|
||||||
|
scip/heur_twoopt.c \
|
||||||
|
scip/heur_undercover.c \
|
||||||
|
scip/heur_vbounds.c \
|
||||||
|
scip/heur_veclendiving.c \
|
||||||
|
scip/heur_zirounding.c \
|
||||||
|
scip/message_default.c \
|
||||||
|
scip/nodesel_bfs.c \
|
||||||
|
scip/nodesel_breadthfirst.c \
|
||||||
|
scip/nodesel_dfs.c \
|
||||||
|
scip/nodesel_estimate.c \
|
||||||
|
scip/nodesel_hybridestim.c \
|
||||||
|
scip/nodesel_restartdfs.c \
|
||||||
|
scip/nodesel_uct.c \
|
||||||
|
scip/presol_boundshift.c \
|
||||||
|
scip/presol_components.c \
|
||||||
|
scip/presol_convertinttobin.c \
|
||||||
|
scip/presol_domcol.c\
|
||||||
|
scip/presol_dualinfer.c\
|
||||||
|
scip/presol_gateextraction.c \
|
||||||
|
scip/presol_implics.c \
|
||||||
|
scip/presol_inttobinary.c \
|
||||||
|
scip/presol_trivial.c \
|
||||||
|
scip/prop_dualfix.c \
|
||||||
|
scip/prop_genvbounds.c \
|
||||||
|
scip/prop_obbt.c \
|
||||||
|
scip/prop_probing.c \
|
||||||
|
scip/prop_pseudoobj.c \
|
||||||
|
scip/prop_redcost.c \
|
||||||
|
scip/prop_rootredcost.c \
|
||||||
|
scip/prop_vbounds.c \
|
||||||
|
scip/reader_bnd.c \
|
||||||
|
scip/reader_ccg.c \
|
||||||
|
scip/reader_cip.c \
|
||||||
|
scip/reader_cnf.c \
|
||||||
|
scip/reader_fix.c \
|
||||||
|
scip/reader_fzn.c \
|
||||||
|
scip/reader_gms.c \
|
||||||
|
scip/reader_lp.c \
|
||||||
|
scip/reader_mps.c \
|
||||||
|
scip/reader_opb.c \
|
||||||
|
scip/reader_osil.c \
|
||||||
|
scip/reader_pip.c \
|
||||||
|
scip/reader_ppm.c \
|
||||||
|
scip/reader_pbm.c \
|
||||||
|
scip/reader_rlp.c \
|
||||||
|
scip/reader_sol.c \
|
||||||
|
scip/reader_wbo.c \
|
||||||
|
scip/reader_zpl.c \
|
||||||
|
scip/sepa_cgmip.c \
|
||||||
|
scip/sepa_clique.c \
|
||||||
|
scip/sepa_closecuts.c \
|
||||||
|
scip/sepa_cmir.c \
|
||||||
|
scip/sepa_flowcover.c \
|
||||||
|
scip/sepa_gomory.c \
|
||||||
|
scip/sepa_impliedbounds.c \
|
||||||
|
scip/sepa_intobj.c \
|
||||||
|
scip/sepa_mcf.c \
|
||||||
|
scip/sepa_oddcycle.c \
|
||||||
|
scip/sepa_rapidlearning.c \
|
||||||
|
scip/sepa_strongcg.c \
|
||||||
|
scip/sepa_zerohalf.c
|
||||||
|
|
||||||
|
# library files
|
||||||
|
SRC_C += scip/branch.c \
|
||||||
|
scip/buffer.c \
|
||||||
|
scip/clock.c \
|
||||||
|
scip/conflict.c \
|
||||||
|
scip/cons.c \
|
||||||
|
scip/cutpool.c \
|
||||||
|
scip/debug.c \
|
||||||
|
scip/dialog.c \
|
||||||
|
scip/disp.c \
|
||||||
|
scip/event.c \
|
||||||
|
scip/fileio.c \
|
||||||
|
scip/heur.c \
|
||||||
|
scip/history.c \
|
||||||
|
scip/implics.c \
|
||||||
|
scip/interrupt.c \
|
||||||
|
scip/intervalarith.c \
|
||||||
|
scip/lp.c \
|
||||||
|
scip/mem.c \
|
||||||
|
scip/misc.c \
|
||||||
|
scip/nlp.c \
|
||||||
|
scip/nodesel.c \
|
||||||
|
scip/paramset.c \
|
||||||
|
scip/presol.c \
|
||||||
|
scip/presolve.c \
|
||||||
|
scip/pricestore.c \
|
||||||
|
scip/pricer.c \
|
||||||
|
scip/primal.c \
|
||||||
|
scip/prob.c \
|
||||||
|
scip/prop.c \
|
||||||
|
scip/reader.c \
|
||||||
|
scip/relax.c \
|
||||||
|
scip/retcode.c \
|
||||||
|
scip/scip.c \
|
||||||
|
scip/scipdefplugins.c \
|
||||||
|
scip/scipgithash.c \
|
||||||
|
scip/scipshell.c \
|
||||||
|
scip/sepa.c \
|
||||||
|
scip/sepastore.c \
|
||||||
|
scip/set.c \
|
||||||
|
scip/sol.c \
|
||||||
|
scip/solve.c \
|
||||||
|
scip/stat.c \
|
||||||
|
scip/tree.c \
|
||||||
|
scip/var.c \
|
||||||
|
scip/vbc.c \
|
||||||
|
tclique/tclique_branch.c \
|
||||||
|
tclique/tclique_coloring.c \
|
||||||
|
tclique/tclique_graph.c \
|
||||||
|
dijkstra/dijkstra.c \
|
||||||
|
xml/xmlparse.c
|
||||||
|
|
||||||
|
# LP interface (soplex)
|
||||||
|
SOPLEX_DIR = $(call select_from_ports,soplex)/src/lib/soplex/src
|
||||||
|
INC_DIR += $(SOPLEX_DIR)
|
||||||
|
LIBS += stdcxx soplex
|
||||||
|
SRC_CC += lpi/lpi_spx2.cpp
|
||||||
|
SRC_C += scip/bitencode.c \
|
||||||
|
blockmemshell/memory.c \
|
||||||
|
scip/message.c
|
||||||
|
|
||||||
|
# NLP Interface
|
||||||
|
SRC_C += nlpi/nlpi.c \
|
||||||
|
nlpi/nlpioracle.c \
|
||||||
|
nlpi/expr.c \
|
||||||
|
scip/misc.c \
|
||||||
|
scip/intervalarith.c \
|
||||||
|
scip/interrupt.c \
|
||||||
|
scip/message.c \
|
||||||
|
blockmemshell/memory.c \
|
||||||
|
nlpi/exprinterpret_none.c \
|
||||||
|
nlpi/nlpi_ipopt_dummy.c
|
||||||
|
|
||||||
|
vpath %.c $(SCIP_DIR)
|
||||||
|
vpath %.cpp $(SCIP_DIR)
|
||||||
|
|
||||||
|
SHARED_LIB = yes
|
||||||
64
lib/mk/soplex.mk
Normal file
64
lib/mk/soplex.mk
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
SOPLEX_DIR = $(call select_from_ports,soplex)/src/lib/soplex/src/
|
||||||
|
LIBS += libc zlib gmp stdcxx libm
|
||||||
|
INC_DIR += $(SOPLEX_DIR)
|
||||||
|
SRC_CC = changesoplex.cpp \
|
||||||
|
clufactor.cpp \
|
||||||
|
didxset.cpp \
|
||||||
|
enter.cpp \
|
||||||
|
gzstream.cpp \
|
||||||
|
idxset.cpp \
|
||||||
|
leave.cpp \
|
||||||
|
mpsinput.cpp \
|
||||||
|
nameset.cpp \
|
||||||
|
rational.cpp \
|
||||||
|
slufactor.cpp \
|
||||||
|
solverational.cpp \
|
||||||
|
solvereal.cpp \
|
||||||
|
soplex.cpp \
|
||||||
|
soplexlegacy.cpp \
|
||||||
|
spxautopr.cpp \
|
||||||
|
spxbasis.cpp \
|
||||||
|
spxboundflippingrt.cpp \
|
||||||
|
spxbounds.cpp \
|
||||||
|
spxchangebasis.cpp \
|
||||||
|
spxdantzigpr.cpp \
|
||||||
|
spxdefaultrt.cpp \
|
||||||
|
spxdefines.cpp \
|
||||||
|
spxdesc.cpp \
|
||||||
|
spxdevexpr.cpp \
|
||||||
|
spxequilisc.cpp \
|
||||||
|
spxfastrt.cpp \
|
||||||
|
spxfileio.cpp \
|
||||||
|
spxgeometsc.cpp \
|
||||||
|
spxgithash.cpp \
|
||||||
|
spxharrisrt.cpp \
|
||||||
|
spxhybridpr.cpp \
|
||||||
|
spxid.cpp \
|
||||||
|
spxlpbase_rational.cpp \
|
||||||
|
spxlpbase_real.cpp \
|
||||||
|
spxmainsm.cpp \
|
||||||
|
spxout.cpp \
|
||||||
|
spxparmultpr.cpp \
|
||||||
|
spxquality.cpp \
|
||||||
|
spxscaler.cpp \
|
||||||
|
spxshift.cpp \
|
||||||
|
spxsolve.cpp \
|
||||||
|
spxsolver.cpp \
|
||||||
|
spxstarter.cpp \
|
||||||
|
spxsteeppr.cpp \
|
||||||
|
spxsumst.cpp \
|
||||||
|
spxvecs.cpp \
|
||||||
|
spxvectorst.cpp \
|
||||||
|
spxweightpr.cpp \
|
||||||
|
spxweightst.cpp \
|
||||||
|
spxwritestate.cpp \
|
||||||
|
statistics.cpp \
|
||||||
|
timer.cpp \
|
||||||
|
unitvector.cpp \
|
||||||
|
updatevector.cpp
|
||||||
|
|
||||||
|
CC_WARN =
|
||||||
|
|
||||||
|
vpath %.cpp $(SOPLEX_DIR)
|
||||||
|
|
||||||
|
SHARED_LIB = yes
|
||||||
1
ports/scip.hash
Normal file
1
ports/scip.hash
Normal file
@@ -0,0 +1 @@
|
|||||||
|
f16e426eadd0e0a618c3ee769b011c06ec319b71
|
||||||
46
ports/scip.port
Normal file
46
ports/scip.port
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
LICENSE := ZIB Academic License
|
||||||
|
VERSION := 3.1.0
|
||||||
|
DOWNLOADS := scip.archive
|
||||||
|
|
||||||
|
URL(scip) := http://scip.zib.de/download/release/scip-$(VERSION).tgz
|
||||||
|
SHA(scip) := 6a5b3f26bfa978bc46978c702c27444ca0b16120
|
||||||
|
DIR(scip) := src/lib/scip
|
||||||
|
|
||||||
|
PATCHES := src/lib/scip/clock.patch
|
||||||
|
|
||||||
|
DIRS := include/scip include/blockmemshell include/nlpi include/lpi
|
||||||
|
|
||||||
|
DIR_CONTENT(include/scip) := $(addprefix src/lib/scip/src/scip/,scip.h \
|
||||||
|
def.h \
|
||||||
|
presolve.h \
|
||||||
|
intervalarith.h \
|
||||||
|
scipshell.h \
|
||||||
|
scipdefplugins.h \
|
||||||
|
disp.h \
|
||||||
|
misc.h \
|
||||||
|
vbc.h \
|
||||||
|
type_*.h \
|
||||||
|
pub_*.h \
|
||||||
|
struct_*.h \
|
||||||
|
branch_*.h \
|
||||||
|
cons_*.h \
|
||||||
|
disp_*.h \
|
||||||
|
heur_*.h \
|
||||||
|
nodesel_*.h \
|
||||||
|
presol_*.h \
|
||||||
|
prop_*.h \
|
||||||
|
reader_*.h \
|
||||||
|
sepa_*.h)
|
||||||
|
|
||||||
|
DIR_CONTENT(include/blockmemshell) := src/lib/scip/src/blockmemshell/memory.h
|
||||||
|
|
||||||
|
DIR_CONTENT(include/nlpi) := $(addprefix src/lib/scip/src/nlpi/,nlpi.h \
|
||||||
|
intervalarithext.h \
|
||||||
|
exprinterpret.h \
|
||||||
|
nlpi_ipopt.h \
|
||||||
|
nlpioracle.h \
|
||||||
|
type_*.h \
|
||||||
|
pub_*.h \
|
||||||
|
struct*.h)
|
||||||
|
|
||||||
|
DIR_CONTENT(include/lpi) := $(addprefix src/lib/scip/src/lpi/,lpi.h type_lpi.h)
|
||||||
1
ports/soplex.hash
Normal file
1
ports/soplex.hash
Normal file
@@ -0,0 +1 @@
|
|||||||
|
954a138ee6d6a4911d0277fa3663f6c4a9b526d5
|
||||||
10
ports/soplex.port
Normal file
10
ports/soplex.port
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
LICENSE := ZIB Academic License
|
||||||
|
VERSION := 2.0.0
|
||||||
|
DOWNLOADS := soplex.archive
|
||||||
|
|
||||||
|
URL(soplex) := http://soplex.zib.de/download/release/soplex-$(VERSION).tgz
|
||||||
|
SHA(soplex) := 054fd0b1e370b999babf9ad537a230965b66808a
|
||||||
|
DIR(soplex) := src/lib/soplex
|
||||||
|
|
||||||
|
DIRS := include/soplex
|
||||||
|
DIR_CONTENT(include/soplex) := $(addprefix src/lib/soplex/src/,soplex.h)
|
||||||
45
run/scip.run
Normal file
45
run/scip.run
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
build "core init test/scip"
|
||||||
|
|
||||||
|
create_boot_directory
|
||||||
|
|
||||||
|
install_config {
|
||||||
|
<config>
|
||||||
|
<parent-provides>
|
||||||
|
<service name="ROM"/>
|
||||||
|
<service name="RAM"/>
|
||||||
|
<service name="IRQ"/>
|
||||||
|
<service name="IO_MEM"/>
|
||||||
|
<service name="IO_PORT"/>
|
||||||
|
<service name="CAP"/>
|
||||||
|
<service name="PD"/>
|
||||||
|
<service name="RM"/>
|
||||||
|
<service name="CPU"/>
|
||||||
|
<service name="LOG"/>
|
||||||
|
<service name="SIGNAL"/>
|
||||||
|
</parent-provides>
|
||||||
|
<default-route>
|
||||||
|
<any-service> <parent/> <any-child/> </any-service>
|
||||||
|
</default-route>
|
||||||
|
<start name="test-scip">
|
||||||
|
<resource name="RAM" quantum="16M"/>
|
||||||
|
<config>
|
||||||
|
<arg value="queens"/>
|
||||||
|
<arg value="5"/>
|
||||||
|
<libc stdin="/dev/null" stdout="/dev/log" stderr="/dev/log">
|
||||||
|
<vfs> <dir name="dev"> <log/> <null/> </dir> </vfs>
|
||||||
|
</libc>
|
||||||
|
</config>
|
||||||
|
</start>
|
||||||
|
</config>
|
||||||
|
}
|
||||||
|
|
||||||
|
build_boot_image {
|
||||||
|
core init test-scip
|
||||||
|
ld.lib.so libc.lib.so libm.lib.so
|
||||||
|
stdcxx.lib.so soplex.lib.so zlib.lib.so gmp.lib.so scip.lib.so
|
||||||
|
}
|
||||||
|
|
||||||
|
append qemu_args " -nographic -m 64 "
|
||||||
|
|
||||||
|
run_genode_until "child \"test-scip\" exited with exit value 0" 20
|
||||||
|
|
||||||
42
run/soplex.run
Normal file
42
run/soplex.run
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
build "core init test/soplex"
|
||||||
|
|
||||||
|
create_boot_directory
|
||||||
|
|
||||||
|
install_config {
|
||||||
|
<config>
|
||||||
|
<parent-provides>
|
||||||
|
<service name="ROM"/>
|
||||||
|
<service name="RAM"/>
|
||||||
|
<service name="IRQ"/>
|
||||||
|
<service name="IO_MEM"/>
|
||||||
|
<service name="IO_PORT"/>
|
||||||
|
<service name="CAP"/>
|
||||||
|
<service name="PD"/>
|
||||||
|
<service name="RM"/>
|
||||||
|
<service name="CPU"/>
|
||||||
|
<service name="LOG"/>
|
||||||
|
</parent-provides>
|
||||||
|
<default-route>
|
||||||
|
<any-service> <parent/> <any-child/> </any-service>
|
||||||
|
</default-route>
|
||||||
|
<start name="test-soplex">
|
||||||
|
<resource name="RAM" quantum="2M"/>
|
||||||
|
<config>
|
||||||
|
<libc stdin="/dev/null" stdout="/dev/log" stderr="/dev/log">
|
||||||
|
<vfs> <dir name="dev"> <log/> <null/> </dir> </vfs>
|
||||||
|
</libc>
|
||||||
|
</config>
|
||||||
|
</start>
|
||||||
|
</config>
|
||||||
|
}
|
||||||
|
|
||||||
|
build_boot_image {
|
||||||
|
core init test-soplex
|
||||||
|
ld.lib.so libc.lib.so libm.lib.so
|
||||||
|
stdcxx.lib.so soplex.lib.so zlib.lib.so gmp.lib.so
|
||||||
|
}
|
||||||
|
|
||||||
|
append qemu_args " -nographic -m 64 "
|
||||||
|
|
||||||
|
run_genode_until "child \"test-soplex\" exited with exit value 0" 20
|
||||||
|
|
||||||
11
src/lib/scip/clock.patch
Normal file
11
src/lib/scip/clock.patch
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
+++ src/lib/scip/src/scip/clock.c 2014-03-21 14:00:59.966170346 +0100
|
||||||
|
@@ -417,6 +417,9 @@ SCIP_Real SCIPclockGetTime(
|
||||||
|
SCIP_Real result;
|
||||||
|
assert(clck != NULL);
|
||||||
|
result = 0.0;
|
||||||
|
+
|
||||||
|
+ /* FIXME adapt implementation for Genode */
|
||||||
|
+ return result;
|
||||||
|
|
||||||
|
SCIPdebugMessage("getting time of clock %p (type %d, usedefault=%u, nruns=%d)\n",
|
||||||
|
(void*)clck, clck->clocktype, clck->usedefault, clck->nruns);
|
||||||
8
src/test/scip/target.mk
Normal file
8
src/test/scip/target.mk
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
TARGET = test-scip
|
||||||
|
LIBS = libc scip stdcxx config_args
|
||||||
|
SCIP_DIR = $(call select_from_ports,scip)/src/lib/scip/
|
||||||
|
EX_DIR = $(SCIP_DIR)/examples/Queens/src
|
||||||
|
INC_DIR += $(EX_DIR)
|
||||||
|
SRC_CC = queens.cpp queens_main.cpp
|
||||||
|
|
||||||
|
vpath %.cpp $(EX_DIR)
|
||||||
6
src/test/soplex/target.mk
Normal file
6
src/test/soplex/target.mk
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
TARGET = test-soplex
|
||||||
|
LIBS = soplex stdcxx
|
||||||
|
SOPLEX = $(call select_from_ports,soplex)/src/lib/soplex/src/
|
||||||
|
SRC_CC = example.cpp
|
||||||
|
|
||||||
|
vpath example.cpp $(SOPLEX)
|
||||||
Reference in New Issue
Block a user