Skip to content

Commit

Permalink
Update ModelObject
Browse files Browse the repository at this point in the history
  • Loading branch information
himoto committed Jun 29, 2022
1 parent 02e1031 commit 31f53a8
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions biomass/exec_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,36 +34,6 @@ class ModelObject(NetworkGraph):

def __init__(self, path: str, biomass_model: ModuleType):
super().__init__(path, biomass_model)
self._path = path
self._parameters = biomass_model.C.NAMES
self._species = biomass_model.V.NAMES
self.pval = biomass_model.param_values
self.ival = biomass_model.initial_values
self.problem = biomass_model.OptimizationProblem()
self.viz = biomass_model.Visualization()
self.rxn = biomass_model.ReactionNetwork()

@property
def path(self) -> str:
return self._path

@property
def parameters(self) -> List[str]:
return self._parameters

@property
def species(self) -> list:
return self._species

@property
def observables(self) -> List[str]:
duplicate = [
name for name in set(self.problem.obs_names) if self.problem.obs_names.count(name) > 1
]
if not duplicate:
return self.problem.obs_names
else:
raise NameError(f"Duplicate observables: {', '.join(duplicate)}")

def get_individual(self, paramset: int) -> np.ndarray:
"""
Expand Down

0 comments on commit 31f53a8

Please sign in to comment.