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

[KISEMA-1609] Commutative Operators in Dataflow should have free port constraints #34

Open
fabianheyer opened this issue Apr 19, 2022 · 2 comments
Labels
enhancement New feature or request jira Legacy issues migrated from old KISEMA Jira

Comments

@fabianheyer
Copy link

fabianheyer commented Apr 19, 2022

[Issue KISEMA-1609 migrated from JIRA, first reported on 2021-03-23]

In SCCharts dataflow, all simple arithmetic actors such as +, *, &, etc. which are commutative should have free port constraints to allow the layout to avoid some edge crossings. See the SCChart below and the attached image for an example where this could yield a diagram with at least two less edge crossings.

@ClocksUseSD
scchart RollingBall {
  output float accel // output acceleration change
  
  input float targetV = 10 // target velocity input
  input float currentV = 0 // current velocity input
  input float Kp, Ki, Kd // PID calibration variables input
  input float dT = 0 // delta Time input
  float prevError = 0 // error in the previous tick
  
  float error = 0// divergence from the target velocity
  float P, I, D // internal variables for PID calculation
  clock t = 0 // clock for real time calculation

  dataflow:
  prevError = error
  error = targetV - currentV
  P = Kp * error
  I += error * t
  D = (currentV - prevError)/t
  accel = P + Ki * I + Kd* D
}

Edit 2022-04-20: included attatched image
RollingBall-no-free-port-constraints

@fabianheyer fabianheyer added the enhancement New feature or request label Apr 19, 2022
@Skgland
Copy link
Contributor

Skgland commented Apr 19, 2022

@fabianheyer is it intentional that the attached image has not been migrated?

@fabianheyer
Copy link
Author

@Skgland It's included now, thanks for the heads-up.

@fabianheyer fabianheyer added the jira Legacy issues migrated from old KISEMA Jira label May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request jira Legacy issues migrated from old KISEMA Jira
Projects
None yet
Development

No branches or pull requests

2 participants