Instead of remove changing circuit while simulating, i think you may add function like some of components or ic... has explode and see how the circuits remain work to find out problem in fixing electrical device.
It's a litte bit more complex that that:
First, when the application crashes there is nothing to do, it will stop and that's all.
It is not that a component is malfunctioning, it is that the application did something wrong: accessing to fordiden memory location, calling an object that does not exists or whatever.
But in adition to that, the simulation was not working correctly in some cases:
When you do a change in the circuit, the "electrical topology" changes, some electrical nodes might dissapear or join toguether or whatever.
Then the representation of the circuit must be rebuilt.
In version 0.4.15 this was done by restarting the simulation.
This works ok in some cases but some parameters should stay in some other cases.
For example previous node voltages or Internal states of some components should remain unchanged.
But restarting the simulation resets everything and rebuilds a new representation of the circuit.
So: doing changes while simulating is possible but it requires an aditional procedure:
- The simulation must be stopped, but it needs to stop in an stable state, which can be tricky if there are non linear components.
- Then a new representation of the circuit must be built but keeping some data from the previous one, which is much more complex than just build a new one.
- Then the simulation must resume without glitches.
- Also a new type of "reset" must be implemented for each component that preserves some data and refresh some other data.
Imagine there is a football match and you need to stop the game and move everything to a new football field, including all the players, the ball in it's current position and everything.
And then restart the game in the same exact spot where it was stopped like nothing happened...
This is complex, it takes lots of work and it is a source of bugs and problems.
This is the kind of "rabbit hole" that you know when you get in, but you don't know when you will get out of it.