From 069cdda082dfde31ef7ee935c96e833a3b96b33c Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Thu, 25 May 2023 06:15:08 +1200 Subject: [PATCH] [README] Fix solver parameter section (#139) --- README.md | 45 ++++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index aaaee20..fc29f63 100644 --- a/README.md +++ b/README.md @@ -57,34 +57,29 @@ model = Tulip.Optimizer{BigFloat}() # Create a model in BigFloat precision ## Solver parameters -### Setting parameters +See the [documentation](https://ds4dm.github.io/Tulip.jl/stable/reference/options/) for a full list of parameters. -When using Tulip through JuMP/MOI, parameters can be set either through MOI's generic `OptimizerAttribute`s, for example, `MOI.TimeLimitSec` and `MOI.Silent`, or by name. - -* Through JuMP - ```julia - jump_model = JuMP.Model(Tulip.Optimizer) - - JuMP.set_optimizer_attribute(jump_model, "IPM_IterationsLimit", 200) - ``` - -* Through MOI - ```julia - moi_model = Tulip.Optimizer{Float64}() - - MOI.set(moi_model, MOI.RawOptimizerAttribute("IPM_IterationsLimit"), 200) - ``` - -* Through Tulip's API - ```julia - model = Tulip.Model{Float64}() - - Tulip.set_parameter(model, "IPM_IterationsLimit", 200) - ``` +To set parameters in JuMP, use: +```julia +using JuMP, Tulip +model = Model(Tulip.Optimizer) +set_attribute(model, "IPM_IterationsLimit", 200) +``` -### Parameters description +To set parameters in MathOptInterface, use: +```julia +using Tulip +import MathOptInterface as MOI +model = Tulip.Optimizer{Float64}() +MOI.set(model, MOI.RawOptimizerAttribute("IPM_IterationsLimit"), 200) +``` -See the [documentation](https://ds4dm.github.io/Tulip.jl/stable/reference/options/). +To set parameters in the Tulip API, use: +```julia +using Tulip +model = Tulip.Model{Float64}() +Tulip.set_parameter(model, "IPM_IterationsLimit", 200) +``` ## Command-line executable