Skip to content

Commit a38eeb8

Browse files
authored
SMM Update internal waiting time at the end of advance (#1397)
1 parent 08a6cf0 commit a38eeb8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cpp/models/smm/simulation.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ class Simulation
127127
if (last_result_time < tmax) {
128128
m_result.add_time_point(tmax);
129129
m_result.get_last_value() = m_result[m_result.get_num_time_points() - 2];
130+
// update internal times
131+
for (size_t i = 0; i < m_internal_time.size(); i++) {
132+
m_internal_time[i] += m_current_rates[i] * (tmax - current_time);
133+
}
130134
}
131135
return m_result.get_last_value();
132136
}

0 commit comments

Comments
 (0)