Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, name, value):
Parameter.__init__(self, name, value)
def addParameter(self, name):
if name not in self.__piecewises__:
if name in self.__InitDict__:
par = Parameter(name, self.__InitDict__[name])
else:
par = Parameter(name, 0.0)
if name not in self.__not_inited__: self.__not_inited__.append(name)
self.global_parameters.append(par)
self.__setattr__(name, par)
def addParameter(self, name):
if name not in self.__piecewises__:
if name in self.__InitDict__:
par = Parameter(name, self.__InitDict__[name])
else:
par = Parameter(name, 0.0)
if name not in self.__not_inited__: self.__not_inited__.append(name)
self.global_parameters.append(par)
self.__setattr__(name, par)
association = None
def __init__(self, name, value):
self.name = name
self.value = value
self.value_initial = value
self.association = []
def setAssociation(self, reac):
self.association.append(reac)
self.__setattr__(reac.name, reac)
def isParameterOf(self):
return MapList([a.name for a in self.association])
class AssignmentRule(Parameter):
formula = None
code_string = None
_names = None
_functions = None
type = 'assignment'
_TIME_ = None
fixed = False # added so that assignment rules can modify fixed species
def __init__(self, name, value):
Parameter.__init__(self, name, value)
def __call__(self):
exec(self.xcode)
return self.value
def addFormula(self, formula):