pub struct BaronOptions {
pub universal: UniversalOptions,
pub baron_path: Option<PathBuf>,
/* private fields */
}Expand description
BARON-specific solver options.
Universal options (time_limit, threads, verbose) come from the embedded
UniversalOptions via UniversalOptionsExt
and map to the BARON MaxTime, threads, and PrLevel keywords respectively.
Every other knob is a BARON option written verbatim into the OPTIONS{ ... }
block of the generated .bar file. Each builder method below corresponds to a
documented BARON option. The method name is the snake_case form of the BARON
keyword (e.g. EpsR -> .eps_r(..)). For any keyword not covered by a typed
builder, use BaronOptions::raw.
ResName, TimName, results, and times are managed by the backend (it
needs the results and times files to parse the solution) and are not
user-settable, entries for those keywords passed through raw are ignored.
Fields§
§universal: UniversalOptions§baron_path: Option<PathBuf>Override for the baron executable. When None, "baron" is looked up
from PATH.
Implementations§
Source§impl BaronOptions
impl BaronOptions
Sourcepub fn eps_a(self, v: f64) -> Self
pub fn eps_a(self, v: f64) -> Self
Absolute termination tolerance (>= 1e-12).
BARON option EpsA.
Sourcepub fn eps_r(self, v: f64) -> Self
pub fn eps_r(self, v: f64) -> Self
Relative termination tolerance (nonnegative).
BARON option EpsR.
Sourcepub fn delta_term(self, v: bool) -> Self
pub fn delta_term(self, v: bool) -> Self
Terminate on insufficient progress over DeltaT seconds.
BARON option DeltaTerm (written as 0/1).
Sourcepub fn delta_t(self, v: f64) -> Self
pub fn delta_t(self, v: f64) -> Self
Progress window in seconds for DeltaTerm.
BARON option DeltaT.
Sourcepub fn delta_a(self, v: f64) -> Self
pub fn delta_a(self, v: f64) -> Self
Absolute improvement threshold for DeltaTerm.
BARON option DeltaA.
Sourcepub fn delta_r(self, v: f64) -> Self
pub fn delta_r(self, v: f64) -> Self
Relative improvement threshold for DeltaTerm.
BARON option DeltaR.
Sourcepub fn cut_off(self, v: f64) -> Self
pub fn cut_off(self, v: f64) -> Self
Ignore solutions worse than this objective value.
BARON option CutOff.
Sourcepub fn target(self, v: f64) -> Self
pub fn target(self, v: f64) -> Self
Terminate once a solution at least as good as this is found.
BARON option Target.
Sourcepub fn abs_con_feas_tol(self, v: f64) -> Self
pub fn abs_con_feas_tol(self, v: f64) -> Self
Absolute constraint feasibility tolerance.
BARON option AbsConFeasTol.
Sourcepub fn rel_con_feas_tol(self, v: f64) -> Self
pub fn rel_con_feas_tol(self, v: f64) -> Self
Relative constraint feasibility tolerance (0..=0.1).
BARON option RelConFeasTol.
Sourcepub fn abs_int_feas_tol(self, v: f64) -> Self
pub fn abs_int_feas_tol(self, v: f64) -> Self
Absolute integer feasibility tolerance.
BARON option AbsIntFeasTol.
Sourcepub fn rel_int_feas_tol(self, v: f64) -> Self
pub fn rel_int_feas_tol(self, v: f64) -> Self
Relative integer feasibility tolerance (0..=0.1).
BARON option RelIntFeasTol.
Sourcepub fn primal_cs_tol(self, v: f64) -> Self
pub fn primal_cs_tol(self, v: f64) -> Self
Absolute tolerance for primal complementary slackness.
BARON option PrimalCSTol.
Sourcepub fn dual_cs_tol(self, v: f64) -> Self
pub fn dual_cs_tol(self, v: f64) -> Self
Absolute tolerance for dual complementary slackness.
BARON option DualCSTol.
Sourcepub fn dual_feas_tol(self, v: f64) -> Self
pub fn dual_feas_tol(self, v: f64) -> Self
Absolute tolerance for dual feasibility.
BARON option DualFeasTol.
Sourcepub fn ec_tol(self, v: f64) -> Self
pub fn ec_tol(self, v: f64) -> Self
Absolute tolerance for equilibrium-condition complementarity.
BARON option ECTol.
Sourcepub fn box_tol(self, v: f64) -> Self
pub fn box_tol(self, v: f64) -> Self
Boxes smaller than this are eliminated (>= 1e-12).
BARON option BoxTol.
Sourcepub fn first_feas(self, v: bool) -> Self
pub fn first_feas(self, v: bool) -> Self
Terminate once NumSol feasible solutions are found.
BARON option FirstFeas (written as 0/1).
Sourcepub fn first_loc(self, v: bool) -> Self
pub fn first_loc(self, v: bool) -> Self
Terminate once a local optimum is found.
BARON option FirstLoc (written as 0/1).
Sourcepub fn max_iter(self, v: i64) -> Self
pub fn max_iter(self, v: i64) -> Self
Branch-and-reduce iteration limit; -1 for unlimited.
BARON option MaxIter.
Sourcepub fn want_dual(self, v: bool) -> Self
pub fn want_dual(self, v: bool) -> Self
Return a dual solution for the best primal point.
BARON option WantDual (written as 0/1).
Sourcepub fn dual_budget(self, v: f64) -> Self
pub fn dual_budget(self, v: f64) -> Self
Extra time (s) to compute a dual solution on timeout.
BARON option DualBudget.
Sourcepub fn num_sol(self, v: i64) -> Self
pub fn num_sol(self, v: i64) -> Self
Number of feasible solutions to find; -1 for all.
BARON option NumSol.
Sourcepub fn isol_tol(self, v: f64) -> Self
pub fn isol_tol(self, v: f64) -> Self
Separation distance between distinct solutions (with NumSol).
BARON option IsolTol.
Sourcepub fn n_outer1(self, v: i64) -> Self
pub fn n_outer1(self, v: i64) -> Self
Number of outer approximators of convex univariate functions.
BARON option NOuter1.
Sourcepub fn n_out_per_var(self, v: i64) -> Self
pub fn n_out_per_var(self, v: i64) -> Self
Outer approximators per variable for convex functions.
BARON option NOutPerVar.
Sourcepub fn n_out_iter(self, v: i64) -> Self
pub fn n_out_iter(self, v: i64) -> Self
Rounds of cutting-plane generation at node relaxation.
BARON option NOutIter.
Sourcepub fn out_grid(self, v: i64) -> Self
pub fn out_grid(self, v: i64) -> Self
Grid points per variable for convex multivariate approximators.
BARON option OutGrid.
Sourcepub fn tdo(self, v: bool) -> Self
pub fn tdo(self, v: bool) -> Self
Nonlinear-feasibility-based range reduction (poor man’s NLPs).
BARON option TDo (written as 0/1).
Sourcepub fn mdo(self, v: bool) -> Self
pub fn mdo(self, v: bool) -> Self
Marginals-based range reduction.
BARON option MDo (written as 0/1).
Sourcepub fn lbttdo(self, v: bool) -> Self
pub fn lbttdo(self, v: bool) -> Self
Linear-feasibility-based range reduction (poor man’s LPs).
BARON option LBTTDo (written as 0/1).
Sourcepub fn obttdo(self, v: bool) -> Self
pub fn obttdo(self, v: bool) -> Self
Optimality-based bound tightening.
BARON option OBTTDo (written as 0/1).
Sourcepub fn pdo(self, v: i64) -> Self
pub fn pdo(self, v: i64) -> Self
Probing: -2 auto, -1 all variables, 0 none, n on n variables.
BARON option PDo.
Sourcepub fn br_var_stra(self, v: i64) -> Self
pub fn br_var_stra(self, v: i64) -> Self
Branching variable strategy (0 dynamic, 1 violation, 2 edge).
BARON option BrVarStra.
Sourcepub fn br_pt_stra(self, v: i64) -> Self
pub fn br_pt_stra(self, v: i64) -> Self
Branching point strategy (0 dynamic, 1 omega, 2 bisection, 3 mix).
BARON option BrPtStra.
Sourcepub fn node_sel(self, v: i64) -> Self
pub fn node_sel(self, v: i64) -> Self
Node selection rule (0 dynamic, 1 best-bound, 2 LIFO, 3 min-infeas).
BARON option NodeSel.
Sourcepub fn do_local(self, v: bool) -> Self
pub fn do_local(self, v: bool) -> Self
Local search during upper bounding.
BARON option DoLocal (written as 0/1).
Sourcepub fn num_loc(self, v: i64) -> Self
pub fn num_loc(self, v: i64) -> Self
Local searches in preprocessing; -1/-2 for automatic.
BARON option NumLoc.
Sourcepub fn pr_level(self, v: i64) -> Self
pub fn pr_level(self, v: i64) -> Self
Print level (0 silent). Overrides the verbose option when set.
BARON option PrLevel.
Sourcepub fn pr_time_freq(self, v: f64) -> Self
pub fn pr_time_freq(self, v: f64) -> Self
Log output frequency in seconds.
BARON option PrTimeFreq.
Sourcepub fn loc_res(self, v: bool) -> Self
pub fn loc_res(self, v: bool) -> Self
Write detailed local-search results to the results file.
BARON option LocRes (written as 0/1).
Sourcepub fn pro_name(self, v: impl Into<String>) -> Self
pub fn pro_name(self, v: impl Into<String>) -> Self
Problem name (<= 10 characters).
BARON option ProName (written quoted).
Sourcepub fn lp_sol(self, v: i64) -> Self
pub fn lp_sol(self, v: i64) -> Self
LP/MIP subsolver (-1 auto, 3 CPLEX, 8 CLP/CBC, 15 HSL LA04).
BARON option LPSol.
Sourcepub fn allow_cplex(self, v: bool) -> Self
pub fn allow_cplex(self, v: bool) -> Self
Permit CPLEX as an LP/MIP subsolver under auto selection.
BARON option AllowCPLEX (written as 0/1).
Sourcepub fn allow_cbc(self, v: bool) -> Self
pub fn allow_cbc(self, v: bool) -> Self
Permit CBC as an LP/MIP subsolver under auto selection.
BARON option AllowCBC (written as 0/1).
Sourcepub fn allow_hsl(self, v: bool) -> Self
pub fn allow_hsl(self, v: bool) -> Self
Permit HSL’s LA04 as an LP/MIP subsolver under auto selection.
BARON option AllowHSL (written as 0/1).
Sourcepub fn cplex_lib_name(self, v: impl Into<String>) -> Self
pub fn cplex_lib_name(self, v: impl Into<String>) -> Self
Full path to the CPLEX callable libraries.
BARON option CplexLibName (written quoted).
Sourcepub fn lp_alg(self, v: i64) -> Self
pub fn lp_alg(self, v: i64) -> Self
LP algorithm (0 auto, 1 primal, 2 dual, 3 barrier).
BARON option LPAlg.
Sourcepub fn nlp_sol(self, v: i64) -> Self
pub fn nlp_sol(self, v: i64) -> Self
NLP subsolver (-1 auto, 0 none, 9 IPOPT, 10 FilterSD, 14 FilterSQP).
BARON option NLPSol.
Sourcepub fn allow_filter_sd(self, v: bool) -> Self
pub fn allow_filter_sd(self, v: bool) -> Self
Permit FilterSD as an NLP subsolver under auto selection.
BARON option AllowFilterSD (written as 0/1).
Sourcepub fn allow_filter_sqp(self, v: bool) -> Self
pub fn allow_filter_sqp(self, v: bool) -> Self
Permit FilterSQP as an NLP subsolver under auto selection.
BARON option AllowFilterSQP (written as 0/1).
Sourcepub fn allow_ipopt(self, v: bool) -> Self
pub fn allow_ipopt(self, v: bool) -> Self
Permit IPOPT as an NLP subsolver under auto selection.
BARON option AllowIpopt (written as 0/1).
Sourcepub fn lic_name(self, v: impl Into<String>) -> Self
pub fn lic_name(self, v: impl Into<String>) -> Self
Full path to the BARON license file.
BARON option LicName (written quoted).
Sourcepub fn comp_iis(self, v: i64) -> Self
pub fn comp_iis(self, v: i64) -> Self
Search for an IIS on infeasible models (0 off .. 5 algorithms).
BARON option CompIIS.
Sourcepub fn iis_int(self, v: bool) -> Self
pub fn iis_int(self, v: bool) -> Self
Consider general integers (not binaries) as part of an IIS.
BARON option IISint (written as 0/1).
Sourcepub fn iis_order(self, v: i64) -> Self
pub fn iis_order(self, v: i64) -> Self
Constraint ordering for the IIS search (-1 auto, 1..=3, >=4 seed).
BARON option IISorder.
Sourcepub fn problem_is_convex(self, v: bool) -> Self
pub fn problem_is_convex(self, v: bool) -> Self
Assert the continuous relaxation is convex.
BARON option ProblemIsConvex (written as 0/1).
Sourcepub fn seed(self, v: i64) -> Self
pub fn seed(self, v: i64) -> Self
Initial seed for BARON’s random number generator (positive).
BARON option seed.
Sourcepub fn baron_path(self, p: impl Into<PathBuf>) -> Self
pub fn baron_path(self, p: impl Into<PathBuf>) -> Self
Override for the baron executable path. When unset, "baron" is looked
up from PATH.
Sourcepub fn raw(self, keyword: impl Into<String>, value: impl Into<String>) -> Self
pub fn raw(self, keyword: impl Into<String>, value: impl Into<String>) -> Self
Set an arbitrary BARON option by keyword, written verbatim as
keyword: value; in the OPTIONS{ ... } block. Use this for any option
without a dedicated builder. The value is emitted as-is, so use quote
strings (e.g. ("LpSol", "8"), ("NLPSol", "6")).
Keywords managed by the backend (ResName, TimName, results,
times) are ignored.
Trait Implementations§
Source§impl Clone for BaronOptions
impl Clone for BaronOptions
Source§fn clone(&self) -> BaronOptions
fn clone(&self) -> BaronOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BaronOptions
impl Debug for BaronOptions
Source§impl Default for BaronOptions
impl Default for BaronOptions
Source§fn default() -> BaronOptions
fn default() -> BaronOptions
Source§impl HasUniversal for BaronOptions
impl HasUniversal for BaronOptions
fn universal(&self) -> &UniversalOptions
fn universal_mut(&mut self) -> &mut UniversalOptions
Auto Trait Implementations§
impl Freeze for BaronOptions
impl RefUnwindSafe for BaronOptions
impl Send for BaronOptions
impl Sync for BaronOptions
impl Unpin for BaronOptions
impl UnsafeUnpin for BaronOptions
impl UnwindSafe for BaronOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more