Miscellaneous functions
COBREXA.absolute_tolerance_bound
— Methodabsolute_tolerance_bound(tolerance) -> COBREXA.var"#400#401"
Make a function that returns absolute tolerance bounds, i.e. value - tolerance
and value + tolerance
in a tuple, in the increasing order.
COBREXA.relative_tolerance_bound
— Methodrelative_tolerance_bound(tolerance) -> COBREXA.var"#402#403"
Make a function that returns relative tolerance bounds, i.e. value / tolerance
and value * tolerance
in a tuple, in the increasing order.
COBREXA.remove_bounds
— Methodremove_bounds(
cs::ConstraintTrees.Tree{ConstraintTrees.Constraint}
) -> Any
Make a copy of a constraint tree with all bounds removed. This is helpful when creating large trees only for for value representation purposes, which should not directly constraint anything (and thus should not put additional stress on the constraint solver).
COBREXA.break_interval
— Methodbreak_interval(lower, upper, breaks::Int64) -> Any
Break an interval into breaks
(count) breaks.
Used for computing breaks in objective_production_envelope
.
COBREXA.maybemap
— Functionmaybemap(f, ::Nothing)
maybemap(f, ::Nothing, def) -> Any
Helper for applying functions to stuff that might be nothing
.
COBREXA.set_objective_sense
— Methodset_objective_sense(
objective_sense
) -> COBREXA.var"#406#407"
Change the objective sense of optimization. Accepted arguments include Minimal
, Maximal
, and Feasible
.
COBREXA.set_optimizer
— Methodset_optimizer(optimizer) -> COBREXA.var"#408#409"
Change the JuMP optimizer used to run the optimization.
COBREXA.set_optimizer_attribute
— Methodset_optimizer_attribute(
attribute_key,
value
) -> COBREXA.var"#410#411"
Change a named JuMP optimizer attribute. The attribute names are optimizer-specific, refer to the JuMP documentation and the documentation of the specific optimizer for usable keys and values.
COBREXA.set_time_limit
— Methodset_time_limit(limit::Real) -> COBREXA.var"#412#413"
Set a time limit in seconds for the optimizer computation (shortcut for set_time_limit_sec
from JuMP).
COBREXA.silence
— Methodsilence
Disable all output from the JuMP optimizer (shortcut for set_silent
from JuMP).
COBREXA.unsilence
— Methodunsilence
Enable output from the JuMP optimizer (shortcut for unset_silent
from JuMP).
COBREXA.tree_deflate
— Methodtree_deflate(f, x::ConstraintTrees.Tree{T}) -> Vector
tree_deflate(
f,
x::ConstraintTrees.Tree{T},
::Type{U}
) -> Vector
Extract all elements of a ConstraintTrees.Tree
in order and return them in a Vector
transformed by f
. If the order is not modified, one can re-insert a vector of modified elements into the same-shaped tree using tree_reinflate
.
COBREXA.tree_reinflate
— Methodtree_reinflate(
x::ConstraintTrees.Tree,
elems::Array{T, 1}
) -> ConstraintTrees.Tree
Insert a Vector
of elements into the "values" of a ConstraintTrees.Tree
. The order of elements is given by tree_deflate
.