Struct kair::model::ModelLp [−][src]
LP problem as a Flux Balance Analysis formulation.
See: What is flux balance analysis?, Orth et al., 2010
Being $f(\overrightarrow{z})$ a function to optimize (historically, biomass or ATPase), $S$ and stoichimetry matrix and $\overrightarrow{v}$ the flux vector representing the reactions in the reconstruction:
$$ \text{Max.} f(\overrightarrow{z}) \newline \text{subject to}\medspace S\overrightarrow{v} = 0 \newline \text{where}\medspace lb_j \le v_j \le ub_j $$
Fields
id: String
Id from SBML document
name: String
Name from SBML document
metabolites: HashMap<String, Species>
Metabolites from the SBML document
reactions: HashMap<String, ReactionLp>
Reactions from the SBML document
variables: HashMap<String, Variable>
Parsed from reactions, variables of LP problem
config: HashMap<String, Parameter>
Parameters from the SBML document
objective: String
Reaction id to be used as the objective in the LP problem
stoichiometry: HashMap<String, Vec<Expression>>
Parsed stoichiometry matrix
Implementations
impl ModelLp
[src]
pub fn new(input_sbml: Model) -> Self
[src]
Read and call the LP builder.
Example
use kair::ModelLp; use std::str::FromStr; // contents is a &str containing a SBML document ModelLp::from_str(&contents).unwrap();
pub fn populate_model(&mut self, problem: &mut ProblemVariables)
[src]
Build LP problem as an FBA formulation.
pub fn get_objective(&self) -> Variable
[src]
Get objective variable given the objective identifier
pub fn get_objective_reaction(&mut self) -> Result<&mut ReactionLp, SBMLError>
[src]
Get objective variable given the objective identifier
pub fn add_constraints<S: Solver>(&self, model: &mut S::Model)
[src]
Add the constraints to th problem
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ModelLp
impl Send for ModelLp
impl Sync for ModelLp
impl Unpin for ModelLp
impl UnwindSafe for ModelLp
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,