How to use the gillespy2.Model.__init__ function in gillespy2

To help you get started, we’ve selected a few gillespy2 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 StochSS / stochss / stochss / handlers / util / run_model.py View on Github external
rate_rules : list
            List of GillesPy2 rate rules to be added to the model.
        assignment_rules : list
            List of GillesPy2 assignment rules to be added to the model.
        function_definitions : list
            List of GillesPy2 function definitions to be added to the model.
        endSim : int
            Simulation duration of the model.
        timeStep : int
            Time unit until next sample.
        volume : int
            The volume of the system matters when converting to from population to
            concentration form. This will also set a parameter "vol" for use in
            custom (i.e. non-mass-action) propensity functions.
        '''
        Model.__init__(self, name=name, volume=volume)
        self.add_parameter(parameters)
        self.add_species(species)
        self.add_reaction(reactions)
        self.add_event(events)
        self.add_rate_rule(rate_rules)
        self.add_assignment_rule(assignment_rules)
        self.add_function_definition(function_definitions)
        numSteps = int(endSim / timeStep + 1)
        self.timespan(numpy.linspace(0,endSim,numSteps))