Code Monkey home page Code Monkey logo

sysdyn's Issues

cobweb plot

Implement cobweb plot as part of SysDynModel:graphics.

improve graphics

Allow graphics to be an optional argument, plotting all the numeric attributes of the model (but finalTime). Make possible to remove some of the {} as well.

Lorenz model

Implement Lorenz model with tests and documentation:

import ("sysdyn")

Lorenz = SysDynModel{
    x  = 1.0, y = 1.0, z = 1.0,
    ro   = 28.0, gamma = 10.0, beta = 2.6666667,
    yplot = 0.0,
    delta = 0.01,
    deltaTime = 1,
    finalTime = 10000,
    changes = function(model, time)
        local nx = model.x + model.delta*model.gamma*(model.y - model.x)
        local ny = model.y + model.delta*(model.ro*model.x - model.y - model.x*model.z)
        local nz = model.z + model.delta*(model.x*model.y - model.beta*model.z)

        model.x = nx
        model.y = ny
        model.z = nz

        if (time % 100) then model.yplot = model.y end
    end,
    graphics = {
        timeseries = {{"yplot"}},
        phasespace = {{"x","z"}, {"x","y"}}
    }
}

Lorenz:execute()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.