Skip to content

Commit d682891

Browse files
Update 0mq/funbody_zmq.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 6847bc1 commit d682891

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

0mq/funbody_zmq.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@
4747
if 'U2' in concore.oport:
4848
concore.write(concore.oport['U2'], "u", u_data_values)
4949

50-
old_concore_simtime = concore.simtime
50+
# Take a numeric snapshot of the current simulation time to avoid
51+
# inadvertently sharing a reference with concore.simtime.
52+
old_concore_simtime = float(concore.simtime)
5153
while concore.unchanged() or concore.simtime <= old_concore_simtime:
5254
# Assuming concore.iport['Y2'] is a file port (e.g., from pmpymax.py)
5355
ym_data_values = concore.read(concore.iport['Y2'], "ym", init_simtime_ym_str)

0 commit comments

Comments
 (0)