Crate coinclp_sys

Crate coinclp_sys 

Source
Expand description

§CoinClp-sys

Package Documentation License

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

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

Clp (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]
coinclp-sys = "0.2"

§Library Linking

if you want to know the detail about how it compile or link the Clp, please see Clp-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.

Constants§

__bool_true_false_are_defined
false_
true_

Functions§

ClpSolve_delete
Destructor
ClpSolve_doDoubleton
ClpSolve_doDual
ClpSolve_doDupcol
ClpSolve_doDuprow
ClpSolve_doForcing
ClpSolve_doImpliedFree
ClpSolve_doSingleton
ClpSolve_doSingletonColumn
ClpSolve_doTighten
ClpSolve_doTripleton
ClpSolve_getExtraInfo
ClpSolve_getPresolvePasses
ClpSolve_getPresolveType
ClpSolve_getSolveType
ClpSolve_getSpecialOption
ClpSolve_infeasibleReturn
ClpSolve_new
Default constructor
ClpSolve_presolveActions
ClpSolve_setDoDoubleton
ClpSolve_setDoDual
ClpSolve_setDoDupcol
ClpSolve_setDoDuprow
ClpSolve_setDoForcing
ClpSolve_setDoImpliedFree
ClpSolve_setDoSingleton
ClpSolve_setDoSingletonColumn
ClpSolve_setDoTighten
ClpSolve_setDoTripleton
ClpSolve_setInfeasibleReturn
ClpSolve_setPresolveActions
ClpSolve_setPresolveType
amount: (see ClpSolve::PresolveType) 0 - presolve on 1 - presolve off 2 - presolve number 3 - presolve number cost – pass extraInfo == -1 for default behavior
ClpSolve_setSolveType
method: (see ClpSolve::SolveType) 0 - dual simplex 1 - primal simplex 2 - primal or sprint 3 - barrier 4 - barrier no crossover 5 - automatic 6 - not implemented – pass extraInfo == -1 for default behavior
ClpSolve_setSpecialOption
ClpSolve_setSubstitution
ClpSolve_substitution
Clp_Version
Clp library version number as string.
Clp_VersionMajor
Major number of Clp library version.
Clp_VersionMinor
Minor number of Clp library version.
Clp_VersionRelease
Release number of Clp library version.
Clp_addColumns
Add columns
Clp_addRows
Add rows
Clp_algorithm
Current (or last) algorithm
Clp_checkSolution
Just check solution (for external use) - sets sum of infeasibilities etc
Clp_chgColumnLower
Change column lower bounds
Clp_chgColumnUpper
Change column upper bounds
Clp_chgObjCoefficients
Change objective coefficients
Clp_chgRowLower
Change row lower bounds
Clp_chgRowUpper
Change row upper bounds
Clp_clearCallBack
Unset Callback function
Clp_columnLower
Column Lower
Clp_columnName
Fill in array (at least lengthNames+1 long) with a column name
Clp_columnUpper
Column Upper
Clp_copyInIntegerInformation
Copy in integer informations
Clp_copyNames
Copies in names
Clp_copyinStatus
Copy in status vector
Clp_crash
Crash - at present just aimed at dual, returns -2 if dual preferred and crash basis created -1 if dual preferred and all slack basis preferred 0 if basis going in was not all slack 1 if primal preferred and all slack basis preferred 2 if primal preferred and crash basis created.
Clp_deleteColumns
Deletes columns
Clp_deleteIntegerInformation
Drop integer informations
Clp_deleteModel
Destructor
Clp_deleteRows
Deletes rows
Clp_dropNames
Drops names - makes lengthnames 0 and names empty
Clp_dual
Dual algorithm - see ClpSimplexDual.hpp for method
Clp_dualBound
Dual bound
Clp_dualColumnSolution
Reduced costs
Clp_dualFeasible
If problem is dual feasible
Clp_dualObjectiveLimit
Dual objective limit
Clp_dualRowSolution
Dual row solution
Clp_dualTolerance
Dual tolerance to use
Clp_freeRay
Frees a infeasibility or unbounded ray.
Clp_getColLower
Column Lower
Clp_getColSolution
Primal column solution
Clp_getColUpper
Column Upper
Clp_getColumnStatus
Clp_getElements
Clp_getIndices
Clp_getIterationCount
Number of iterations
Clp_getNumCols
Number of columns
Clp_getNumElements
Number of elements in matrix
Clp_getNumRows
Number of rows
Clp_getObjCoefficients
Objective
Clp_getObjSense
Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore
Clp_getObjValue
Objective value
Clp_getReducedCost
Reduced costs
Clp_getRowActivity
Primal row solution
Clp_getRowLower
Row lower
Clp_getRowPrice
Dual row solution
Clp_getRowStatus
Clp_getRowUpper
Row upper
Clp_getSmallElementValue
Clp_getUserPointer
Clp_getVectorLengths
Clp_getVectorStarts
Clp_hitMaximumIterations
Returns true if hit maximum iterations (or time)
Clp_idiot
Solve the problem with the idiot code
Clp_infeasibilityCost
Infeasibility cost
Clp_infeasibilityRay
Gives Infeasibility ray.
Clp_initialBarrierNoCrossSolve
Barrier initial solve, no crossover
Clp_initialBarrierSolve
Barrier initial solve
Clp_initialDualSolve
Dual initial solve
Clp_initialPrimalSolve
Primal initial solve
Clp_initialSolve
General solve algorithm which can do presolve. See ClpSolve.hpp for options
Clp_initialSolveWithOptions
Pass solve options. (Exception to direct analogue rule)
Clp_integerInformation
Integer information
Clp_isAbandoned
Are there a numerical difficulties?
Clp_isDualObjectiveLimitReached
Is the given dual objective limit reached?
Clp_isIterationLimitReached
Iteration limit reached?
Clp_isPrimalObjectiveLimitReached
Is the given primal objective limit reached?
Clp_isProvenDualInfeasible
Is dual infeasiblity proven?
Clp_isProvenOptimal
Is optimality proven?
Clp_isProvenPrimalInfeasible
Is primal infeasiblity proven?
Clp_lengthNames
length of names (0 means no names0
Clp_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:
Clp_loadQuadraticObjective
Clp_logLevel
Clp_maximumSeconds
Maximum time in seconds (from when set called)
Clp_modifyCoefficient
Clp_newModel
Default constructor
Clp_numberColumns
Number of columns
Clp_numberDualInfeasibilities
Number of dual infeasibilities
Clp_numberIterations
Number of iterations
Clp_numberPrimalInfeasibilities
Number of primal infeasibilities
Clp_numberRows
Number of rows
Clp_objective
Objective
Clp_objectiveOffset
Objective offset
Clp_objectiveValue
Objective value
Clp_optimizationDirection
Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore
Clp_perturbation
Perturbation: 50 - switch on perturbation 100 - auto perturb if takes too long (1.0e-6 largest nonzero) 101 - we are perturbed 102 - don’t try perturbing again default is 100 others are for playing
Clp_primal
Primal algorithm - see ClpSimplexPrimal.hpp for method
Clp_primalColumnSolution
Primal column solution
Clp_primalFeasible
If problem is primal feasible
Clp_primalRowSolution
Primal row solution
Clp_primalTolerance
Primal tolerance to use
Clp_printModel
Print model for debugging purposes
Clp_problemName
Fills in array with problem name
Clp_readMps
Read an mps file from the given filename
Clp_registerCallBack
Pass in Callback function. Message numbers up to 1000000 are Clp, Coin ones have 1000000 added
Clp_resize
Resizes rim part of model
Clp_restoreModel
Restore model from file, returns 0 if success, deletes current model
Clp_rowLower
Row lower
Clp_rowName
Fill in array (at least lengthNames+1 long) with a row name
Clp_rowUpper
Row upper
Clp_saveModel
Save model to file, returns 0 if success. This is designed for use outside algorithms so does not save iterating arrays etc. It does not save any messaging information. Does not save scaling values. It does not know about all types of virtual functions.
Clp_scaling
Sets or unsets scaling, 0 -off, 1 equilibrium, 2 geometric, 3, auto, 4 dynamic(later)
Clp_scalingFlag
Gets scalingFlag
Clp_secondaryStatus
Secondary status of problem - may get extended 0 - none 1 - primal infeasible because dual limit reached 2 - scaled problem optimal - unscaled has primal infeasibilities 3 - scaled problem optimal - unscaled has dual infeasibilities 4 - scaled problem optimal - unscaled has both dual and primal infeasibilities
Clp_setAlgorithm
Set algorithm
Clp_setColSolution
Clp_setColumnName
Set column name - Nice if they are short - 8 chars or less I think
Clp_setColumnStatus
Clp_setDualBound
Clp_setDualObjectiveLimit
Clp_setDualTolerance
Clp_setInfeasibilityCost
Clp_setLogLevel
Amount of print out: 0 - none 1 - just final 2 - just factorizations 3 - as 2 plus a bit more 4 - verbose above that 8,16,32 etc just for selective debug
Clp_setMaximumIterations
Clp_setMaximumSeconds
Clp_setNumberIterations
Clp_setObjSense
Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore
Clp_setObjectiveOffset
Clp_setOptimizationDirection
Clp_setPerturbation
Clp_setPrimalTolerance
Clp_setProblemName
Clp_setProblemStatus
Set problem status
Clp_setRowName
Set row name - Nice if they are short - 8 chars or less I think
Clp_setRowStatus
Clp_setSecondaryStatus
Clp_setSmallElementValue
Clp_setUserPointer
User pointer for whatever reason
Clp_status
Status of problem: 0 - optimal 1 - primal infeasible 2 - dual infeasible 3 - stopped on iterations etc 4 - stopped due to errors
Clp_statusArray
Return address of status array (char[numberRows+numberColumns])
Clp_statusExists
See if status array exists (partly for OsiClp)
Clp_sumDualInfeasibilities
Sum of dual infeasibilities
Clp_sumPrimalInfeasibilities
Sum of primal infeasibilities
Clp_unboundedRay
Gives ray in which the problem is unbounded.
Clp_writeMps
Write an mps file to the given filename / /* Format type is 0 = normal, 1 = extra or 2 = hex. Number across is 1 or 2. Use objSense = -1D to flip the objective function around.
maximumIterations
Maximum number of iterations

Type Aliases§

Cbc_Model
Clp_Simplex
Clp_Solve
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