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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite SCIP wrapper with Clang.jl to support a MIP solver through MOI #76

Merged
merged 82 commits into from
Jan 6, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
158beb4
add gen/generate_wrapper.jl
rschwarz Dec 14, 2018
39d47e9
add folder for generated wrapper files
rschwarz Dec 14, 2018
7c3b621
wrap all scip_*.h files
rschwarz Dec 14, 2018
c4bb9ac
wrap selected type_*.h headers
rschwarz Dec 14, 2018
4d5ef74
wrap almost all type_*.h headers
rschwarz Dec 14, 2018
479aae1
don't add pub_*.h headers (for now)
rschwarz Dec 14, 2018
d221a07
also wrap type_var.h
rschwarz Dec 14, 2018
d84a772
adapt generate_wrapper.jl to `restruct` branch of Clang.jl
rschwarz Dec 15, 2018
41c21f9
no special order of type_* headers in generate_wrapper.jl
rschwarz Dec 15, 2018
92d3685
regenerate wrapper
rschwarz Dec 15, 2018
baa31dd
reset README
rschwarz Dec 15, 2018
8e1ee3e
update LICENSE, REQUIRE
rschwarz Dec 15, 2018
3fd6395
delete most of the old code (and tests)
rschwarz Dec 15, 2018
91dbc68
add deps/build.jl
rschwarz Dec 15, 2018
9f9b2be
include all wrappers into another file
rschwarz Dec 15, 2018
fbc281f
add some manually wrapped constants :-(
rschwarz Dec 15, 2018
a58373e
rename type SCIP to SCIP_, avoid name conflict with module
rschwarz Dec 15, 2018
8a3f945
manually define FILE
rschwarz Dec 15, 2018
31b9959
include nlpi headers in generate_wrapper.jl
rschwarz Dec 15, 2018
187ea2b
include lpi headers in generate_wrapper.jl
rschwarz Dec 15, 2018
fe558bd
manually define BMS_{BLK,BUF}MEM
rschwarz Dec 15, 2018
8c60dff
check version during module init
rschwarz Dec 16, 2018
e9282e0
start on first test
rschwarz Dec 16, 2018
b9d1f7c
generate wrapper for scipdefplugins.h
rschwarz Dec 16, 2018
93218b4
wrap included tests in named testset
rschwarz Dec 16, 2018
dd9bea0
extend first test
rschwarz Dec 16, 2018
c1c5f8d
build.jl: check environment variable first
rschwarz Dec 17, 2018
94749bc
extend first test (actually add variable)
rschwarz Dec 17, 2018
e7401cf
generate_wrapper: include all cons_* headers
rschwarz Dec 17, 2018
b53ca2a
test: add linear constraint
rschwarz Dec 18, 2018
4810361
fix type in test
rschwarz Dec 18, 2018
543a572
add MOI to REQUIRE
rschwarz Dec 18, 2018
81ce845
prepare MOI_wrapper.jl
rschwarz Dec 19, 2018
f35860a
add ManagedSCIP (for memory) and include in Optimizer
rschwarz Dec 20, 2018
49bbe94
manage vars, conss for ManagedSCIP
rschwarz Dec 20, 2018
42bed2d
add simple @SC macro for SCIP_CALL
rschwarz Dec 20, 2018
f50bef4
add Travis CI config
rschwarz Dec 20, 2018
d3316aa
travis: install scip .deb package
rschwarz Dec 20, 2018
5a96eae
travis: add `using Pkg`
rschwarz Dec 20, 2018
5d08d9a
travis: install some dependencies
rschwarz Dec 20, 2018
2f8cd78
add .codecov.yml
rschwarz Dec 20, 2018
de1a030
implement more methods to support contlineartest (WIP)
rschwarz Dec 21, 2018
eab75e8
generate_wrapper: include pub_*.h headers
rschwarz Dec 22, 2018
041024d
implement enough of MOI to get to the actual solution query
rschwarz Dec 22, 2018
e74b98d
implement status and solution queries
rschwarz Dec 22, 2018
c6ed123
add allow_modification(o) to reset SCIP stage
rschwarz Dec 22, 2018
60c26ec
implement more problem modification
rschwarz Dec 22, 2018
b97dcff
do not support linear constraints with constant offset
rschwarz Dec 22, 2018
85ea505
add more solution queries
rschwarz Dec 22, 2018
0abb816
enable some MOI contlinear tests
rschwarz Dec 22, 2018
f4b71d8
fix ResultCount for unbounded problems
rschwarz Dec 22, 2018
49494b4
support basic, generic parameter setting
rschwarz Dec 22, 2018
aa3d318
disable SCIP output for MOI tests
rschwarz Dec 22, 2018
f34c1d0
fix get(ConstraintPrimal, SingleVariable)
rschwarz Dec 22, 2018
92d42b9
support problem and variable names
rschwarz Dec 22, 2018
a99be15
support names for some constraints
rschwarz Dec 22, 2018
3d92cfc
try to support names for SingleVariable constraints
rschwarz Dec 23, 2018
ee976e7
partially revert support for names
rschwarz Dec 23, 2018
110682c
use abbreviations for MOI types
rschwarz Dec 23, 2018
acecde3
support variable types binary, integer
rschwarz Dec 23, 2018
97a2108
add more solve statistics
rschwarz Dec 23, 2018
b3ef38d
enable some intlineartests
rschwarz Dec 23, 2018
e1821f1
update README
rschwarz Dec 23, 2018
7e4054b
README: fix typos
rschwarz Dec 23, 2018
279fae4
README: fix typo, more detail about pointer types
rschwarz Jan 4, 2019
c5d54e3
add dummy SCIPSolver() to warn old users about MPB/MOI.
rschwarz Jan 4, 2019
5f5d2c1
rm dependency on Compat
rschwarz Jan 4, 2019
cb51e3d
add version check agains upper bound (next major)
rschwarz Jan 4, 2019
b4e7529
documentation formatting
rschwarz Jan 4, 2019
881b9a7
added documentation
rschwarz Jan 4, 2019
d098f10
use get_* functions more
rschwarz Jan 6, 2019
d7c20e0
rm get_ prefix for accessor functions
rschwarz Jan 6, 2019
8a89494
introduce VarRef, ConsRef in place of Ints
rschwarz Jan 6, 2019
d231570
add copyright notice to files from Clang.jl
rschwarz Jan 6, 2019
d8a5fd8
reconsider type aliases
rschwarz Jan 6, 2019
8d70941
add explicit return keywords to functions
rschwarz Jan 6, 2019
3ea173a
rm empty test/REQUIRE
rschwarz Jan 6, 2019
04e31fe
rm test that depends on GC behavior
rschwarz Jan 6, 2019
f4b5883
add test for memory mgmt with solving
rschwarz Jan 6, 2019
7da7c14
warn about setting FEASIBLITY_SENSE
rschwarz Jan 6, 2019
3ed02b0
map gap limit to MOI.OPTIMAL (conform with other solvers)
rschwarz Jan 6, 2019
3b4f087
constant names consistent with style guide
rschwarz Jan 6, 2019
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
Prev Previous commit
Next Next commit
generate_wrapper: include pub_*.h headers
 - need it now for SCIPvarGetObj from pub_var.h
  • Loading branch information
rschwarz committed Dec 22, 2018
commit eab75e87617156dff3df25dd31a10580f3b3d4fe
2 changes: 1 addition & 1 deletion gen/generate_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ HEADER_BASE = "/usr/include" # using system-wide installation of SCIP
all_headers = readdir(joinpath(HEADER_BASE, "scip"))
scip_headers = vcat(
filter(h -> startswith(h, "type_"), all_headers),
# filter(h -> startswith(h, "pub_"), all_headers),
filter(h -> startswith(h, "pub_"), all_headers),
filter(h -> startswith(h, "scip_"), all_headers),
"scipdefplugins.h",
filter(h -> startswith(h, "cons_"), all_headers),
Expand Down
41 changes: 41 additions & 0 deletions src/wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,47 @@ include(wrap("scip_var"))
# default SCIP plugins
include(wrap("scipdefplugins"))

# other public headers
include(wrap("pub_bandit_epsgreedy"))
include(wrap("pub_bandit_exp3"))
include(wrap("pub_bandit"))
include(wrap("pub_bandit_ucb"))
include(wrap("pub_benderscut"))
include(wrap("pub_benders"))
include(wrap("pub_branch"))
include(wrap("pub_compr"))
include(wrap("pub_conflict"))
include(wrap("pub_cons"))
include(wrap("pub_cutpool"))
include(wrap("pub_dialog"))
include(wrap("pub_disp"))
include(wrap("pub_event"))
include(wrap("pub_fileio"))
include(wrap("pub_heur"))
include(wrap("pub_history"))
include(wrap("pub_implics"))
include(wrap("pub_lp"))
include(wrap("pub_matrix"))
include(wrap("pub_message"))
include(wrap("pub_misc"))
include(wrap("pub_misc_linear"))
include(wrap("pub_misc_select"))
include(wrap("pub_misc_sort"))
include(wrap("pub_nlp"))
include(wrap("pub_nodesel"))
include(wrap("pub_paramset"))
include(wrap("pub_presol"))
include(wrap("pub_pricer"))
include(wrap("pub_prop"))
include(wrap("pub_reader"))
include(wrap("pub_relax"))
include(wrap("pub_reopt"))
include(wrap("pub_sepa"))
include(wrap("pub_sol"))
include(wrap("pub_table"))
include(wrap("pub_tree"))
include(wrap("pub_var"))

# all constraint types
include(wrap("cons_abspower"))
include(wrap("cons_and"))
Expand Down
2 changes: 2 additions & 0 deletions src/wrapper/commons.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,8 @@ const SCIP_VARDATA = SCIP_VarData
const SCIP_VBCCOLOR = SCIP_VBCColor
const SCIP_Visual = Cvoid
const SCIP_VISUAL = SCIP_Visual
const SCIP_File = Cvoid
const SCIP_FILE = SCIP_File

# Skipping MacroDefinition: SCIPallocMemory ( scip , ptr ) ( ( BMSallocMemory ( ( ptr ) ) == NULL ) ? SCIP_NOMEMORY : SCIP_OKAY )
# Skipping MacroDefinition: SCIPallocMemoryArray ( scip , ptr , num ) ( ( BMSallocMemoryArray ( ( ptr ) , ( num ) ) == NULL ) ? SCIP_NOMEMORY : SCIP_OKAY )
Expand Down
23 changes: 23 additions & 0 deletions src/wrapper/pub_bandit.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Julia wrapper for header: /usr/include/scip/pub_bandit.h
# Automatically generated using Clang.jl wrap_c


function SCIPbanditSelect(bandit, action)
ccall((:SCIPbanditSelect, libscip), SCIP_RETCODE, (Ptr{SCIP_BANDIT}, Ptr{Cint}), bandit, action)
end

function SCIPbanditUpdate(bandit, action, score)
ccall((:SCIPbanditUpdate, libscip), SCIP_RETCODE, (Ptr{SCIP_BANDIT}, Cint, Cdouble), bandit, action, score)
end

function SCIPbanditvtableGetName(banditvtable)
ccall((:SCIPbanditvtableGetName, libscip), Cstring, (Ptr{SCIP_BANDITVTABLE},), banditvtable)
end

function SCIPbanditGetRandnumgen()
ccall((:SCIPbanditGetRandnumgen, libscip), Ptr{Cint}, ())
end

function SCIPbanditGetNActions(bandit)
ccall((:SCIPbanditGetNActions, libscip), Cint, (Ptr{SCIP_BANDIT},), bandit)
end
15 changes: 15 additions & 0 deletions src/wrapper/pub_bandit_epsgreedy.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Julia wrapper for header: /usr/include/scip/pub_bandit_epsgreedy.h
# Automatically generated using Clang.jl wrap_c


function SCIPcreateBanditEpsgreedy(scip, epsgreedy, priorities, eps, preferrecent, decayfactor, avglim, nactions, initseed)
ccall((:SCIPcreateBanditEpsgreedy, libscip), SCIP_RETCODE, (Ptr{SCIP_}, Ptr{Ptr{SCIP_BANDIT}}, Ptr{Cdouble}, Cdouble, UInt32, Cdouble, Cint, Cint, UInt32), scip, epsgreedy, priorities, eps, preferrecent, decayfactor, avglim, nactions, initseed)
end

function SCIPgetWeightsEpsgreedy(epsgreedy)
ccall((:SCIPgetWeightsEpsgreedy, libscip), Ptr{Cdouble}, (Ptr{SCIP_BANDIT},), epsgreedy)
end

function SCIPsetEpsilonEpsgreedy(epsgreedy, eps)
ccall((:SCIPsetEpsilonEpsgreedy, libscip), Cvoid, (Ptr{SCIP_BANDIT}, Cdouble), epsgreedy, eps)
end
19 changes: 19 additions & 0 deletions src/wrapper/pub_bandit_exp3.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Julia wrapper for header: /usr/include/scip/pub_bandit_exp3.h
# Automatically generated using Clang.jl wrap_c


function SCIPcreateBanditExp3(scip, exp3, priorities, gammaparam, beta, nactions, initseed)
ccall((:SCIPcreateBanditExp3, libscip), SCIP_RETCODE, (Ptr{SCIP_}, Ptr{Ptr{SCIP_BANDIT}}, Ptr{Cdouble}, Cdouble, Cdouble, Cint, UInt32), scip, exp3, priorities, gammaparam, beta, nactions, initseed)
end

function SCIPsetGammaExp3(exp3, gammaparam)
ccall((:SCIPsetGammaExp3, libscip), Cvoid, (Ptr{SCIP_BANDIT}, Cdouble), exp3, gammaparam)
end

function SCIPsetBetaExp3(exp3, beta)
ccall((:SCIPsetBetaExp3, libscip), Cvoid, (Ptr{SCIP_BANDIT}, Cdouble), exp3, beta)
end

function SCIPgetProbabilityExp3(exp3, action)
ccall((:SCIPgetProbabilityExp3, libscip), Cdouble, (Ptr{SCIP_BANDIT}, Cint), exp3, action)
end
15 changes: 15 additions & 0 deletions src/wrapper/pub_bandit_ucb.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Julia wrapper for header: /usr/include/scip/pub_bandit_ucb.h
# Automatically generated using Clang.jl wrap_c


function SCIPcreateBanditUcb(scip, ucb, priorities, alpha, nactions, initseed)
ccall((:SCIPcreateBanditUcb, libscip), SCIP_RETCODE, (Ptr{SCIP_}, Ptr{Ptr{SCIP_BANDIT}}, Ptr{Cdouble}, Cdouble, Cint, UInt32), scip, ucb, priorities, alpha, nactions, initseed)
end

function SCIPgetConfidenceBoundUcb(ucb, action)
ccall((:SCIPgetConfidenceBoundUcb, libscip), Cdouble, (Ptr{SCIP_BANDIT}, Cint), ucb, action)
end

function SCIPgetStartPermutationUcb(ucb)
ccall((:SCIPgetStartPermutationUcb, libscip), Ptr{Cint}, (Ptr{SCIP_BANDIT},), ucb)
end
159 changes: 159 additions & 0 deletions src/wrapper/pub_benders.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
# Julia wrapper for header: /usr/include/scip/pub_benders.h
# Automatically generated using Clang.jl wrap_c


function SCIPbendersComp(elem1, elem2)
ccall((:SCIPbendersComp, libscip), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), elem1, elem2)
end

function SCIPbendersCompName(elem1, elem2)
ccall((:SCIPbendersCompName, libscip), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), elem1, elem2)
end

function SCIPbendersGetData(benders)
ccall((:SCIPbendersGetData, libscip), Ptr{SCIP_BENDERSDATA}, (Ptr{SCIP_BENDERS},), benders)
end

function SCIPbendersSetData(benders, bendersdata)
ccall((:SCIPbendersSetData, libscip), Cvoid, (Ptr{SCIP_BENDERS}, Ptr{SCIP_BENDERSDATA}), benders, bendersdata)
end

function SCIPbendersGetName(benders)
ccall((:SCIPbendersGetName, libscip), Cstring, (Ptr{SCIP_BENDERS},), benders)
end

function SCIPbendersGetDesc(benders)
ccall((:SCIPbendersGetDesc, libscip), Cstring, (Ptr{SCIP_BENDERS},), benders)
end

function SCIPbendersGetPriority(benders)
ccall((:SCIPbendersGetPriority, libscip), Cint, (Ptr{SCIP_BENDERS},), benders)
end

function SCIPbendersGetNSubproblems(benders)
ccall((:SCIPbendersGetNSubproblems, libscip), Cint, (Ptr{SCIP_BENDERS},), benders)
end

function SCIPbendersSubproblem(benders, probnumber)
ccall((:SCIPbendersSubproblem, libscip), Ptr{SCIP_}, (Ptr{SCIP_BENDERS}, Cint), benders, probnumber)
end

function SCIPbendersGetNCalls(benders)
ccall((:SCIPbendersGetNCalls, libscip), Cint, (Ptr{SCIP_BENDERS},), benders)
end

function SCIPbendersGetNCutsFound(benders)
ccall((:SCIPbendersGetNCutsFound, libscip), Cint, (Ptr{SCIP_BENDERS},), benders)
end

function SCIPbendersGetSetupTime(benders)
ccall((:SCIPbendersGetSetupTime, libscip), Cdouble, (Ptr{SCIP_BENDERS},), benders)
end

function SCIPbendersGetTime(benders)
ccall((:SCIPbendersGetTime, libscip), Cdouble, (Ptr{SCIP_BENDERS},), benders)
end

function SCIPbendersIsInitialized(benders)
ccall((:SCIPbendersIsInitialized, libscip), UInt32, (Ptr{SCIP_BENDERS},), benders)
end

function SCIPbendersIsActive(benders)
ccall((:SCIPbendersIsActive, libscip), UInt32, (Ptr{SCIP_BENDERS},), benders)
end

function SCIPbendersOnlyCheckConvexRelax(benders)
ccall((:SCIPbendersOnlyCheckConvexRelax, libscip), UInt32, (Ptr{SCIP_BENDERS},), benders)
end

function SCIPbendersCutLP(benders)
ccall((:SCIPbendersCutLP, libscip), UInt32, (Ptr{SCIP_BENDERS},), benders)
end

function SCIPbendersCutPseudo(benders)
ccall((:SCIPbendersCutPseudo, libscip), UInt32, (Ptr{SCIP_BENDERS},), benders)
end

function SCIPbendersCutRelaxation(benders)
ccall((:SCIPbendersCutRelaxation, libscip), UInt32, (Ptr{SCIP_BENDERS},), benders)
end

function SCIPbendersShareAuxVars(benders)
ccall((:SCIPbendersShareAuxVars, libscip), UInt32, (Ptr{SCIP_BENDERS},), benders)
end

function SCIPbendersGetAuxiliaryVar(benders, probnumber)
ccall((:SCIPbendersGetAuxiliaryVar, libscip), Ptr{SCIP_VAR}, (Ptr{SCIP_BENDERS}, Cint), benders, probnumber)
end

function SCIPbendersGetAuxiliaryVars(benders)
ccall((:SCIPbendersGetAuxiliaryVars, libscip), Ptr{Ptr{SCIP_VAR}}, (Ptr{SCIP_BENDERS},), benders)
end

function SCIPbendersSetSubproblemObjval(benders, probnumber, objval)
ccall((:SCIPbendersSetSubproblemObjval, libscip), Cvoid, (Ptr{SCIP_BENDERS}, Cint, Cdouble), benders, probnumber, objval)
end

function SCIPbendersGetSubproblemObjval(benders, probnumber)
ccall((:SCIPbendersGetSubproblemObjval, libscip), Cdouble, (Ptr{SCIP_BENDERS}, Cint), benders, probnumber)
end

function SCIPfindBenderscut(benders, name)
ccall((:SCIPfindBenderscut, libscip), Ptr{SCIP_BENDERSCUT}, (Ptr{SCIP_BENDERS}, Cstring), benders, name)
end

function SCIPbendersGetBenderscuts(benders)
ccall((:SCIPbendersGetBenderscuts, libscip), Ptr{Ptr{SCIP_BENDERSCUT}}, (Ptr{SCIP_BENDERS},), benders)
end

function SCIPbendersGetNBenderscuts(benders)
ccall((:SCIPbendersGetNBenderscuts, libscip), Cint, (Ptr{SCIP_BENDERS},), benders)
end

function SCIPbendersSetBenderscutPriority(benders, benderscut, priority)
ccall((:SCIPbendersSetBenderscutPriority, libscip), SCIP_RETCODE, (Ptr{SCIP_BENDERS}, Ptr{SCIP_BENDERSCUT}, Cint), benders, benderscut, priority)
end

function SCIPbendersSetSubproblemIsConvex(benders, probnumber, isconvex)
ccall((:SCIPbendersSetSubproblemIsConvex, libscip), Cvoid, (Ptr{SCIP_BENDERS}, Cint, UInt32), benders, probnumber, isconvex)
end

function SCIPbendersSubproblemIsConvex(benders, probnumber)
ccall((:SCIPbendersSubproblemIsConvex, libscip), UInt32, (Ptr{SCIP_BENDERS}, Cint), benders, probnumber)
end

function SCIPbendersGetNConvexSubproblems(benders)
ccall((:SCIPbendersGetNConvexSubproblems, libscip), Cint, (Ptr{SCIP_BENDERS},), benders)
end

function SCIPbendersSolveSubproblemLP(scip, benders, probnumber, infeasible)
ccall((:SCIPbendersSolveSubproblemLP, libscip), SCIP_RETCODE, (Ptr{SCIP_}, Ptr{SCIP_BENDERS}, Cint, Ptr{UInt32}), scip, benders, probnumber, infeasible)
end

function SCIPbendersSolveSubproblemCIP(scip, benders, probnumber, infeasible, type, solvecip)
ccall((:SCIPbendersSolveSubproblemCIP, libscip), SCIP_RETCODE, (Ptr{SCIP_}, Ptr{SCIP_BENDERS}, Cint, Ptr{UInt32}, SCIP_BENDERSENFOTYPE, UInt32), scip, benders, probnumber, infeasible, type, solvecip)
end

function SCIPbendersGetNTransferredCuts(benders)
ccall((:SCIPbendersGetNTransferredCuts, libscip), Cint, (Ptr{SCIP_BENDERS},), benders)
end

function SCIPbendersUpdateSubproblemLowerbound(benders, probnumber, lowerbound)
ccall((:SCIPbendersUpdateSubproblemLowerbound, libscip), Cvoid, (Ptr{SCIP_BENDERS}, Cint, Cdouble), benders, probnumber, lowerbound)
end

function SCIPbendersGetSubproblemLowerbound(benders, probnumber)
ccall((:SCIPbendersGetSubproblemLowerbound, libscip), Cdouble, (Ptr{SCIP_BENDERS}, Cint), benders, probnumber)
end

function SCIPbendersSetSubproblemIsIndependent(benders, probnumber, isindep)
ccall((:SCIPbendersSetSubproblemIsIndependent, libscip), Cvoid, (Ptr{SCIP_BENDERS}, Cint, UInt32), benders, probnumber, isindep)
end

function SCIPbendersSubproblemIsIndependent(benders, probnumber)
ccall((:SCIPbendersSubproblemIsIndependent, libscip), UInt32, (Ptr{SCIP_BENDERS}, Cint), benders, probnumber)
end

function SCIPbendersSubproblemIsEnabled(benders, probnumber)
ccall((:SCIPbendersSubproblemIsEnabled, libscip), UInt32, (Ptr{SCIP_BENDERS}, Cint), benders, probnumber)
end
67 changes: 67 additions & 0 deletions src/wrapper/pub_benderscut.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Julia wrapper for header: /usr/include/scip/pub_benderscut.h
# Automatically generated using Clang.jl wrap_c


function SCIPbenderscutComp(elem1, elem2)
ccall((:SCIPbenderscutComp, libscip), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), elem1, elem2)
end

function SCIPbenderscutCompName(elem1, elem2)
ccall((:SCIPbenderscutCompName, libscip), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), elem1, elem2)
end

function SCIPbenderscutGetData(benderscut)
ccall((:SCIPbenderscutGetData, libscip), Ptr{SCIP_BENDERSCUTDATA}, (Ptr{SCIP_BENDERSCUT},), benderscut)
end

function SCIPbenderscutSetData(benderscut, benderscutdata)
ccall((:SCIPbenderscutSetData, libscip), Cvoid, (Ptr{SCIP_BENDERSCUT}, Ptr{SCIP_BENDERSCUTDATA}), benderscut, benderscutdata)
end

function SCIPbenderscutGetName(benderscut)
ccall((:SCIPbenderscutGetName, libscip), Cstring, (Ptr{SCIP_BENDERSCUT},), benderscut)
end

function SCIPbenderscutGetDesc(benderscut)
ccall((:SCIPbenderscutGetDesc, libscip), Cstring, (Ptr{SCIP_BENDERSCUT},), benderscut)
end

function SCIPbenderscutGetPriority(benderscut)
ccall((:SCIPbenderscutGetPriority, libscip), Cint, (Ptr{SCIP_BENDERSCUT},), benderscut)
end

function SCIPbenderscutGetNCalls(benderscut)
ccall((:SCIPbenderscutGetNCalls, libscip), Clonglong, (Ptr{SCIP_BENDERSCUT},), benderscut)
end

function SCIPbenderscutGetNFound(benderscut)
ccall((:SCIPbenderscutGetNFound, libscip), Clonglong, (Ptr{SCIP_BENDERSCUT},), benderscut)
end

function SCIPbenderscutIsInitialized(benderscut)
ccall((:SCIPbenderscutIsInitialized, libscip), UInt32, (Ptr{SCIP_BENDERSCUT},), benderscut)
end

function SCIPbenderscutGetSetupTime(benderscut)
ccall((:SCIPbenderscutGetSetupTime, libscip), Cdouble, (Ptr{SCIP_BENDERSCUT},), benderscut)
end

function SCIPbenderscutGetTime(benderscut)
ccall((:SCIPbenderscutGetTime, libscip), Cdouble, (Ptr{SCIP_BENDERSCUT},), benderscut)
end

function SCIPbenderscutGetAddedConss(benderscut, addedconss, naddedconss)
ccall((:SCIPbenderscutGetAddedConss, libscip), SCIP_RETCODE, (Ptr{SCIP_BENDERSCUT}, Ptr{Ptr{Ptr{SCIP_CONS}}}, Ptr{Cint}), benderscut, addedconss, naddedconss)
end

function SCIPbenderscutGetAddedCuts(benderscut, addedcuts, naddedcuts)
ccall((:SCIPbenderscutGetAddedCuts, libscip), SCIP_RETCODE, (Ptr{SCIP_BENDERSCUT}, Ptr{Ptr{Ptr{SCIP_ROW}}}, Ptr{Cint}), benderscut, addedcuts, naddedcuts)
end

function SCIPbenderscutIsLPCut(benderscut)
ccall((:SCIPbenderscutIsLPCut, libscip), UInt32, (Ptr{SCIP_BENDERSCUT},), benderscut)
end

function SCIPbenderscutSetEnabled(benderscut, enabled)
ccall((:SCIPbenderscutSetEnabled, libscip), Cvoid, (Ptr{SCIP_BENDERSCUT}, UInt32), benderscut, enabled)
end
Loading