Crate coincbc_sys
source ·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
- @brief Creates a new column
- @brief Adds a new row
- @brief Add SOS constraints to the model using row-order matrix
- @brief Best integer feasible solution
- Just check solution (for external use) - sets sum of infeasibilities etc
- Unset Callback function
- @brief Creates a copy of the current model
- @brief Cbc_Model destructor
- returns the allowable fraction gap
- returns the allowable gap
- returns the allowable percentage gap
- @brief Best known bound on the optimal objective value
- @brief Coefficients that a column appear in rows
- @brief Indices of rows that a column appears
- @brief Variable lower bounds
- Queries column name
- @brief Number of non-zero entries in a column
- @brief Best feasible solution vector
- @brief Variable upper bounds
- returns the cutoff
- Coefficient vector of constraint matrix
- “Row index” vector of constraint matrix
- Number of iterations
- returns the current log leven
- returns the maximum number of nodes that can be explored in the search tree
- returns the time limit for the search process
- returns solution limit for the search process
- Number of nodes explored in B&B tree
- @brief Number of variables in the model @param model problem object @return number of columns (variables)
- @brief Number of nonzero elements in constraint matrix
- @brief Number of integer variables in the model
- Number of constraints in the model @param model problem object @return number of rows (constraints) in the model
- @brief Objective vector
- @brief Direction of optimization
- Objective value of best feasible solution
- @brief Queries vector of reduced costs
- “row” solution This is the vector A*x, where A is the constraint matrix and x is the current solution.
- @brief Coefficients of variables that appear on this row
- @brief Indices of variables that appear on a row
- @brief Constraint lower bounds
- @brief Queries row name
- @brief Number of non-zero entries in a row
- @brief Right hand side of a row
- @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
- @brief Constraint upper bounds
- “Column start” vector of constraint matrix. Same format as Cbc_loadProblem()
- Current version of Cbc
- If optimization was abandoned due to numerical difficulties
- @brief Is continuous model unbounded ?
- Are there numerical difficulties (for initialSolve) ?
- Is optimality proven (for initialSolve) ?
- Is primal infeasiblity proven (for initialSolve) ?
- @brief Determine whether the ith variable is integer restricted
- Node limit reached?
- @brief If infeasibility was proven
- @brief If the optimal solution was found
- Time limit reached?
- Solution limit reached?
- 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:
- Maximum lenght of a row or column name
- @brief Creates an empty problem
- Number of primal infeasibilities
- @brief number of integer feasible solution saved
- Print the model
- Print the solution
- @brief Queries problem name
- @brief Read an lp file from the given filename
- @brief Read an mps file from the given filename
- @}/ /@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
- @brief Vector with the i-th saved solution
- @brief Cost of the whichSol solution
- @brief Secondary status of problem
- sets the allowable fraction gap
- sets the allowable gap
- sets the allowable percentage gap
- @brief Set the lower bound of a single variable
- @brief Set the name of a column
- @brief Set the upper bound of a single variable
- @brief Set this variable to be continuous
- sets the cutoff
- Provide an initial feasible solution to accelerate branch-and-bound Note that feasibility of the solution is not verified.
- @brief Set this variable to be integer
- sets the log level
- @brief Enter initial feasible solution
- @brief Enter initial feasible solution
- sets the maximum number of nodes that can be explored in the search tree
- sets the time limit for the search process
- sets a solution limit as a stopping criterion
- @brief Set the objective coefficient of a single variable
- @brief Sets optimization direction
- @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.
- @brief Sets problem name.
- @brief Set the lower bound of a single constraint
- @brief Set the name of a row
- @brief Set the upper bound of a single constraint
- @name Solving the model */ /**@{
- @brief Final optimization status
- Sum of primal infeasibilities
- @brief Write an lp file from the given filename
- @brief Write an mps file from the given filename
- adds a row cut (used in callback)
- @brief Returns column lower bounds in OsiSolverInterface object
- @brief Returns column name in OsiSolverInterface object
- @brief Returns solution vector in OsiSolverInterface object
- @brief Returns column upper bounds in OsiSolverInterface object
- @brief Returns number of cols in OsiSolverInterface object
- @brief Returns number of rows in OsiSolverInterface object
- @brief Coefficients of variables that appear on this row
- @brief Indices of variables that appear on a row
- @brief Right hand side of a row
- @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
- @brief Returns integrality information for columns in OsiSolverInterface object
Type Aliases
- 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
- typedef for user call back. The cvec are constructed so don’t need to be const