Clp.Optimizer
— TypeOptimizer()
Create a new Optimizer object.
Set optimizer attributes using MOI.RawOptimizerAttribute
or JuMP.set_optimizer_atttribute
.
For a list of supported parameter names, see Clp.SUPPORTED_PARAMETERS
.
Example
using JuMP, Clp
model = JuMP.Model(Clp.Optimizer)
set_optimizer_attribute(model, "LogLevel", 0)
Clp.cbc_cut_callback
— Typetypedef 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.sbb_callback
— Typetypedef for user call back. The cvec are constructed so don't need to be const
Clp.ClpSolve_delete
— MethodClpSolve_delete(solve)
Destructor
Clp.ClpSolve_new
— MethodClpSolve_new()
Default constructor
Clp.ClpSolve_setPresolveType
— MethodClpSolve_setPresolveType(arg1, amount, extraInfo)
amount: (see ClpSolve::PresolveType) 0 - presolve on 1 - presolve off 2 - presolve number 3 - presolve number cost – pass extraInfo == -1 for default behavior
Clp.ClpSolve_setSolveType
— MethodClpSolve_setSolveType(arg1, method, extraInfo)
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
Clp.Clp_Version
— MethodClp_Version()
Clp library version number as string.
Clp.Clp_VersionMajor
— MethodClp_VersionMajor()
Major number of Clp library version.
Clp.Clp_VersionMinor
— MethodClp_VersionMinor()
Minor number of Clp library version.
Clp.Clp_VersionRelease
— MethodClp_VersionRelease()
Release number of Clp library version.
Clp.Clp_addColumns
— MethodClp_addColumns(model, number, columnLower, columnUpper, objective, columnStarts, rows, elements)
Add columns
Clp.Clp_addRows
— MethodClp_addRows(model, number, rowLower, rowUpper, rowStarts, columns, elements)
Add rows
Clp.Clp_algorithm
— MethodClp_algorithm(model)
Current (or last) algorithm
Clp.Clp_checkSolution
— MethodClp_checkSolution(model)
Just check solution (for external use) - sets sum of infeasibilities etc
Clp.Clp_chgColumnLower
— MethodClp_chgColumnLower(model, columnLower)
Change column lower bounds
Clp.Clp_chgColumnUpper
— MethodClp_chgColumnUpper(model, columnUpper)
Change column upper bounds
Clp.Clp_chgObjCoefficients
— MethodClp_chgObjCoefficients(model, objIn)
Change objective coefficients
Clp.Clp_chgRowLower
— MethodClp_chgRowLower(model, rowLower)
Change row lower bounds
Clp.Clp_chgRowUpper
— MethodClp_chgRowUpper(model, rowUpper)
Change row upper bounds
Clp.Clp_clearCallBack
— MethodClp_clearCallBack(model)
Unset Callback function
Clp.Clp_columnLower
— MethodClp_columnLower(model)
Column Lower
Clp.Clp_columnName
— MethodClp_columnName(model, iColumn, name)
Fill in array (at least lengthNames+1 long) with a column name
Clp.Clp_columnUpper
— MethodClp_columnUpper(model)
Column Upper
Clp.Clp_copyInIntegerInformation
— MethodClp_copyInIntegerInformation(model, information)
Copy in integer informations
Clp.Clp_copyNames
— MethodClp_copyNames(model, rowNames, columnNames)
Copies in names
Clp.Clp_copyinStatus
— MethodClp_copyinStatus(model, statusArray)
Copy in status vector
Clp.Clp_crash
— MethodClp_crash(model, gap, pivot)
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.
if gap between bounds <="gap" variables can be flipped
If "pivot" is 0 No pivoting (so will just be choice of algorithm) 1 Simple pivoting e.g. gub 2 Mini iterations
Clp.Clp_deleteColumns
— MethodClp_deleteColumns(model, number, which)
Deletes columns
Clp.Clp_deleteIntegerInformation
— MethodClp_deleteIntegerInformation(model)
Drop integer informations
Clp.Clp_deleteModel
— MethodClp_deleteModel(model)
Destructor
Clp.Clp_deleteRows
— MethodClp_deleteRows(model, number, which)
Deletes rows
Clp.Clp_dropNames
— MethodClp_dropNames(model)
Drops names - makes lengthnames 0 and names empty
Clp.Clp_dual
— MethodClp_dual(model, ifValuesPass)
Dual algorithm - see ClpSimplexDual.hpp for method
Clp.Clp_dualBound
— MethodClp_dualBound(model)
Dual bound
Clp.Clp_dualColumnSolution
— MethodClp_dualColumnSolution(model)
Reduced costs
Clp.Clp_dualFeasible
— MethodClp_dualFeasible(model)
If problem is dual feasible
Clp.Clp_dualObjectiveLimit
— MethodClp_dualObjectiveLimit(model)
Dual objective limit
Clp.Clp_dualRowSolution
— MethodClp_dualRowSolution(model)
Dual row solution
Clp.Clp_dualTolerance
— MethodClp_dualTolerance(model)
Dual tolerance to use
Clp.Clp_freeRay
— MethodClp_freeRay(model, ray)
Frees a infeasibility or unbounded ray.
Clp.Clp_getColLower
— MethodClp_getColLower(model)
Column Lower
Clp.Clp_getColSolution
— MethodClp_getColSolution(model)
Primal column solution
Clp.Clp_getColUpper
— MethodClp_getColUpper(model)
Column Upper
Clp.Clp_getIterationCount
— MethodClp_getIterationCount(model)
Number of iterations
Clp.Clp_getNumCols
— MethodClp_getNumCols(model)
Number of columns
Clp.Clp_getNumElements
— MethodClp_getNumElements(model)
Number of elements in matrix
Clp.Clp_getNumRows
— MethodClp_getNumRows(model)
Number of rows
Clp.Clp_getObjCoefficients
— MethodClp_getObjCoefficients(model)
Objective
Clp.Clp_getObjSense
— MethodClp_getObjSense(model)
Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore
Clp.Clp_getObjValue
— MethodClp_getObjValue(model)
Objective value
Clp.Clp_getReducedCost
— MethodClp_getReducedCost(model)
Reduced costs
Clp.Clp_getRowActivity
— MethodClp_getRowActivity(model)
Primal row solution
Clp.Clp_getRowLower
— MethodClp_getRowLower(model)
Row lower
Clp.Clp_getRowPrice
— MethodClp_getRowPrice(model)
Dual row solution
Clp.Clp_getRowUpper
— MethodClp_getRowUpper(model)
Row upper
Clp.Clp_hitMaximumIterations
— MethodClp_hitMaximumIterations(model)
Returns true if hit maximum iterations (or time)
Clp.Clp_idiot
— MethodClp_idiot(model, tryhard)
Solve the problem with the idiot code
Clp.Clp_infeasibilityCost
— MethodClp_infeasibilityCost(model)
Infeasibility cost
Clp.Clp_infeasibilityRay
— MethodClp_infeasibilityRay(model)
Gives Infeasibility ray.
Use Clp_freeRay
to free the returned array.
Returns
infeasibility ray, or NULL returned if none/wrong.
Clp.Clp_initialBarrierNoCrossSolve
— MethodClp_initialBarrierNoCrossSolve(model)
Barrier initial solve, no crossover
Clp.Clp_initialBarrierSolve
— MethodClp_initialBarrierSolve(model)
Barrier initial solve
Clp.Clp_initialDualSolve
— MethodClp_initialDualSolve(model)
Dual initial solve
Clp.Clp_initialPrimalSolve
— MethodClp_initialPrimalSolve(model)
Primal initial solve
Clp.Clp_initialSolve
— MethodClp_initialSolve(model)
General solve algorithm which can do presolve. See ClpSolve.hpp for options
Clp.Clp_initialSolveWithOptions
— MethodClp_initialSolveWithOptions(model, arg2)
Pass solve options. (Exception to direct analogue rule)
Clp.Clp_integerInformation
— MethodClp_integerInformation(model)
Integer information
Clp.Clp_isAbandoned
— MethodClp_isAbandoned(model)
Are there a numerical difficulties?
Clp.Clp_isDualObjectiveLimitReached
— MethodClp_isDualObjectiveLimitReached(model)
Is the given dual objective limit reached?
Clp.Clp_isIterationLimitReached
— MethodClp_isIterationLimitReached(model)
Iteration limit reached?
Clp.Clp_isPrimalObjectiveLimitReached
— MethodClp_isPrimalObjectiveLimitReached(model)
Is the given primal objective limit reached?
Clp.Clp_isProvenDualInfeasible
— MethodClp_isProvenDualInfeasible(model)
Is dual infeasiblity proven?
Clp.Clp_isProvenOptimal
— MethodClp_isProvenOptimal(model)
Is optimality proven?
Clp.Clp_isProvenPrimalInfeasible
— MethodClp_isProvenPrimalInfeasible(model)
Is primal infeasiblity proven?
Clp.Clp_lengthNames
— MethodClp_lengthNames(model)
length of names (0 means no names0
Clp.Clp_loadProblem
— MethodClp_loadProblem(model, numcols, numrows, start, index, value, collb, colub, obj, rowlb, rowub)
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: <ul> <li> <code>colub</code>: all columns have upper bound infinity <li> <code>collb</code>: all columns have lower bound 0 <li> <code>rowub</code>: all rows have upper bound infinity <li> <code>rowlb</code>: all rows have lower bound -infinity <li> <code>obj</code>: all variables have 0 objective coefficient </ul>
Just like the other loadProblem() method except that the matrix is given in a standard column major ordered format (without gaps).
Clp.Clp_maximumSeconds
— MethodClp_maximumSeconds(model)
Maximum time in seconds (from when set called)
Clp.Clp_newModel
— MethodClp_newModel()
Default constructor
Clp.Clp_numberColumns
— MethodClp_numberColumns(model)
Number of columns
Clp.Clp_numberDualInfeasibilities
— MethodClp_numberDualInfeasibilities(model)
Number of dual infeasibilities
Clp.Clp_numberIterations
— MethodClp_numberIterations(model)
Number of iterations
Clp.Clp_numberPrimalInfeasibilities
— MethodClp_numberPrimalInfeasibilities(model)
Number of primal infeasibilities
Clp.Clp_numberRows
— MethodClp_numberRows(model)
Number of rows
Clp.Clp_objective
— MethodClp_objective(model)
Objective
Clp.Clp_objectiveOffset
— MethodClp_objectiveOffset(model)
Objective offset
Clp.Clp_objectiveValue
— MethodClp_objectiveValue(model)
Objective value
Clp.Clp_optimizationDirection
— MethodClp_optimizationDirection(model)
Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore
Clp.Clp_perturbation
— MethodClp_perturbation(model)
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.Clp_primal
— MethodClp_primal(model, ifValuesPass)
Primal algorithm - see ClpSimplexPrimal.hpp for method
Clp.Clp_primalColumnSolution
— MethodClp_primalColumnSolution(model)
Primal column solution
Clp.Clp_primalFeasible
— MethodClp_primalFeasible(model)
If problem is primal feasible
Clp.Clp_primalRowSolution
— MethodClp_primalRowSolution(model)
Primal row solution
Clp.Clp_primalTolerance
— MethodClp_primalTolerance(model)
Primal tolerance to use
Clp.Clp_printModel
— MethodClp_printModel(model, prefix)
Print model for debugging purposes
Clp.Clp_problemName
— MethodClp_problemName(model, maxNumberCharacters, array)
Fills in array with problem name
Clp.Clp_readMps
— MethodClp_readMps(model, filename, keepNames, ignoreErrors)
Read an mps file from the given filename
Clp.Clp_registerCallBack
— MethodClp_registerCallBack(model, userCallBack)
Pass in Callback function. Message numbers up to 1000000 are Clp, Coin ones have 1000000 added
Clp.Clp_resize
— MethodClp_resize(model, newNumberRows, newNumberColumns)
Resizes rim part of model
Clp.Clp_restoreModel
— MethodClp_restoreModel(model, fileName)
Restore model from file, returns 0 if success, deletes current model
Clp.Clp_rowLower
— MethodClp_rowLower(model)
Row lower
Clp.Clp_rowName
— MethodClp_rowName(model, iRow, name)
Fill in array (at least lengthNames+1 long) with a row name
Clp.Clp_rowUpper
— MethodClp_rowUpper(model)
Row upper
Clp.Clp_saveModel
— MethodClp_saveModel(model, fileName)
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.Clp_scaling
— MethodClp_scaling(model, mode)
Sets or unsets scaling, 0 -off, 1 equilibrium, 2 geometric, 3, auto, 4 dynamic(later)
Clp.Clp_scalingFlag
— MethodClp_scalingFlag(model)
Gets scalingFlag
Clp.Clp_secondaryStatus
— MethodClp_secondaryStatus(model)
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.Clp_setAlgorithm
— MethodClp_setAlgorithm(model, value)
Set algorithm
Clp.Clp_setColumnName
— MethodClp_setColumnName(model, iColumn, name)
Set column name - Nice if they are short - 8 chars or less I think
Clp.Clp_setLogLevel
— MethodClp_setLogLevel(model, value)
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.Clp_setObjSense
— MethodClp_setObjSense(model, objsen)
Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore
Clp.Clp_setProblemStatus
— MethodClp_setProblemStatus(model, problemStatus)
Set problem status
Clp.Clp_setRowName
— MethodClp_setRowName(model, iRow, name)
Set row name - Nice if they are short - 8 chars or less I think
Clp.Clp_setUserPointer
— MethodClp_setUserPointer(model, pointer)
User pointer for whatever reason
Clp.Clp_status
— MethodClp_status(model)
Status of problem: 0 - optimal 1 - primal infeasible 2 - dual infeasible 3 - stopped on iterations etc 4 - stopped due to errors
Clp.Clp_statusArray
— MethodClp_statusArray(model)
Return address of status array (char[numberRows+numberColumns])
Clp.Clp_statusExists
— MethodClp_statusExists(model)
See if status array exists (partly for OsiClp)
Clp.Clp_sumDualInfeasibilities
— MethodClp_sumDualInfeasibilities(model)
Sum of dual infeasibilities
Clp.Clp_sumPrimalInfeasibilities
— MethodClp_sumPrimalInfeasibilities(model)
Sum of primal infeasibilities
Clp.Clp_unboundedRay
— MethodClp_unboundedRay(model)
Gives ray in which the problem is unbounded.
Use Clp_freeRay
to free the returned array.
Returns
unbounded ray, or NULL returned if none/wrong.
Clp.Clp_writeMps
— MethodClp_writeMps(model, filename, formatType, numberAcross, objSense)
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.
Clp._farkas_variable_dual
— Method_farkas_variable_dual(model::Optimizer, col::Cint)
Return a Farkas dual associated with the variable bounds of col
.
Compute the Farkas dual as:
ā * x = λ' * A * x <= λ' * b = -β + sum(āᵢ * Uᵢ | āᵢ < 0) + sum(āᵢ * Lᵢ | āᵢ > 0)
The Farkas dual of the variable is ā, and it applies to the upper bound if ā < 0, and it applies to the lower bound if ā > 0.
Clp._index_map
— Method_index_map(src::OptimizerCache)
Create an IndexMap
mapping the variables and constraints in OptimizerCache
to their corresponding 1-based columns and rows.
Clp.maximumIterations
— MethodmaximumIterations(model)
Maximum number of iterations