How to use the gillespy2.FunctionDefinition 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
def build_function_definitions(self, args):
        '''
        Build a GillesPy2 function definition.

        Attributes
        ----------
        args : dict
            A json representation of a function definition.
        '''
        name = args['name']
        variables = args['variables'].split(', ')
        expression = args['expression']

        return FunctionDefinition(name=name, args=variables, function=expression)