How to use the pysces.core2.PyscesCore2.Parameter function in pysces

To help you get started, we’ve selected a few pysces examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github PySCeS / pysces / pysces / core2 / PyscesCore2.py View on Github external
def __init__(self, name, value):
        Parameter.__init__(self, name, value)
github PySCeS / pysces / pysces / core2 / PyscesCore2.py View on Github external
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)
github PySCeS / pysces / pysces / core2 / PyscesCore2.py View on Github external
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)
github PySCeS / pysces / pysces / core2 / PyscesCore2.py View on Github external
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):