Skip to main content

BaronOptions

Struct BaronOptions 

Source
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

Source

pub fn eps_a(self, v: f64) -> Self

Absolute termination tolerance (>= 1e-12).

BARON option EpsA.

Source

pub fn eps_r(self, v: f64) -> Self

Relative termination tolerance (nonnegative).

BARON option EpsR.

Source

pub fn delta_term(self, v: bool) -> Self

Terminate on insufficient progress over DeltaT seconds.

BARON option DeltaTerm (written as 0/1).

Source

pub fn delta_t(self, v: f64) -> Self

Progress window in seconds for DeltaTerm.

BARON option DeltaT.

Source

pub fn delta_a(self, v: f64) -> Self

Absolute improvement threshold for DeltaTerm.

BARON option DeltaA.

Source

pub fn delta_r(self, v: f64) -> Self

Relative improvement threshold for DeltaTerm.

BARON option DeltaR.

Source

pub fn cut_off(self, v: f64) -> Self

Ignore solutions worse than this objective value.

BARON option CutOff.

Source

pub fn target(self, v: f64) -> Self

Terminate once a solution at least as good as this is found.

BARON option Target.

Source

pub fn abs_con_feas_tol(self, v: f64) -> Self

Absolute constraint feasibility tolerance.

BARON option AbsConFeasTol.

Source

pub fn rel_con_feas_tol(self, v: f64) -> Self

Relative constraint feasibility tolerance (0..=0.1).

BARON option RelConFeasTol.

Source

pub fn abs_int_feas_tol(self, v: f64) -> Self

Absolute integer feasibility tolerance.

BARON option AbsIntFeasTol.

Source

pub fn rel_int_feas_tol(self, v: f64) -> Self

Relative integer feasibility tolerance (0..=0.1).

BARON option RelIntFeasTol.

Source

pub fn primal_cs_tol(self, v: f64) -> Self

Absolute tolerance for primal complementary slackness.

BARON option PrimalCSTol.

Source

pub fn dual_cs_tol(self, v: f64) -> Self

Absolute tolerance for dual complementary slackness.

BARON option DualCSTol.

Source

pub fn dual_feas_tol(self, v: f64) -> Self

Absolute tolerance for dual feasibility.

BARON option DualFeasTol.

Source

pub fn ec_tol(self, v: f64) -> Self

Absolute tolerance for equilibrium-condition complementarity.

BARON option ECTol.

Source

pub fn box_tol(self, v: f64) -> Self

Boxes smaller than this are eliminated (>= 1e-12).

BARON option BoxTol.

Source

pub fn first_feas(self, v: bool) -> Self

Terminate once NumSol feasible solutions are found.

BARON option FirstFeas (written as 0/1).

Source

pub fn first_loc(self, v: bool) -> Self

Terminate once a local optimum is found.

BARON option FirstLoc (written as 0/1).

Source

pub fn max_iter(self, v: i64) -> Self

Branch-and-reduce iteration limit; -1 for unlimited.

BARON option MaxIter.

Source

pub fn want_dual(self, v: bool) -> Self

Return a dual solution for the best primal point.

BARON option WantDual (written as 0/1).

Source

pub fn dual_budget(self, v: f64) -> Self

Extra time (s) to compute a dual solution on timeout.

BARON option DualBudget.

Source

pub fn num_sol(self, v: i64) -> Self

Number of feasible solutions to find; -1 for all.

BARON option NumSol.

Source

pub fn isol_tol(self, v: f64) -> Self

Separation distance between distinct solutions (with NumSol).

BARON option IsolTol.

Source

pub fn n_outer1(self, v: i64) -> Self

Number of outer approximators of convex univariate functions.

BARON option NOuter1.

Source

pub fn n_out_per_var(self, v: i64) -> Self

Outer approximators per variable for convex functions.

BARON option NOutPerVar.

Source

pub fn n_out_iter(self, v: i64) -> Self

Rounds of cutting-plane generation at node relaxation.

BARON option NOutIter.

Source

pub fn out_grid(self, v: i64) -> Self

Grid points per variable for convex multivariate approximators.

BARON option OutGrid.

Source

pub fn tdo(self, v: bool) -> Self

Nonlinear-feasibility-based range reduction (poor man’s NLPs).

BARON option TDo (written as 0/1).

Source

pub fn mdo(self, v: bool) -> Self

Marginals-based range reduction.

BARON option MDo (written as 0/1).

Source

pub fn lbttdo(self, v: bool) -> Self

Linear-feasibility-based range reduction (poor man’s LPs).

BARON option LBTTDo (written as 0/1).

Source

pub fn obttdo(self, v: bool) -> Self

Optimality-based bound tightening.

BARON option OBTTDo (written as 0/1).

Source

pub fn pdo(self, v: i64) -> Self

Probing: -2 auto, -1 all variables, 0 none, n on n variables.

BARON option PDo.

Source

pub fn br_var_stra(self, v: i64) -> Self

Branching variable strategy (0 dynamic, 1 violation, 2 edge).

BARON option BrVarStra.

Source

pub fn br_pt_stra(self, v: i64) -> Self

Branching point strategy (0 dynamic, 1 omega, 2 bisection, 3 mix).

BARON option BrPtStra.

Source

pub fn node_sel(self, v: i64) -> Self

Node selection rule (0 dynamic, 1 best-bound, 2 LIFO, 3 min-infeas).

BARON option NodeSel.

Source

pub fn do_local(self, v: bool) -> Self

Local search during upper bounding.

BARON option DoLocal (written as 0/1).

Source

pub fn num_loc(self, v: i64) -> Self

Local searches in preprocessing; -1/-2 for automatic.

BARON option NumLoc.

Source

pub fn pr_level(self, v: i64) -> Self

Print level (0 silent). Overrides the verbose option when set.

BARON option PrLevel.

Source

pub fn pr_freq(self, v: i64) -> Self

Log output frequency in nodes.

BARON option PrFreq.

Source

pub fn pr_time_freq(self, v: f64) -> Self

Log output frequency in seconds.

BARON option PrTimeFreq.

Source

pub fn loc_res(self, v: bool) -> Self

Write detailed local-search results to the results file.

BARON option LocRes (written as 0/1).

Source

pub fn pro_name(self, v: impl Into<String>) -> Self

Problem name (<= 10 characters).

BARON option ProName (written quoted).

Source

pub fn lp_sol(self, v: i64) -> Self

LP/MIP subsolver (-1 auto, 3 CPLEX, 8 CLP/CBC, 15 HSL LA04).

BARON option LPSol.

Source

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).

Source

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).

Source

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).

Source

pub fn cplex_lib_name(self, v: impl Into<String>) -> Self

Full path to the CPLEX callable libraries.

BARON option CplexLibName (written quoted).

Source

pub fn lp_alg(self, v: i64) -> Self

LP algorithm (0 auto, 1 primal, 2 dual, 3 barrier).

BARON option LPAlg.

Source

pub fn nlp_sol(self, v: i64) -> Self

NLP subsolver (-1 auto, 0 none, 9 IPOPT, 10 FilterSD, 14 FilterSQP).

BARON option NLPSol.

Source

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).

Source

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).

Source

pub fn allow_ipopt(self, v: bool) -> Self

Permit IPOPT as an NLP subsolver under auto selection.

BARON option AllowIpopt (written as 0/1).

Source

pub fn lic_name(self, v: impl Into<String>) -> Self

Full path to the BARON license file.

BARON option LicName (written quoted).

Source

pub fn comp_iis(self, v: i64) -> Self

Search for an IIS on infeasible models (0 off .. 5 algorithms).

BARON option CompIIS.

Source

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).

Source

pub fn iis_order(self, v: i64) -> Self

Constraint ordering for the IIS search (-1 auto, 1..=3, >=4 seed).

BARON option IISorder.

Source

pub fn problem_is_convex(self, v: bool) -> Self

Assert the continuous relaxation is convex.

BARON option ProblemIsConvex (written as 0/1).

Source

pub fn seed(self, v: i64) -> Self

Initial seed for BARON’s random number generator (positive).

BARON option seed.

Source

pub fn baron_path(self, p: impl Into<PathBuf>) -> Self

Override for the baron executable path. When unset, "baron" is looked up from PATH.

Source

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

Source§

fn clone(&self) -> BaronOptions

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BaronOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for BaronOptions

Source§

fn default() -> BaronOptions

Returns the “default value” for a type. Read more
Source§

impl HasUniversal for BaronOptions

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> UniversalOptionsExt for T
where T: HasUniversal,

Source§

fn time_limit(self, d: Duration) -> Self

Source§

fn threads(self, n: u32) -> Self

Source§

fn verbose(self, on: bool) -> Self