{"action":"created","issue":{"url":"https://api.github.com/repos/JohnAbel/gillespy/issues/9","labels_url":"https://api.github.com/repos/JohnAbel/gillespy/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/JohnAbel/gillespy/issues/9/comments","events_url":"https://api.github.com/repos/JohnAbel/gillespy/issues/9/events","html_url":"https://github.com/JohnAbel/gillespy/issues/9","id":65998575,"number":9,"title":"Non first-order mass action does not simulate correctly","user":{"login":"JohnAbel","id":2702272,"avatar_url":"https://avatars.githubusercontent.com/u/2702272?v=3","gravatar_id":"","url":"https://api.github.com/users/JohnAbel","html_url":"https://github.com/JohnAbel","followers_url":"https://api.github.com/users/JohnAbel/followers","following_url":"https://api.github.com/users/JohnAbel/following{/other_user}","gists_url":"https://api.github.com/users/JohnAbel/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnAbel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnAbel/subscriptions","organizations_url":"https://api.github.com/users/JohnAbel/orgs","repos_url":"https://api.github.com/users/JohnAbel/repos","events_url":"https://api.github.com/users/JohnAbel/events{/privacy}","received_events_url":"https://api.github.com/users/JohnAbel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-02T19:48:48Z","updated_at":"2015-06-18T16:29:02Z","closed_at":null,"body":"Example:\r\n\r\n```\r\nimport numpy as np\r\nimport casadi as cs\r\nimport gillespy as gsp\r\nimport matplotlib.pyplot as plt\r\n\r\nclass simple_gillespy_model(gsp.Model):\r\n\r\n    def __init__(self, volume=100.0):\r\n\r\n        #Initialize the model\r\n        gsp.Model.__init__(self,name='simple',volume=volume)\r\n\r\n        # Parameters\r\n        K0 = gsp.Parameter(name='K0',expression=1)\r\n\r\n        self.add_parameter([K0])\r\n\r\n        # Species\r\n        x1 = gsp.Species(name='x1',initial_value = 100)\r\n        x2 = gsp.Species(name='x2',initial_value = 100)\r\n\r\n        self.add_species([x1,x2])\r\n\r\n        # Reactions\r\n        r1 = gsp.Reaction(name='formation of x1',\r\n                          reactants = {},\r\n                          products={x1:1},\r\n                          propensity_function='K0*vol')\r\n\r\n        r2 = gsp.Reaction(name='formation of x2', products={x2:1}, rate=K0)\r\n\r\n        self.add_reaction([r1,r2])\r\n\r\nif __name__ == '__main__':\r\n\r\n    model = simple_gillespy_model()\r\n    print model.listOfReactions['formation of x1'].propensity_function\r\n    print model.listOfReactions['formation of x2'].propensity_function\r\n    traj = gsp.StochKitSolver.run(model,\r\n                                          t=1000,\r\n                                          increment=0.1,\r\n                                          number_of_trajectories=1)[0]\r\n\r\n    plt.plot(traj)\r\n\r\n```\r\n Although the propensity functions here are the same, somehow the trajectories are different. The issue is that despite saying the propensity function for r2 was edited to include volume, it wasn't really edited to include volume.\r\n"},"comment":{"url":"https://api.github.com/repos/JohnAbel/gillespy/issues/comments/113209534","html_url":"https://github.com/JohnAbel/gillespy/issues/9#issuecomment-113209534","issue_url":"https://api.github.com/repos/JohnAbel/gillespy/issues/9","id":113209534,"user":{"login":"JohnAbel","id":2702272,"avatar_url":"https://avatars.githubusercontent.com/u/2702272?v=3","gravatar_id":"","url":"https://api.github.com/users/JohnAbel","html_url":"https://github.com/JohnAbel","followers_url":"https://api.github.com/users/JohnAbel/followers","following_url":"https://api.github.com/users/JohnAbel/following{/other_user}","gists_url":"https://api.github.com/users/JohnAbel/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnAbel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnAbel/subscriptions","organizations_url":"https://api.github.com/users/JohnAbel/orgs","repos_url":"https://api.github.com/users/JohnAbel/repos","events_url":"https://api.github.com/users/JohnAbel/events{/privacy}","received_events_url":"https://api.github.com/users/JohnAbel/received_events","type":"User","site_admin":false},"created_at":"2015-06-18T16:29:02Z","updated_at":"2015-06-18T16:29:02Z","body":"StochKit is only fed a model-- in the code there is a way to manually tweak\nvolumes (originally in StochSS), but at this point, it doesn't correctly\nwork. I haven't checked if this also fails in StochSS or not.\n\nOn Thu, Jun 18, 2015 at 1:23 AM, Andreas Hellander <notifications@github.com\n> wrote:\n\n> I don't get it. What is not working? Is StochKit even supporting different\n> volumes? Is not the code above from the pyurdme.Model?\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/JohnAbel/gillespy/issues/9#issuecomment-113073691>.\n>\n\n\n\n-- \n\n*John H. Abel*\nPhD Candidate, Chemical Engineering\nUniversity of California, Santa Barbara\nEmail: jha@engr.ucsb.edu\nTel: (401)787-4253\n"}}