Skip to content

Commit

Permalink
Fixed timestepSize key error in notebook gen. Fixed event delay as st…
Browse files Browse the repository at this point in the history
…r erro in notebook gen.
  • Loading branch information
BryanRumsey committed Jun 24, 2021
1 parent b817cab commit 47ba65c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stochss/handlers/util/stochss_notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def __create_event_strings(self, model, pad):
pad=pad)
a_names = self.__create_event_assignment_strings(assignments=assignments,
event=event, pad=pad)
delay = f"{event['delay']}" if event['delay'] else None
delay = f'"{event["delay"]}"' if event['delay'] else None
ev_str = f'{pad}self.add_event(Event(name="{event["name"]}", '
ev_str += f'trigger={t_name}, assignments=[{a_names}], '
ev_str += f'delay={delay}, priority="{event["priority"]}", '
Expand Down Expand Up @@ -770,9 +770,9 @@ def __create_stoich_spec_string(self, stoich_species):
def __create_tspan_string(self, model, pad):
end = self.s_model['modelSettings']['endSim']
output_freq = self.s_model['modelSettings']['timeStep']
step_size = self.s_model['modelSettings']['timestepSize']
tspan = ["", f"{pad}# Timespan"]
if self.s_model['is_spatial']:
step_size = self.s_model['modelSettings']['timestepSize']
ts_str = f'{pad}self.timespan(np.arange(0, {end + step_size}, {output_freq})'
ts_str += f", timestep_size={step_size})"
else:
Expand Down

0 comments on commit 47ba65c

Please sign in to comment.