Exemplo n.º 1
0
            func=lambda h, r: h * r,
            argmap=[
                "Lynx",
                .25
                ]
            ),
        Flow(
            name="LynxDeaths",
            qunit="Lynx",
            tunit="Month",
            func=lynx_starvation,
            argmap=[
                AREA,
                "Hares",
                "Lynx"
                ]
            )
        ],
    # log=True
    log=False
    )

plotter = plot.Plotter(100)
width = 10000
symbols = ["h", "b", "d", "L", "B", "D"]
state = s.state(show_ids=True)
print state
plotter.plot_dumbly(s.state(), -width, width, symbols=symbols)
for i in s.run(20):                      # now run it for some number of steps
    plotter.plot_dumbly(i, -width, width, symbols=symbols)