Cleaning up rs/

This commit is contained in:
Artur Meski
2019-02-23 13:06:42 +00:00
parent df19367659
commit 59cbc00e7f
9 changed files with 15 additions and 69 deletions

View File

@@ -97,7 +97,6 @@ class ReactionSystemWithConcentrationsParam(ReactionSystem):
def get_state_ids(self, state):
"""Returns entities of the given state without levels"""
# return [e for e,c in state]
return [self.get_entity_id(e) for e in state]
def has_non_zero_concentration(self, elem):
@@ -425,59 +424,4 @@ class ReactionSystemWithConcentrationsParam(ReactionSystem):
return rs
# class ReactionSystemWithAutomaton(object):
#
# def __init__(self, reaction_system, context_automaton):
# self.rs = reaction_system
# self.ca = context_automaton
#
# def show(self, soft=False):
# self.rs.show(soft)
# self.ca.show()
#
# def is_concentr_and_param_compatible(self):
# """
# Checks if the underlying RS/CA are compatible
# with parameters and concentrations
# """
# if not isinstance(self.rs, ReactionSystemWithConcentrationsParam):
# return False
# if not isinstance(self.ca, ContextAutomatonWithConcentrations):
# return False
# return True
#
# def is_with_concentrations(self):
# """
# Checks if the underlying RS and CA provide
# concentration levels
# """
# if not isinstance(self.rs, ReactionSystemWithConcentrations):
# return False
# if not isinstance(self.ca, ContextAutomatonWithConcentrations):
# return False
# return True
#
# def sanity_check(self):
# pass
#
# def get_ordinary_reaction_system_with_automaton(self):
#
# if not self.is_with_concentrations():
# raise RuntimeError("Not RS/CA with concentrations")
#
# ors = self.rs.get_reaction_system()
# oca = self.ca.get_automaton_with_flat_contexts(ors)
#
# return ReactionSystemWithAutomaton(ors, oca)
#
# class ReactionSystemWithConcentrationWithAutomaton(ReactionSystemWithAutomaton):
#
# def __init__(self, reaction_system, context_automaton):
# self.rs = reaction_system
# self.ca = context_automaton
#
# def show(self, soft=False):
# self.rs.show(soft)
# self.ca.show()
# EOF