Skip to content

Commit

Permalink
generate_wrapper: include pub_*.h headers
Browse files Browse the repository at this point in the history
 - need it now for SCIPvarGetObj from pub_var.h
  • Loading branch information
rschwarz committed Dec 22, 2018
1 parent de1a030 commit eab75e8
Show file tree
Hide file tree
Showing 42 changed files with 7,089 additions and 1 deletion.
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

0 comments on commit eab75e8

Please sign in to comment.