Menu

#521 Derivative operator causes error message (maximum recursion)

Cantillon
wont-fix
nobody
None
4normal
2016-05-09
2015-11-01
No

The attached file produces an error message upon reset after adding the derivative operator. I tried the same simulation using Scilab and it ran as expected.

1 Attachments

Related

Bugs: #521

Discussion

  • High Performance Coder

    Hi Peter, could you explain exactly what you're trying to do? In the example you gave here, Inv is the derivative of a product, so given by the product rule

    Inv = Profits * dPF/dt + PF * d Profits/dt

    but Profits is the result of an integral, so
    d Profits/dt = Cp + Inv.

    What you have is a circular definition - so no wonder you get a maximum recursion error.

    The question is are you defining the same thing in scilab, and if so why is scilab giving an answer?

     
    • Peter FitzSimmons

      HI Russell,
      I'm trying to implement Kalecki's definitions of Profit and
      Investment. You're right it is circular or recursive, which is to say
      there are positive feedback paths. This is fundamental to macro-economic
      models as S.K demonstrates. I'm a retired E.E., not an economist.
      Reading economic papers confuses me, I don't always know when they are
      talking about rates or flows vs stocks. In short, I do need to revise
      my simulation.
      The equivalent Scilab model gives a solution although I had to use the
      implicit solver for the derivative block to avoid an "algebraic loop".
      In Minsky I checked the "implicit solver" option but it still gave the "
      max recursion" error. The scilab solver may add delay.
      Scilab has a flat delay block which I can insert in the feedback path to
      add delay between a profit change and a subsequent Investment change.
      With the delay block you can even stabilize an "algebraic loop".
      In summary I can get a solution with Scilab but I'm not confident I have
      the right model. I'm going to rework Minsky then see if I can get the
      same solution with Scilab.
      Peter F
      On 11/1/2015 1:27 AM, High Performance Coder wrote:

      Hi Peter, could you explain exactly what you're trying to do? In the
      example you gave here, Inv is the derivative of a product, so given by
      the product rule

      Inv = Profits * dPF/dt + PF * d Profits/dt

      but Profits is the result of an integral, so
      d Profits/dt = Cp + Inv.

      What you have is a circular definition - so no wonder you get a
      maximum recursion error.

      The question is are you defining the same thing in scilab, and if so
      why is scilab giving an answer?


      [tickets:#521] http://sourceforge.net/p/minsky/tickets/521/
      Derivative operator causes error message (maximum recursion)

      Status: open
      Milestone: Cantillon
      Created: Sun Nov 01, 2015 02:03 AM UTC by Peter FitzSimmons
      Last Updated: Sun Nov 01, 2015 02:03 AM UTC
      Owner: nobody
      Attachments:

      The attached file produces an error message upon reset after adding
      the derivative operator. I tried the same simulation using Scilab and
      it ran as expected.


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/minsky/tickets/521/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #521

  • High Performance Coder

    On https://en.wikipedia.org/wiki/Micha%C5%82_Kalecki#The_profit_equation, profits are given as P=Cp+I, not the derivative of the LHS. Could this be your resolution?

    As for implicit solver, that requires a Jacobian to be defined, which has even more restrictions on the types of system solvable. Perhaps SciLab has a completely different algorithm, but if so, that would have to be in the nature of future request. ATM, I am limited to the algorithms available in GNU SL.

     
  • High Performance Coder

    • priority: 5 --> 4normal
     
  • High Performance Coder

    • status: open --> wont-fix
     

Anonymous
Anonymous

Add attachments
Cancel