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

Integrator variable #100

Open
stephanemagnenat opened this issue Jul 4, 2017 · 0 comments
Open

Integrator variable #100

stephanemagnenat opened this issue Jul 4, 2017 · 0 comments

Comments

@stephanemagnenat
Copy link
Member

stephanemagnenat commented Jul 4, 2017

It might be interesting, as an alternative to, or in complement in, the FSM mode (see #51) and the enumeration variables (see #90), to support an integrator.

An integrator would be an integer variable, whose initial value and speed of change would be set in an action block, and whose value crossing a threshold could be tested in an event block. In that sense, it would be somewhat similar to the timer in VPL1, but would be more flexible. Properly implemented, it could allow interesting activities especially at the level of bio-inspired algorithms, for instance synchronised blinking like fireflies or Grey Walter's tortoises.

Here is a proposed detailed set of operations:

  • Event: Crossing threshold, user-given threshold.
  • Action: Setting the value and the speed of change, possibly relative.

I envision the value to wrap around, simply mapping it to an int16.

Here is an example of design:
vpl2-integrator

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

No branches or pull requests

1 participant