TerraME / terrame

TerraME is a programming environment for spatial dynamical modelling
www.terrame.org
GNU Lesser General Public License v3.0
36 stars 13 forks source link

bug in simple model - looks like overflow #2306

Open pedro-andrade-inpe opened 5 years ago

pedro-andrade-inpe commented 5 years ago

The following code does not show any drawing in the chart, but also does not show any error. Check its execution and show a proper warning (or error).


Climate = Model{
    coemission = 0.5,--GtC em 1900
    rate = 0.8,--GtC ( co2 emission (1.6) - Net Removal (0.8)
    finalTime = 2100,
    init = function(model)
        model.chart = Chart{
            target = model,
            select = "coemission",
        }

        model.timer = Timer{
            Event{start = 1900,action = model.chart},
            Event{action = function()
                model.coemission = model.coemission + model.rate

                model.rate = model.rate* 1.5
            end}
        }
    end
}

climate = Climate{}
climate: run()