Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrected stimulus preparation and update for cosimulator.py #672

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dionperd
Copy link
Collaborator

@dionperd dionperd commented May 3, 2023

I moved the _prepare_stimulus() method call to the configuration of the CoSimulator, because during co-simulation the simulation_length is modified and equalized with the synchronization_time, leading to an erroneous reconfiguration of the stimulus in time.

I added an _current_stimulus property to the CoSimulator, in order to keep the stimulus between calles to call() method.

I also overwrote the _loop_update_stimulus method to use

stim_step=step-1

instead of stim_step=step-(current_step+1)

because current_step is updated evey synchronization time at each call().

@dionperd dionperd changed the title Corrected stimulus preparation for cosimulator.py Corrected stimulus preparation and update for cosimulator.py May 3, 2023
Copy link
Member

@liadomide liadomide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think PR #673 should be merged before this one, rebase against master, and then contrib unit-tests should be passing

@maedoc
Copy link
Member

maedoc commented May 30, 2024

hi @dionperd, I'm a bit late for this one. still relevant for merging? will you rebase as Lia suggested?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants