Git Product home page Git Product logo

Comments (7)

JanHasenauer avatar JanHasenauer commented on June 14, 2024

If the simulation starts at initial time t = -1 and the event fires at t = 0, does everything work properly?

from amici.

JanHasenauer avatar JanHasenauer commented on June 14, 2024

Okay, I just checked and even of the initial time is negative the simulation results are different (= incorrect).

from amici.

FFroehlich avatar FFroehlich commented on June 14, 2024

t0 is passed at simulation time which makes this problem a bit hard to tackle but the check is currently performed at compile time. At the moment it should not be possible to define an event which fires at t=0.

from amici.

JanHasenauer avatar JanHasenauer commented on June 14, 2024

the model with heaviside(t) compiled without error (Version from 5 days ago). Only the simulation was completely off compared to heaviside(t-1e-8).

from amici.

FFroehlich avatar FFroehlich commented on June 14, 2024

I cannot reproduce :( that problem. For me any model with heaviside(t) fails in makeEvents and produces the following error:

The trigger of event 1 fires at initial timepoint t0 = 0, which is currently not supported.

which version of MATLAB are you using? maybe this is a problem with the symbolic toolbox.

from amici.

JanHasenauer avatar JanHasenauer commented on June 14, 2024

My fault. I compiled wit heaviside(t-k) and set later the input k = 0. This compiles (as no k is specified) but provides later an incorrect solution.

from amici.

FFroehlich avatar FFroehlich commented on June 14, 2024

okay I implemented the check at run-time, which means the model can now always be compiled and simulation will always be stoppend when started in a root. This could be extended in the future to automatically check in which the crossing is, but I really do not see a good reason to start a simulation in an event. (Also this can always be fixed by the user by specifying an earlier t0).

from amici.

Related Issues (20)

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.