Expand description
§CoinCbc-sys
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:
defaultto build metadatahreadedCbc;parallelto buildCbcwithpthread;
§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§
Functions§
- Cbc_
addCol ⚠ - @brief Creates a new column
- Cbc_
addCut ⚠Callback - Cbc_
addRow ⚠ - @brief Adds a new row
- Cbc_
addSOS ⚠ - @brief Add SOS constraints to the model using row-order matrix
- Cbc_
best ⚠Solution - @brief Best integer feasible solution
- Cbc_
check ⚠Solution - Just check solution (for external use) - sets sum of infeasibilities etc
- Cbc_
clear ⚠Call Back - Unset Callback function
- Cbc_
clone ⚠ - @brief Creates a copy of the current model
- Cbc_
delete ⚠Model - @brief Cbc_Model destructor
- Cbc_
getAllowable ⚠Fraction Gap - returns the allowable fraction gap
- Cbc_
getAllowable ⚠Gap - returns the allowable gap
- Cbc_
getAllowable ⚠Percentage Gap - returns the allowable percentage gap
- Cbc_
getBest ⚠Possible ObjValue - @brief Best known bound on the optimal objective value
- Cbc_
getCol ⚠Coeffs - @brief Coefficients that a column appear in rows
- Cbc_
getCol ⚠Indices - @brief Indices of rows that a column appears
- Cbc_
getCol ⚠Lower - @brief Variable lower bounds
- Cbc_
getCol ⚠Name - Queries column name
- Cbc_
getCol ⚠Nz - @brief Number of non-zero entries in a column
- Cbc_
getCol ⚠Solution - @brief Best feasible solution vector
- Cbc_
getCol ⚠Upper - @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_
getIteration ⚠Count - Number of iterations
- Cbc_
getLog ⚠Level - returns the current log leven
- Cbc_
getMaximum ⚠Nodes - returns the maximum number of nodes that can be explored in the search tree
- Cbc_
getMaximum ⚠Seconds - returns the time limit for the search process
- Cbc_
getMaximum ⚠Solutions - returns solution limit for the search process
- Cbc_
getNode ⚠Count - Number of nodes explored in B&B tree
- Cbc_
getNum ⚠Cols - @brief Number of variables in the model @param model problem object @return number of columns (variables)
- Cbc_
getNum ⚠Elements - @brief Number of nonzero elements in constraint matrix
- Cbc_
getNum ⚠Integers - @brief Number of integer variables in the model
- Cbc_
getNum ⚠Rows - Number of constraints in the model @param model problem object @return number of rows (constraints) in the model
- Cbc_
getObj ⚠Coefficients - @brief Objective vector
- Cbc_
getObj ⚠Sense - @brief Direction of optimization
- Cbc_
getObj ⚠Value - Objective value of best feasible solution
- Cbc_
getReduced ⚠Cost - @brief Queries vector of reduced costs
- Cbc_
getRow ⚠Activity - “row” solution This is the vector A*x, where A is the constraint matrix and x is the current solution.
- Cbc_
getRow ⚠Coeffs - @brief Coefficients of variables that appear on this row
- Cbc_
getRow ⚠Indices - @brief Indices of variables that appear on a row
- Cbc_
getRow ⚠Lower - @brief Constraint lower bounds
- Cbc_
getRow ⚠Name - @brief Queries row name
- Cbc_
getRow ⚠Nz - @brief Number of non-zero entries in a row
- Cbc_
getRowRHS ⚠ - @brief Right hand side of a row
- Cbc_
getRow ⚠Sense - @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_
getRow ⚠Upper - @brief Constraint upper bounds
- Cbc_
getVector ⚠Starts - “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_
isContinuous ⚠Unbounded - @brief Is continuous model unbounded ?
- Cbc_
isInitial ⚠Solve Abandoned - Are there numerical difficulties (for initialSolve) ?
- Cbc_
isInitial ⚠Solve Proven Optimal - Is optimality proven (for initialSolve) ?
- Cbc_
isInitial ⚠Solve Proven Primal Infeasible - Is primal infeasiblity proven (for initialSolve) ?
- Cbc_
isInteger ⚠ - @brief Determine whether the ith variable is integer restricted
- Cbc_
isNode ⚠Limit Reached - Node limit reached?
- Cbc_
isProven ⚠Infeasible - @brief If infeasibility was proven
- Cbc_
isProven ⚠Optimal - @brief If the optimal solution was found
- Cbc_
isSeconds ⚠Limit Reached - Time limit reached?
- Cbc_
isSolution ⚠Limit Reached - Solution limit reached?
- Cbc_
load ⚠Problem - 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_
maxName ⚠Length - Maximum lenght of a row or column name
- Cbc_
newModel ⚠ - @brief Creates an empty problem
- Cbc_
number ⚠Primal Infeasibilities - Number of primal infeasibilities
- Cbc_
number ⚠Saved Solutions - @brief number of integer feasible solution saved
- Cbc_
print ⚠Model - Print the model
- Cbc_
print ⚠Solution - Print the solution
- Cbc_
problem ⚠Name - @brief Queries problem name
- Cbc_
read ⚠Lp - @brief Read an lp file from the given filename
- Cbc_
read ⚠Mps - @brief Read an mps file from the given filename
- Cbc_
register ⚠Call Back - @}/ /@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_
saved ⚠Solution - @brief Vector with the i-th saved solution
- Cbc_
saved ⚠Solution Obj - @brief Cost of the whichSol solution
- Cbc_
secondary ⚠Status - @brief Secondary status of problem
- Cbc_
setAllowable ⚠Fraction Gap - sets the allowable fraction gap
- Cbc_
setAllowable ⚠Gap - sets the allowable gap
- Cbc_
setAllowable ⚠Percentage Gap - sets the allowable percentage gap
- Cbc_
setCol ⚠Lower - @brief Set the lower bound of a single variable
- Cbc_
setCol ⚠Name - @brief Set the name of a column
- Cbc_
setCol ⚠Upper - @brief Set the upper bound of a single variable
- Cbc_
setContinuous ⚠ - @brief Set this variable to be continuous
- Cbc_
setCutoff ⚠ - sets the cutoff
- Cbc_
setInitial ⚠Solution - 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_
setLog ⚠Level - sets the log level
- Cbc_
setMIP ⚠Start - @brief Enter initial feasible solution
- Cbc_
setMIP ⚠StartI - @brief Enter initial feasible solution
- Cbc_
setMaximum ⚠Nodes - sets the maximum number of nodes that can be explored in the search tree
- Cbc_
setMaximum ⚠Seconds - sets the time limit for the search process
- Cbc_
setMaximum ⚠Solutions - sets a solution limit as a stopping criterion
- Cbc_
setObj ⚠Coeff - @brief Set the objective coefficient of a single variable
- Cbc_
setObj ⚠Sense - @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_
setProblem ⚠Name - @brief Sets problem name.
- Cbc_
setRow ⚠Lower - @brief Set the lower bound of a single constraint
- Cbc_
setRow ⚠Name - @brief Set the name of a row
- Cbc_
setRow ⚠Upper - @brief Set the upper bound of a single constraint
- Cbc_
solve ⚠ - @name Solving the model */ /**@{
- Cbc_
status ⚠ - @brief Final optimization status
- Cbc_
sumPrimal ⚠Infeasibilities - Sum of primal infeasibilities
- Cbc_
write ⚠Lp - @brief Write an lp file from the given filename
- Cbc_
write ⚠Mps - @brief Write an mps file from the given filename
- OsiCuts_
addRow ⚠Cut - adds a row cut (used in callback)
- Osi_
getCol ⚠Lower - @brief Returns column lower bounds in OsiSolverInterface object
- Osi_
getCol ⚠Name - @brief Returns column name in OsiSolverInterface object
- Osi_
getCol ⚠Solution - @brief Returns solution vector in OsiSolverInterface object
- Osi_
getCol ⚠Upper - @brief Returns column upper bounds in OsiSolverInterface object
- Osi_
getNum ⚠Cols - @brief Returns number of cols in OsiSolverInterface object
- Osi_
getNum ⚠Rows - @brief Returns number of rows in OsiSolverInterface object
- Osi_
getRow ⚠Coeffs - @brief Coefficients of variables that appear on this row
- Osi_
getRow ⚠Indices - @brief Indices of variables that appear on a row
- Osi_
getRow ⚠Nz - Osi_
getRowRHS ⚠ - @brief Right hand side of a row
- Osi_
getRow ⚠Sense - @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 - Coin
BigIndex - 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