Skip to content

Commit

Permalink
Improved import/export calls in dpsim-villas-cosim.py
Browse files Browse the repository at this point in the history
Signed-off-by: pipeacosta <[email protected]>
  • Loading branch information
pipeacosta committed Oct 17, 2023
1 parent f5fbefd commit 21c1cf0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/villas/dpsim-villas-cosim.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def dpsim0():

evs.set_intf_current([[complex(5, 0)]])

intf.import_attribute(evs.attr('V_ref'), 0, True, True)
intf.export_attribute(evs.attr('i_intf').derive_coeff(0,0), 0, False)
intf.import_attribute(evs.attr('V_ref'), 0, block_on_read=True, sync_on_start=True)
intf.export_attribute(evs.attr('i_intf').derive_coeff(0,0), 0, wait_for_on_write=False)

sim.run()

Expand Down Expand Up @@ -152,8 +152,8 @@ def dpsim1():

sim.add_interface(intf)
sim.add_logger(logger)
intf.import_attribute(ecs.attr('I_ref'), 0, True, True)
intf.export_attribute(ecs.attr('v_intf').derive_coeff(0,0).derive_scaled(complex(-1,0)), 0, False)
intf.import_attribute(ecs.attr('I_ref'), 0, block_on_read=True, sync_on_start=True)
intf.export_attribute(ecs.attr('v_intf').derive_coeff(0,0).derive_scaled(complex(-1,0)), 0, wait_for_on_write=False)

sim.run()

Expand Down

0 comments on commit 21c1cf0

Please sign in to comment.