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

Bug fixes for multi-event models #683

Merged
merged 1 commit into from
Jan 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -604,12 +604,6 @@ namespace Gillespy
m_trigger_pool.erase(event.get_event_id());
}

// Step 5: Update any trigger states to reflect the new trigger value.
for (auto &event : m_events)
{
m_trigger_state.find(event.get_event_id())->second = event.trigger(t, event_state);
}

return has_active_events();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ namespace Gillespy
}

inline bool is_persistent() const { return m_use_persist; }
inline bool get_event_id() const { return m_event_id; }
inline int get_event_id() const { return m_event_id; }

EventExecution get_execution(double t,
const double *state, int num_state) const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ IntegrationResults Integrator::integrate(double *t)
IntegrationResults Integrator::integrate(double *t, std::set<int> &event_roots, std::set<unsigned int> &reaction_roots)
{
IntegrationResults results = integrate(t);
if (status != IntegrationStatus::OK) {
return results;
}

unsigned long long num_triggers = data.active_triggers.size();
unsigned long long num_rxn_roots = data.active_reaction_ids.size();
unsigned long long root_size = data.active_triggers.size() + data.active_reaction_ids.size();
Expand Down