public class GLPKBind extends Bind
Modifier and Type | Field and Description |
---|---|
private org.gnu.glpk.glp_iocp |
mipParm |
private org.gnu.glpk.glp_prob |
model |
private org.gnu.glpk.glp_smcp |
parm |
private java.util.Map<java.lang.String,java.lang.Integer> |
vars
Map to match entities names to a GLPK column index.
|
bioNet, constraintObjectives, constraints, deadReactions, exchangeInteractions, interactionInSolver, interactionsEntitiesCause, interactionsEntitiesConsequence, intNet, intToConstraint, lastSolve, obj, operationFactory, reactionToActiveGPR, relationFactory, simpleConstraints, solverSimpleConstraints, steadyStateConstraints, threadFactory
Constructor and Description |
---|
GLPKBind(boolean interactionInSolver) |
GLPKBind(java.util.List<Constraint> constraints,
java.util.Map<parsebionet.biodata.BioEntity,Constraint> simpleConstraints,
InteractionNetwork intNet,
parsebionet.biodata.BioNetwork bioNet,
boolean interactionInSolver) |
Modifier and Type | Method and Description |
---|---|
void |
changeObjVarValue(parsebionet.biodata.BioEntity e,
double d)
Changes the coefficient of an entity in the objective.
|
protected void |
changeVarBounds(java.lang.String entity,
double[] bounds)
Changes the bounds of an entity.
|
protected void |
clear()
Clears the solver's model.
|
protected void |
deleteConstraints(java.util.List<java.lang.Object> constraints)
Deletes solver constraints.
|
void |
end() |
void |
entitiesToSolverVars()
Transforms problem entities into the right solver variables.
|
protected DoubleResult |
go(boolean saveResults)
Make the solver perform the solves.
|
void |
init()
Initialization of GLPK parameters and of the right factories.
|
protected void |
interactionsToSolverConstraints(java.util.List<Interaction> interactions)
Not used.
|
boolean |
isMIP() |
protected void |
makeSolverConstraint(Constraint constraint,
java.util.List<java.lang.Object> toRemoveFromModel,
java.util.Map<java.lang.String,double[]> oldBounds)
Creates a constraint for the solver.
|
void |
makeSolverObjective()
Transforms the porblem's objective into a solver objective.
|
void |
setObjSense(boolean maximize)
Sets the sense of the objective function.
|
checkInteractions, checkInteractionsForEntities, clearSolver, constraintsToSolverConstraints, createFluxesSummation, displayConstraints, FBA, FBAWithConstraints, getBioNetwork, getConstraints, getDeadReactions, getExchangeInteractions, getInteractionNetwork, getInteractionsEntities, getInteractionsEntitiesCause, getIntToConstraint, getObjective, getSimpleConstraints, getSolvedValue, getThreadFactory, isInteractionInSolver, isLastSolveEmpty, loadConditionsFile, loadInteractionsFile, loadSbmlNetwork, makeObjectiveFromString, prepareSolver, setLoadObjective, setNetwork, setObjective
private org.gnu.glpk.glp_prob model
private org.gnu.glpk.glp_smcp parm
private org.gnu.glpk.glp_iocp mipParm
private java.util.Map<java.lang.String,java.lang.Integer> vars
public GLPKBind(boolean interactionInSolver)
public GLPKBind(java.util.List<Constraint> constraints, java.util.Map<parsebionet.biodata.BioEntity,Constraint> simpleConstraints, InteractionNetwork intNet, parsebionet.biodata.BioNetwork bioNet, boolean interactionInSolver)
public void init()
public void entitiesToSolverVars()
Bind
entitiesToSolverVars
in class Bind
protected void interactionsToSolverConstraints(java.util.List<Interaction> interactions)
interactionsToSolverConstraints
in class Bind
protected void makeSolverConstraint(Constraint constraint, java.util.List<java.lang.Object> toRemoveFromModel, java.util.Map<java.lang.String,double[]> oldBounds)
Bind
makeSolverConstraint
in class Bind
constraint
- Constraint to createtoRemoveFromModel
- is used to come back to how it was before.oldBounds
- is used to come back to how it was before.protected void deleteConstraints(java.util.List<java.lang.Object> constraints)
Bind
deleteConstraints
in class Bind
public void makeSolverObjective()
Bind
makeSolverObjective
in class Bind
public void changeObjVarValue(parsebionet.biodata.BioEntity e, double d)
Bind
changeObjVarValue
in class Bind
e
- The entityd
- The coefficientpublic void setObjSense(boolean maximize)
Bind
setObjSense
in class Bind
maximize
- if true : maximize, if false : minimizeprotected void clear()
Bind
public boolean isMIP()
protected DoubleResult go(boolean saveResults)
Bind
protected void changeVarBounds(java.lang.String entity, double[] bounds)
Bind
changeVarBounds
in class Bind
entity
- The entity to changebounds
- New bounds