Video Of Day

Breaking News

Sfc Model Update

I convey been doing closed to writing (dealing amongst the silliness that is Helicopter Money), as well as working on my Stock-Flow Consistent (SFC) modelling tools for Python. The progress on that bundle has been quite good.

UPDATE (2016-10-21): Influenza A virus subtype H5N1 get-go version is built, as well as I convey an installer. See notes below.



I convey managed to produce a solver for the simplest SFC model ("model SIM") again. The useful affair is that the model is forthwith lay together past times high-level functions, as well as at that spot is essentially no manual intervention into the equations. Unfortunately, I messed upwards my household sector accounting definitions, as well as had to piece them.

In add-on to needing to laid upwards my accounting, I volition remove to brand closed to functions to a greater extent than full general (sector definitions were made every bit unproblematic every bit possible). I volition hand a sum update when the bundle is laid upwards for prime number time.

However, 1 interesting affair I institute is that I needed to unlearn closed to ideas that I picked upwards from economics.

I wanted to write:

  1. SUPPLY = f(x),
  2. DEMAND = g(x),
  3. SUPPLY = DEMAND.
That does non piece of work inwards an algorithm, every bit nosotros are attempting to define the variable SUPPLY twice. (It industrial plant mathematically.) The temptation is to solve for SUPPLY as well as DEMAND separately, as well as hence somehow notice a agency to lay the 2 values into "equilibrium" (equation #3). Instead, I had to intend similar a post-Keynesian, as well as interruption the stance of "equilibrium."

I convey a methodology that works, only it remains to live seen whether it survives to a greater extent than complicated economical systems. If it does work, I volition eventually write upwards an explanation.

[Update 2016-10-21] The module is forthwith capable of generating the equations for the simplest classes of models. I convey cleaned upwards the accounting issues, as well as the code is clean. I convey built an install package, as well as the code industrial plant on Python 2.7 (and perchance before versions), every bit good every bit version 3.

The installation physical care for consists of:

  1. Install Python. 
  2. On the ascendence employment ("cmd" inwards Windows), run: pip install sfc_models
(It is probable that you lot mightiness remove to provide the sum path to the pip executable, which is institute inwards the "Scripts" directory below your installation of Python.) If you lot are having difficulties, at that spot are tons of spider web pages explaining how to install packages via "pip".

If the installation worked, if you lot run Python, the commands volition work:

import sfc_models
help(sfc_models)

(The "help" ascendence solely industrial plant after you lot import the module.)

I volition live posting examples of how to usage it later.

(c) Brian Romanchuk 2016

No comments