differentation forced to 0 if wired up
System dynamics program with additional features for economics
Brought to you by:
hpcoder,
profstevekeen
Diff:
screen shot
The red circle is a bug - there is no actual error being reported. I have fixed the code to clear the error condition causing that. But that is not the cause of your problem.
The reason why \Delta CG is 0 is that CG is zero for all time, and if you follow back the chain of definitions, you will see that one of the factors making up CG is \Delta CG, so it is defined in terms of itself. If the derivative is zero, then CG is a constant, and its derivative will be zero.
I found the "Find definition" feature useful for tracing back the logic. I advanced the model several steps, and then looked at why certain variables were zero.