phetsims / circuit-construction-kit-common

"Circuit Construction Kit: Basics" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
10 stars 10 forks source link

PhET-iO data stream voltages rapidly switch #815

Closed samreid closed 1 year ago

samreid commented 2 years ago

When running with the data stream, circuitConstructionKitDc.introScreen.model.circuit.vertexGroup.vertex_1.voltageProperty changed {"oldValue":0,"newValue":9} keeps flipping back and forth between 0 and 9.

Is this related to the sign errors we faced previously?

@kathy-phet said I can reach out to @jonathanolson as necessary for assistance on this issue.

samreid commented 2 years ago

@kathy-phet said it is not necessary to fix this for the upcoming dev version.

matthew-blackman commented 1 year ago

We discovered that there was a postprocessing step that was setting any vertex not in the liner algebra to zero, and it was then being set to 9 in the next step. @samreid and I were not able to determine why a vertex was not being set in the linear algebra step (we ran a test in the unit test harness and saw that a disconnected battery did have a solved voltage for both vertices), but we feel confident that the fix implemented solves this issue.