Crate coincbc_sys

Crate coincbc_sys 

Source
Expand description

§CoinCbc-sys

Package Documentation License

coincbc-sys crate is a *-sys crate. The package provides Low-level bindings to the Cbc library.

By this package, you don’t need to worry about installing Cbc in the system, and it’s a package for all platforms.

Cbc (Coin-or linear programming) is an open-source linear programming solver. It is primarily meant to be used as a callable library, but a basic, stand-alone executable version is also available.

§Usage

Just add the following to your Cargo.toml:

[dependencies]
coincbc-sys = "0.2"

§Configure

The following Cargo features are supported:

  • default to build metadatahreaded Cbc;
  • parallel to build Cbc with pthread;

§Library Linking

if you want to know the detail about how it compile or link the Cbc, please see Cbc-src.

§Contribution

Your contribution is highly appreciated. Do not hesitate to open an issue or a pull request. Note that any contribution submitted for inclusion in the project will be licensed according to the terms given in LICENSE.

Structs§

max_align_t

Functions§

Cbc_addCol
@brief Creates a new column
Cbc_addCutCallback
Cbc_addRow
@brief Adds a new row
Cbc_addSOS
@brief Add SOS constraints to the model using row-order matrix
Cbc_bestSolution
@brief Best integer feasible solution
Cbc_checkSolution
Just check solution (for external use) - sets sum of infeasibilities etc
Cbc_clearCallBack
Unset Callback function
Cbc_clone
@brief Creates a copy of the current model
Cbc_deleteModel
@brief Cbc_Model destructor
Cbc_getAllowableFractionGap
returns the allowable fraction gap
Cbc_getAllowableGap
returns the allowable gap
Cbc_getAllowablePercentageGap
returns the allowable percentage gap
Cbc_getBestPossibleObjValue
@brief Best known bound on the optimal objective value
Cbc_getColCoeffs
@brief Coefficients that a column appear in rows
Cbc_getColIndices
@brief Indices of rows that a column appears
Cbc_getColLower
@brief Variable lower bounds
Cbc_getColName
Queries column name
Cbc_getColNz
@brief Number of non-zero entries in a column
Cbc_getColSolution
@brief Best feasible solution vector
Cbc_getColUpper
@brief Variable upper bounds
Cbc_getCutoff
returns the cutoff
Cbc_getElements
Coefficient vector of constraint matrix
Cbc_getIndices
“Row index” vector of constraint matrix
Cbc_getIterationCount
Number of iterations
Cbc_getLogLevel
returns the current log leven
Cbc_getMaximumNodes
returns the maximum number of nodes that can be explored in the search tree
Cbc_getMaximumSeconds
returns the time limit for the search process
Cbc_getMaximumSolutions
returns solution limit for the search process
Cbc_getNodeCount
Number of nodes explored in B&B tree
Cbc_getNumCols
@brief Number of variables in the model @param model problem object @return number of columns (variables)
Cbc_getNumElements
@brief Number of nonzero elements in constraint matrix
Cbc_getNumIntegers
@brief Number of integer variables in the model
Cbc_getNumRows
Number of constraints in the model @param model problem object @return number of rows (constraints) in the model
Cbc_getObjCoefficients
@brief Objective vector
Cbc_getObjSense
@brief Direction of optimization
Cbc_getObjValue
Objective value of best feasible solution
Cbc_getReducedCost
@brief Queries vector of reduced costs
Cbc_getRowActivity
“row” solution This is the vector A*x, where A is the constraint matrix and x is the current solution.
Cbc_getRowCoeffs
@brief Coefficients of variables that appear on this row
Cbc_getRowIndices
@brief Indices of variables that appear on a row
Cbc_getRowLower
@brief Constraint lower bounds
Cbc_getRowName
@brief Queries row name
Cbc_getRowNz
@brief Number of non-zero entries in a row
Cbc_getRowRHS
@brief Right hand side of a row
Cbc_getRowSense
@brief Sense a row @param model problem object @param row row index @return row sense: E for =, L for <=, G for >= and R for ranged row
Cbc_getRowUpper
@brief Constraint upper bounds
Cbc_getVectorStarts
“Column start” vector of constraint matrix. Same format as Cbc_loadProblem()
Cbc_getVersion
Current version of Cbc
Cbc_isAbandoned
If optimization was abandoned due to numerical difficulties
Cbc_isContinuousUnbounded
@brief Is continuous model unbounded ?
Cbc_isInitialSolveAbandoned
Are there numerical difficulties (for initialSolve) ?
Cbc_isInitialSolveProvenOptimal
Is optimality proven (for initialSolve) ?
Cbc_isInitialSolveProvenPrimalInfeasible
Is primal infeasiblity proven (for initialSolve) ?
Cbc_isInteger
@brief Determine whether the ith variable is integer restricted
Cbc_isNodeLimitReached
Node limit reached?
Cbc_isProvenInfeasible
@brief If infeasibility was proven
Cbc_isProvenOptimal
@brief If the optimal solution was found
Cbc_isSecondsLimitReached
Time limit reached?
Cbc_isSolutionLimitReached
Solution limit reached?
Cbc_loadProblem
Loads a problem (the constraints on the rows are given by lower and upper bounds). If a pointer is NULL then the following values are the default:
Cbc_maxNameLength
Maximum lenght of a row or column name
Cbc_newModel
@brief Creates an empty problem
Cbc_numberPrimalInfeasibilities
Number of primal infeasibilities
Cbc_numberSavedSolutions
@brief number of integer feasible solution saved
Cbc_printModel
Print the model
Cbc_printSolution
Print the solution
Cbc_problemName
@brief Queries problem name
Cbc_readLp
@brief Read an lp file from the given filename
Cbc_readMps
@brief Read an mps file from the given filename
Cbc_registerCallBack
@}/ /@name Message handling. Call backs are handled by ONE function */ /@{/ /** Pass in Callback function. Message numbers up to 1000000 are Clp, Coin ones have 1000000 added
Cbc_savedSolution
@brief Vector with the i-th saved solution
Cbc_savedSolutionObj
@brief Cost of the whichSol solution
Cbc_secondaryStatus
@brief Secondary status of problem
Cbc_setAllowableFractionGap
sets the allowable fraction gap
Cbc_setAllowableGap
sets the allowable gap
Cbc_setAllowablePercentageGap
sets the allowable percentage gap
Cbc_setColLower
@brief Set the lower bound of a single variable
Cbc_setColName
@brief Set the name of a column
Cbc_setColUpper
@brief Set the upper bound of a single variable
Cbc_setContinuous
@brief Set this variable to be continuous
Cbc_setCutoff
sets the cutoff
Cbc_setInitialSolution
Provide an initial feasible solution to accelerate branch-and-bound Note that feasibility of the solution is not verified.
Cbc_setInteger
@brief Set this variable to be integer
Cbc_setLogLevel
sets the log level
Cbc_setMIPStart
@brief Enter initial feasible solution
Cbc_setMIPStartI
@brief Enter initial feasible solution
Cbc_setMaximumNodes
sets the maximum number of nodes that can be explored in the search tree
Cbc_setMaximumSeconds
sets the time limit for the search process
Cbc_setMaximumSolutions
sets a solution limit as a stopping criterion
Cbc_setObjCoeff
@brief Set the objective coefficient of a single variable
Cbc_setObjSense
@brief Sets optimization direction
Cbc_setParameter
@name Solver parameters / /**@{/ /** Set parameter “name” to value “value”. Note that this translates directly to using “-name value” as a command-line argument to Cbc.
Cbc_setProblemName
@brief Sets problem name.
Cbc_setRowLower
@brief Set the lower bound of a single constraint
Cbc_setRowName
@brief Set the name of a row
Cbc_setRowUpper
@brief Set the upper bound of a single constraint
Cbc_solve
@name Solving the model */ /**@{
Cbc_status
@brief Final optimization status
Cbc_sumPrimalInfeasibilities
Sum of primal infeasibilities
Cbc_writeLp
@brief Write an lp file from the given filename
Cbc_writeMps
@brief Write an mps file from the given filename
OsiCuts_addRowCut
adds a row cut (used in callback)
Osi_getColLower
@brief Returns column lower bounds in OsiSolverInterface object
Osi_getColName
@brief Returns column name in OsiSolverInterface object
Osi_getColSolution
@brief Returns solution vector in OsiSolverInterface object
Osi_getColUpper
@brief Returns column upper bounds in OsiSolverInterface object
Osi_getNumCols
@brief Returns number of cols in OsiSolverInterface object
Osi_getNumRows
@brief Returns number of rows in OsiSolverInterface object
Osi_getRowCoeffs
@brief Coefficients of variables that appear on this row
Osi_getRowIndices
@brief Indices of variables that appear on a row
Osi_getRowNz
Osi_getRowRHS
@brief Right hand side of a row
Osi_getRowSense
@brief Sense a row @param model problem object @param row row index @return row sense: E for =, L for <=, G for >= and R for ranged row
Osi_isInteger
@brief Returns integrality information for columns in OsiSolverInterface object

Type Aliases§

Cbc_Model
Clp_Simplex
CoinBigIndex
Sbb_Model
cbc_callback
cbc_cut_callback
typedef for cbc cut callback osiSolver needs to be an OsiSolverInterface object, osiCuts is an OsiCuts object and appdata is a pointer that will be passed to the cut generation, you can use it to point to a data structure with information about the original problem, for instance
clp_callback
sbb_callback
typedef for user call back. The cvec are constructed so don’t need to be const
wchar_t