Cleaning up rs/
This commit is contained in:
@@ -10,3 +10,5 @@ from rs.extended_context_automaton import ExtendedContextAutomaton
|
||||
from rs.network_of_context_automata import NetworkOfContextAutomata
|
||||
from rs.reaction_system_with_automaton import ReactionSystemWithAutomaton
|
||||
from rs.reaction_system_with_autnet import ReactionSystemWithNetworkOfAutomata
|
||||
|
||||
# EOF
|
||||
|
||||
@@ -162,3 +162,4 @@ class ContextAutomaton(object):
|
||||
self.show_transitions()
|
||||
self.show_prod_entities()
|
||||
|
||||
# EOF
|
||||
|
||||
@@ -67,3 +67,4 @@ class ContextAutomatonWithConcentrations(ContextAutomaton):
|
||||
self.show_states()
|
||||
self.show_transitions()
|
||||
|
||||
# EOF
|
||||
|
||||
@@ -164,4 +164,5 @@ class ExtendedContextAutomaton(ContextAutomaton):
|
||||
def show(self):
|
||||
super(ExtendedContextAutomaton, self).show()
|
||||
self.show_actions()
|
||||
|
||||
|
||||
# EOF
|
||||
|
||||
@@ -101,4 +101,5 @@ class NetworkOfContextAutomata(object):
|
||||
print()
|
||||
self.show_prod_entities()
|
||||
self.show_actions()
|
||||
|
||||
|
||||
# EOF
|
||||
|
||||
@@ -192,3 +192,5 @@ class ReactionSystem(object):
|
||||
if self.background_set == []:
|
||||
print("Empty background set")
|
||||
exit(1)
|
||||
|
||||
# EOF
|
||||
|
||||
@@ -8,4 +8,5 @@ class ReactionSystemWithNetworkOfAutomata(object):
|
||||
def show(self, soft=False):
|
||||
self.rs.show(soft)
|
||||
self.cas.show()
|
||||
|
||||
|
||||
# EOF
|
||||
@@ -402,12 +402,5 @@ class ReactionSystemWithAutomaton(object):
|
||||
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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user