Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add correct C++ solver names for validation errors #699

Merged
merged 1 commit into from
Feb 10, 2022

Conversation

jtcooper10
Copy link
Collaborator

The C++ solvers use the wrong solver name when raising a SimulationError due to unsupported SBML features. To fix, the hard-coded name "SSACSolver" is substituted with the name property of the target solver.

Replicate by creating a model using one or more unsupported SBML objects:

import gillespy2

class TestModel(gillespy2.Model):
    def __init__(self):
        super().__init__(name="TestModel")
        self.add_species(gillespy2.Species(name="S", initial_value=0))
        self.add_assignment_rule(gillespy2.AssignmentRule(variable="S", formula="t"))
        self.add_function_definition(gillespy2.FunctionDefinition(name="f", function="x", args=["x"]))

# Raises an error, should now have the correct target name in error message
gillespy2.TauHybridCSolver(model=TestModel()).run()

Closes #698

@briandrawert briandrawert added this to the 1.6.8 milestone Feb 7, 2022
@briandrawert briandrawert merged commit 3db5fe0 into develop Feb 10, 2022
@seanebum seanebum deleted the fix/cpp-solver-incorrect-error-targets branch February 10, 2022 20:20
@seanebum seanebum mentioned this pull request Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants