Skip to content

Commit

Permalink
fixing order of subtasks results
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrkarr committed Feb 13, 2021
1 parent 36388fb commit 8f55fb2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion biosimulators_utils/sedml/exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ def exec_task(task, variables, log=None):
sub_tasks = sorted(task.sub_tasks, key=lambda sub_task: sub_task.order)

# execute the sub-tasks and record their results
for i_sub_task, sub_task in enumerate(sub_tasks):
for sub_task in sub_tasks:
if isinstance(sub_task.task, Task):
if apply_xml_model_changes:
model = sub_task.task.model
Expand Down Expand Up @@ -507,6 +507,7 @@ def exec_task(task, variables, log=None):
raise NotImplementedError('Tasks of type {} are not supported.'.format(sub_task.task.__class__.__name__))

for var in task_vars:
i_sub_task = task.sub_tasks.index(sub_task)
variable_results[var.id][i_main_range][i_sub_task] = sub_task_var_results.get(var.id, None)

# shape results to consistent size
Expand Down

0 comments on commit 8f55fb2

Please sign in to comment.