From 1e2d06875756a4320a2f2d786e1ed643c9589389 Mon Sep 17 00:00:00 2001 From: odow Date: Fri, 31 Mar 2023 15:29:07 +1300 Subject: [PATCH 1/6] Update README --- README.md | 53 +++++++++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 06518be..fc1cd26 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -# COIN-OR Linear Programming Interface (Clp.jl) - ![](https://www.coin-or.org/wordpress/wp-content/uploads/2014/08/COINOR.png) +# Clp.jl + [![Build Status](https://github.com/jump-dev/Clp.jl/workflows/CI/badge.svg?branch=master)](https://github.com/jump-dev/Clp.jl/actions?query=workflow%3ACI) [![codecov](https://codecov.io/gh/jump-dev/Clp.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/jump-dev/Clp.jl) -`Clp.jl` is a wrapper for the [COIN-OR Linear Programming](https://projects.coin-or.org/Clp) -solver. +[Clp.jl](https://github.com/jump-dev/Clp.jl) is a wrapper for the +[COIN-OR Linear Programming](https://projects.coin-or.org/Clp) solver. The wrapper has two components: * a thin wrapper around the complete C API @@ -15,15 +15,23 @@ The wrapper has two components: The C API can be accessed via `Clp.Clp_XXX` functions, where the names and arguments are identical to the C API. -*Note: This wrapper is maintained by the JuMP community and is not a COIN-OR -project.* +## Affiliation + +This wrapper is maintained by the JuMP community and is not a COIN-OR project. + +## License + +`Clp.jl` is licensed under the [MIT License](https://github.com/jump-dev/Clp.jl/blob/master/LICENSE.md). + +The underlying solver, [coin-or/Clp](https://github.com/coin-or/Clp), is +licensed under the [Eclipse public license](https://github.com/coin-or/Clp/blob/master/LICENSE). ## Installation Install Clp using `Pkg.add`: - ```julia -import Pkg; Pkg.add("Clp") +import Pkg +Pkg.add("Clp") ``` In addition to installing the Clp.jl package, this will also download and @@ -37,29 +45,26 @@ section of the JuMP documentation. To use Clp with [JuMP](https://github.com/jump-dev/JuMP.jl), use `Clp.Optimizer`: ```julia using JuMP, Clp - model = Model(Clp.Optimizer) set_optimizer_attribute(model, "LogLevel", 1) set_optimizer_attribute(model, "Algorithm", 4) ``` -See the list of options below. - ## Options -The following options are available to get/set via `JuMP.set_optimizer_attribute` -or `MOI.RawOptimizerAttribute`. +The following options are available to get/set via [`JuMP.set_attribute`](@ref) +or [`MOI.RawOptimizerAttribute`](@ref). | Parameter | Default value | Description | |:----------|:--------------|:----------| -| `PrimalTolerance` | `1e-7` | Primal feasibility tolerance | -| `DualTolerance` | `1e-7` | Dual feasibility tolerance | -| `DualObjectiveLimit` | `1e308` | When using dual simplex (where the objective is monotonically changing), terminate when the objective exceeds this limit | -| `MaximumIterations` | `2147483647` | Terminate after performing this number of simplex iterations | -| `MaximumSeconds` | `-1.0` | Terminate after this many seconds have passed. A negative value means no time limit | -| `LogLevel` | `1` | Set to 1, 2, 3, or 4 for increasing output. Set to `0` to disable output | -| `PresolveType` | `0` | Set to 1 to disable presolve | -| `SolveType` | `5` | Solution method: dual simplex (`0`), primal simplex (`1`), sprint (`2`), barrier with crossover (`3`), barrier without crossover (`4`), automatic (`5`) | -| `InfeasibleReturn` | `0` | Set to 1 to return as soon as the problem is found to be infeasible (by default, an infeasibility proof is computed as well) | -| `Scaling` | `3` | `0` -off, `1` equilibrium, `2` geometric, `3` auto, `4` dynamic(later) | -| `Perturbation` | `100` | switch on perturbation (`50`), automatic (`100`), don't try perturbing (`102`) | +| `"PrimalTolerance"` | `1e-7` | Primal feasibility tolerance | +| `"DualTolerance"` | `1e-7` | Dual feasibility tolerance | +| `"DualObjectiveLimit"` | `1e308` | When using dual simplex (where the objective is monotonically changing), terminate when the objective exceeds this limit | +| `"MaximumIterations"` | `2147483647` | Terminate after performing this number of simplex iterations | +| `"MaximumSeconds"` | `-1.0` | Terminate after this many seconds have passed. A negative value means no time limit | +| `"LogLevel"` | `1` | Set to 1, 2, 3, or 4 for increasing output. Set to `0` to disable output | +| `"PresolveType"` | `0` | Set to 1 to disable presolve | +| `"SolveType"` | `5` | Solution method: dual simplex (`0`), primal simplex (`1`), sprint (`2`), barrier with crossover (`3`), barrier without crossover (`4`), automatic (`5`) | +| `"InfeasibleReturn"` | `0` | Set to 1 to return as soon as the problem is found to be infeasible (by default, an infeasibility proof is computed as well) | +| `"Scaling"` | `3` | `0` -off, `1` equilibrium, `2` geometric, `3` auto, `4` dynamic(later) | +| `"Perturbation"` | `100` | switch on perturbation (`50`), automatic (`100`), don't try perturbing (`102`) | From c792434ddf840a0afc8d904ed203e9f01cba5b8c Mon Sep 17 00:00:00 2001 From: odow Date: Sat, 1 Apr 2023 12:47:22 +1300 Subject: [PATCH 2/6] Update --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index fc1cd26..d820bea 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,24 @@ set_optimizer_attribute(model, "LogLevel", 1) set_optimizer_attribute(model, "Algorithm", 4) ``` +## Supported problem types + +List of supported model attributes: + + * `MOI.ObjectiveFunction{MOI.ScalarAffineFunction{Float64}}` + * `MOI.ObjectiveSense` + +List of supported constraint types: + + * `MOI.ScalarAffineFunction{Float64}` in `MOI.EqualTo{Float64}` + * `MOI.ScalarAffineFunction{Float64}` in `MOI.GreaterThan{Float64}` + * `MOI.ScalarAffineFunction{Float64}` in `MOI.Interval{Float64}` + * `MOI.ScalarAffineFunction{Float64}` in `MOI.LessThan{Float64}` + * `MOI.VariableIndex` in `MOI.EqualTo{Float64}` + * `MOI.VariableIndex` in `MOI.GreaterThan{Float64}` + * `MOI.VariableIndex` in `MOI.Interval{Float64}` + * `MOI.VariableIndex` in `MOI.LessThan{Float64}` + ## Options The following options are available to get/set via [`JuMP.set_attribute`](@ref) From d5853c580745c34317f50d3cf6a67edb93b1827d Mon Sep 17 00:00:00 2001 From: odow Date: Sat, 1 Apr 2023 12:53:21 +1300 Subject: [PATCH 3/6] Fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d820bea..f1718c7 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Pkg.add("Clp") ``` In addition to installing the Clp.jl package, this will also download and -install the Clp binaries. (You do not need to isntall Clp separately.) +install the Clp binaries. (You do not need to install Clp separately.) To use a custom binary, read the [Custom solver binaries](https://jump.dev/JuMP.jl/stable/developers/custom_solver_binaries/) section of the JuMP documentation. From e81810edc71319a8f0392e1f8cbfd83a9f691fd7 Mon Sep 17 00:00:00 2001 From: odow Date: Mon, 3 Apr 2023 14:36:42 +1200 Subject: [PATCH 4/6] Update --- README.md | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index f1718c7..8a50f5a 100644 --- a/README.md +++ b/README.md @@ -46,27 +46,32 @@ To use Clp with [JuMP](https://github.com/jump-dev/JuMP.jl), use `Clp.Optimizer` ```julia using JuMP, Clp model = Model(Clp.Optimizer) -set_optimizer_attribute(model, "LogLevel", 1) -set_optimizer_attribute(model, "Algorithm", 4) +set_attribute(model, "LogLevel", 1) +set_attribute(model, "Algorithm", 4) ``` -## Supported problem types +## MathOptInterface API -List of supported model attributes: +The Clp optimizer supports the following constraints and attributes. + +List of supported objective functions: - * `MOI.ObjectiveFunction{MOI.ScalarAffineFunction{Float64}}` - * `MOI.ObjectiveSense` + * [`MOI.ObjectiveFunction{MOI.ScalarAffineFunction{Float64}}`](@ref) List of supported constraint types: - * `MOI.ScalarAffineFunction{Float64}` in `MOI.EqualTo{Float64}` - * `MOI.ScalarAffineFunction{Float64}` in `MOI.GreaterThan{Float64}` - * `MOI.ScalarAffineFunction{Float64}` in `MOI.Interval{Float64}` - * `MOI.ScalarAffineFunction{Float64}` in `MOI.LessThan{Float64}` - * `MOI.VariableIndex` in `MOI.EqualTo{Float64}` - * `MOI.VariableIndex` in `MOI.GreaterThan{Float64}` - * `MOI.VariableIndex` in `MOI.Interval{Float64}` - * `MOI.VariableIndex` in `MOI.LessThan{Float64}` + * [`MOI.ScalarAffineFunction{Float64}`](@ref) in [`MOI.EqualTo{Float64}`](@ref) + * [`MOI.ScalarAffineFunction{Float64}`](@ref) in [`MOI.GreaterThan{Float64}`](@ref) + * [`MOI.ScalarAffineFunction{Float64}`](@ref) in [`MOI.Interval{Float64}`](@ref) + * [`MOI.ScalarAffineFunction{Float64}`](@ref) in [`MOI.LessThan{Float64}`](@ref) + * [`MOI.VariableIndex`](@ref) in [`MOI.EqualTo{Float64}`](@ref) + * [`MOI.VariableIndex`](@ref) in [`MOI.GreaterThan{Float64}`](@ref) + * [`MOI.VariableIndex`](@ref) in [`MOI.Interval{Float64}`](@ref) + * [`MOI.VariableIndex`](@ref) in [`MOI.LessThan{Float64}`](@ref) + +List of supported model attributes: + + * [`MOI.ObjectiveSense()`](@ref) ## Options From e4208b28ffa8a70550391635e301077e2d9c761f Mon Sep 17 00:00:00 2001 From: odow Date: Mon, 3 Apr 2023 14:53:09 +1200 Subject: [PATCH 5/6] Update --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 8a50f5a..4595561 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,10 @@ List of supported objective functions: * [`MOI.ObjectiveFunction{MOI.ScalarAffineFunction{Float64}}`](@ref) +List of supported variable types: + + * [`MOI.Reals`](@ref) + List of supported constraint types: * [`MOI.ScalarAffineFunction{Float64}`](@ref) in [`MOI.EqualTo{Float64}`](@ref) From fa136f2729ae856a15d8b5a8b6f9c9f295dc4f1f Mon Sep 17 00:00:00 2001 From: odow Date: Tue, 4 Apr 2023 13:32:43 +1200 Subject: [PATCH 6/6] Update --- README.md | 46 +++++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 4595561..d0fc1d3 100644 --- a/README.md +++ b/README.md @@ -9,12 +9,10 @@ [COIN-OR Linear Programming](https://projects.coin-or.org/Clp) solver. The wrapper has two components: + * a thin wrapper around the complete C API * an interface to [MathOptInterface](https://github.com/jump-dev/MathOptInterface.jl) -The C API can be accessed via `Clp.Clp_XXX` functions, where the names and -arguments are identical to the C API. - ## Affiliation This wrapper is maintained by the JuMP community and is not a COIN-OR project. @@ -35,14 +33,14 @@ Pkg.add("Clp") ``` In addition to installing the Clp.jl package, this will also download and -install the Clp binaries. (You do not need to install Clp separately.) +install the Clp binaries. You do not need to install Clp separately. To use a custom binary, read the [Custom solver binaries](https://jump.dev/JuMP.jl/stable/developers/custom_solver_binaries/) section of the JuMP documentation. ## Use with JuMP -To use Clp with [JuMP](https://github.com/jump-dev/JuMP.jl), use `Clp.Optimizer`: +To use Clp with JuMP, use `Clp.Optimizer`: ```julia using JuMP, Clp model = Model(Clp.Optimizer) @@ -79,19 +77,25 @@ List of supported model attributes: ## Options -The following options are available to get/set via [`JuMP.set_attribute`](@ref) -or [`MOI.RawOptimizerAttribute`](@ref). - -| Parameter | Default value | Description | -|:----------|:--------------|:----------| -| `"PrimalTolerance"` | `1e-7` | Primal feasibility tolerance | -| `"DualTolerance"` | `1e-7` | Dual feasibility tolerance | -| `"DualObjectiveLimit"` | `1e308` | When using dual simplex (where the objective is monotonically changing), terminate when the objective exceeds this limit | -| `"MaximumIterations"` | `2147483647` | Terminate after performing this number of simplex iterations | -| `"MaximumSeconds"` | `-1.0` | Terminate after this many seconds have passed. A negative value means no time limit | -| `"LogLevel"` | `1` | Set to 1, 2, 3, or 4 for increasing output. Set to `0` to disable output | -| `"PresolveType"` | `0` | Set to 1 to disable presolve | -| `"SolveType"` | `5` | Solution method: dual simplex (`0`), primal simplex (`1`), sprint (`2`), barrier with crossover (`3`), barrier without crossover (`4`), automatic (`5`) | -| `"InfeasibleReturn"` | `0` | Set to 1 to return as soon as the problem is found to be infeasible (by default, an infeasibility proof is computed as well) | -| `"Scaling"` | `3` | `0` -off, `1` equilibrium, `2` geometric, `3` auto, `4` dynamic(later) | -| `"Perturbation"` | `100` | switch on perturbation (`50`), automatic (`100`), don't try perturbing (`102`) | +Options are, unfortunately, not well documented. + +The following options are likely to be the most useful: + +| Parameter | Example | Explanation | +| -------------------- | ------- | ------------------------------------------- | +| `PrimalTolerance` | `1e-7` | Primal feasibility tolerance | +| `DualTolerance` | `1e-7` | Dual feasibility tolerance | +| `DualObjectiveLimit` | `1e308` | When using dual simplex (where the objective is monotonically changing), terminate when the objective exceeds this limit | +| `MaximumIterations` | `2147483647` | Terminate after performing this number of simplex iterations | +| `MaximumSeconds` | `-1.0` | Terminate after this many seconds have passed. A negative value means no time limit | +| `LogLevel` | `1` | Set to 1, 2, 3, or 4 for increasing output. Set to `0` to disable output | +| `PresolveType` | `0` | Set to `1` to disable presolve | +| `SolveType` | `5` | Solution method: dual simplex (`0`), primal simplex (`1`), sprint (`2`), barrier with crossover (`3`), barrier without crossover (`4`), automatic (`5`) | +| `InfeasibleReturn` | `0` | Set to 1 to return as soon as the problem is found to be infeasible (by default, an infeasibility proof is computed as well) | +| `Scaling` | `3` | `0` -off, `1` equilibrium, `2` geometric, `3` auto, `4` dynamic(later) | +| `Perturbation` | `100` | switch on perturbation (`50`), automatic (`100`), don't try perturbing (`102`) | + +## C API + +The C API can be accessed via `Clp.Clp_XXX` functions, where the names and +arguments are identical to the C API.