Base functions

COBREXA._constantsConstant

A named tuple that contains the magic values that are used globally for whatever purposes.

source
COBREXA.flux_dictMethod
flux_dict(model::MetabolicModel, opt_model)::Maybe{Dict{String, Float64}, Nothing}

Returns the fluxes of the model as a reaction-keyed dictionary, if solved.

Example

flux_dict(model, flux_balance_analysis(model, ...))
source
COBREXA.flux_vectorMethod
flux_vector(opt_model)::Maybe{Vector{Float64}}

Returns a vector of fluxes of the model, if solved.

Example

flux_vector(flux_balance_analysis(model, ...))
source
COBREXA.is_solvedMethod
is_solved(opt_model)

Return true if opt_model solved successfully (solution is optimal or locally optimal). Return false if any other termination status is reached. Termination status is defined in the documentation of JuMP.

source
COBREXA.make_optimization_modelMethod
make_optimization_model(
    model::MetabolicModel,
    optimizer;
    sense = MOI.MAX_SENSE,
)

Convert MetabolicModels to a JuMP model, place objectives and the equality constraint.

source
COBREXA.optimize_objectiveMethod
optimize_objective(opt_model)::Maybe{Float64}

Shortcut for running JuMP optimize! on a model and returning the objective value, if solved.

source
COBREXA.set_optmodel_bound!Method
set_optmodel_bound!(vidx, opt_model;
    ub::Maybe{Real} = nothing,
    lb::Maybe{Real} = nothing,
)

Helper function to set the bounds of a variable in the model. Internally calls set_normalized_rhs from JuMP. If the bounds are set to nothing, they will not be changed.

source
COBREXA.solved_objective_valueMethod
solved_objective_value(opt_model)::Maybe{Float64}

Returns the current objective value of a model, if solved.

Example

solved_objective_value(flux_balance_analysis(model, ...))
source