File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -283,14 +283,18 @@ def _convert_experiment(self, experiment: Experiment) -> None:
283283 target = model .getElementBySId (target_id )
284284 default = self ._initial_value_from_element (target )
285285
286- # combine all changes into a single piecewise expression
286+ # Only create the initial assignment if there is
287+ # actually something to change.
287288 if expr_cond_pairs := [
288289 (target_value , sp .Symbol (exp_ind ) > 0.5 )
289290 for exp_ind , target_value in changes
290291 if target_value != default
291292 ]:
292- # only create the initial assignment if there is
293- # actually something to change
293+ # Unlike events, we can't have different initial
294+ # assignments for different experiments, so we need to
295+ # combine all changes into a single piecewise
296+ # expression.
297+
294298 expr = sp .Piecewise (
295299 * expr_cond_pairs ,
296300 (default , True ),
You can’t perform that action at this time.
0 commit comments