Code Monkey home page Code Monkey logo

hetasimulator.jl's People

Contributors

ivborissov avatar mlubin avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

stjordanis mlubin

hetasimulator.jl's Issues

Merge parameters in strict mode

Current setup allows adding new parameters at Scenario level with @warn warning the user, that the parameter is missing in the model.
Is that the intended behavior ? Potentially it may cause misprints.

An idea is to set strict=true kwarg and change the default behavior to throwing an error in case the provided parameter is missing in the model. If the user is sure about this new parameter he can change strict=false.

Register new version

The issue branch is dedicated to new versions registration. The workflow is as follows:

1. Set the version field in Project.json to your new desired version.
2. type `@JuliaRegistrator register()` in this branch or in the commit/branch, or using JuliaHub GUI.
3. Wait for TagBot to make release.
4. Done.

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

StackOverflow when simulating large-scale models

StackOverflow warning is printed while running sim on large-scale model, with FBDF() solver (and other sovers except Sundials.CVODE_BDF()). However StackOverflow does't terminate the simulation.
The environment is:

julia> versioninfo()
Julia Version 1.9.2
Commit e4ee485e90 (2023-07-05 09:39 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 4 ร— Intel(R) Core(TM) i3-6100U CPU @ 2.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, skylake)
  Threads: 4 on 4 virtual cores

Stacktrace is :

Internal error: stack overflow in type inference of 

  kwcall(
    NamedTuple{
      (:alg, :reltol, :abstol), 
      Tuple{OrdinaryDiffEq.FBDF{5, 0, true, Nothing, OrdinaryDiffEq.NLNewton{Base.Rational{Int64}, Base.Rational{Int64}, Base.Rational{Int64}, Base.Rational{Int64}}, typeof(OrdinaryDiffEq.DEFAULT_PRECS), Base.Val{:forward}, true, nothing, Nothing, Nothing}, Float64, Float64}
    }, 
    typeof(HetaSimulator.sim), 
    HetaSimulator.Scenario{
      Main.var"#nameless_init_func_#10", 
      SciMLBase.ODEProblem{
        Array{Float64, 1}, Tuple{Float64, Float64}, true, Array{Float64, 1}, 
        SciMLBase.ODEFunction{true, SciMLBase.FullSpecialize, Main.var"#nameless_ode_func_#11", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, 
        Base.Pairs{
          Symbol, 
          SciMLBase.CallbackSet{
            Tuple{}, 
            Tuple{
              SciMLBase.DiscreteCallback{HetaSimulator.var"#92#93", HetaSimulator.SavingEvent{Main.var"#saving_#14"{Array{Union{Nothing, Int64}, 1}}, HetaSimulator.SavedValues{Array{LabelledArrays.LArray{Float64, 1, Array{Float64, 1}, (:v1, :v2)}, 1}, Array{Float64, 1}, Array{Symbol, 1}}, DataStructures.BinaryHeap{Float64, Base.Order.ForwardOrdering}, Array{Float64, 1}}, typeof(HetaSimulator.saving_initialize), typeof(SciMLBase.FINALIZE_DEFAULT)}, 
              SciMLBase.DiscreteCallback{HetaSimulator.var"#37#42"{Array{Float64, 1}}, HetaSimulator.var"#38#43"{HetaSimulator.TimeEvent{Main.var"#nameless_tstops_func_#15", Main.var"#nameless_affect_func_#27"}, Tuple{Bool, Bool}, Symbol}, HetaSimulator.var"#init_time_event#39"{HetaSimulator.TimeEvent{Main.var"#nameless_tstops_func_#15", Main.var"#nameless_affect_func_#27"}, Array{Float64, 1}}, typeof(SciMLBase.FINALIZE_DEFAULT)}, 
              SciMLBase.DiscreteCallback{HetaSimulator.var"#37#42"{Array{Float64, 1}}, HetaSimulator.var"#38#43"{HetaSimulator.TimeEvent{Main.var"#nameless_tstops_func_#18", Main.var"#nameless_affect_func_#30"}, Tuple{Bool, Bool}, Symbol}, HetaSimulator.var"#init_time_event#39"{HetaSimulator.TimeEvent{Main.var"#nameless_tstops_func_#18", Main.var"#nameless_affect_func_#30"}, Array{Float64, 1}}, typeof(SciMLBase.FINALIZE_DEFAULT)}, 
              SciMLBase.DiscreteCallback{HetaSimulator.var"#37#42"{Array{Float64, 1}}, HetaSimulator.var"#38#43"{HetaSimulator.TimeEvent{Main.var"#nameless_tstops_func_#19", Main.var"#nameless_affect_func_#31"}, Tuple{Bool, Bool}, Symbol}, HetaSimulator.var"#init_time_event#39"{HetaSimulator.TimeEvent{Main.var"#nameless_tstops_func_#19", Main.var"#nameless_affect_func_#31"}, Array{Float64, 1}}, typeof(SciMLBase.FINALIZE_DEFAULT)}, 
              SciMLBase.DiscreteCallback{HetaSimulator.var"#37#42"{Array{Float64, 1}}, HetaSimulator.var"#38#43"{HetaSimulator.TimeEvent{Main.var"#nameless_on_tstops_func_#20", Main.var"#nameless_on_affect_func_#32"}, Tuple{Bool, Bool}, Symbol}, HetaSimulator.var"#init_time_event#39"{HetaSimulator.TimeEvent{Main.var"#nameless_on_tstops_func_#20", Main.var"#nameless_on_affect_func_#32"}, Array{Float64, 1}}, typeof(SciMLBase.FINALIZE_DEFAULT)}, 
              SciMLBase.DiscreteCallback{HetaSimulator.var"#37#42"{Array{Float64, 1}}, HetaSimulator.var"#38#43"{HetaSimulator.TimeEvent{Main.var"#nameless_off_tstops_func_#21", Main.var"#nameless_off_affect_func_#33"}, Tuple{Bool, Bool}, Symbol}, HetaSimulator.var"#init_time_event#39"{HetaSimulator.TimeEvent{Main.var"#nameless_off_tstops_func_#21", Main.var"#nameless_off_affect_func_#33"}, Array{Float64, 1}}, typeof(SciMLBase.FINALIZE_DEFAULT)}, 
              SciMLBase.DiscreteCallback{Main.var"#nameless_condition_func_#26", HetaSimulator.var"#48#49"{Tuple{Bool, Bool}, Symbol}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT)}
            }
          },
          Tuple{Symbol}, 
          NamedTuple{
            (:callback,), 
            Tuple{
              SciMLBase.CallbackSet{Tuple{}, Tuple{
                SciMLBase.DiscreteCallback{HetaSimulator.var"#92#93", HetaSimulator.SavingEvent{Main.var"#saving_#14"{Array{Union{Nothing, Int64}, 1}}, HetaSimulator.SavedValues{Array{LabelledArrays.LArray{Float64, 1, Array{Float64, 1}, (:v1, :v2)}, 1}, Array{Float64, 1}, Array{Symbol, 1}}, DataStructures.BinaryHeap{Float64, Base.Order.ForwardOrdering}, Array{Float64, 1}}, typeof(HetaSimulator.saving_initialize), typeof(SciMLBase.FINALIZE_DEFAULT)}, 
                SciMLBase.DiscreteCallback{HetaSimulator.var"#37#42"{Array{Float64, 1}}, HetaSimulator.var"#38#43"{HetaSimulator.TimeEvent{Main.var"#nameless_tstops_func_#15", Main.var"#nameless_affect_func_#27"}, Tuple{Bool, Bool}, Symbol}, HetaSimulator.var"#init_time_event#39"{HetaSimulator.TimeEvent{Main.var"#nameless_tstops_func_#15", Main.var"#nameless_affect_func_#27"}, Array{Float64, 1}}, typeof(SciMLBase.FINALIZE_DEFAULT)}, 
                SciMLBase.DiscreteCallback{HetaSimulator.var"#37#42"{Array{Float64, 1}}, HetaSimulator.var"#38#43"{HetaSimulator.TimeEvent{Main.var"#nameless_tstops_func_#18", Main.var"#nameless_affect_func_#30"}, Tuple{Bool, Bool}, Symbol}, HetaSimulator.var"#init_time_event#39"{HetaSimulator.TimeEvent{Main.var"#nameless_tstops_func_#18", Main.var"#nameless_affect_func_#30"}, Array{Float64, 1}}, typeof(SciMLBase.FINALIZE_DEFAULT)}, 
                SciMLBase.DiscreteCallback{HetaSimulator.var"#37#42"{Array{Float64, 1}}, HetaSimulator.var"#38#43"{HetaSimulator.TimeEvent{Main.var"#nameless_tstops_func_#19", Main.var"#nameless_affect_func_#31"}, Tuple{Bool, Bool}, Symbol}, HetaSimulator.var"#init_time_event#39"{HetaSimulator.TimeEvent{Main.var"#nameless_tstops_func_#19", Main.var"#nameless_affect_func_#31"}, Array{Float64, 1}}, typeof(SciMLBase.FINALIZE_DEFAULT)}, 
                SciMLBase.DiscreteCallback{HetaSimulator.var"#37#42"{Array{Float64, 1}}, HetaSimulator.var"#38#43"{HetaSimulator.TimeEvent{Main.var"#nameless_on_tstops_func_#20", Main.var"#nameless_on_affect_func_#32"}, Tuple{Bool, Bool}, Symbol}, HetaSimulator.var"#init_time_event#39"{HetaSimulator.TimeEvent{Main.var"#nameless_on_tstops_func_#20", Main.var"#nameless_on_affect_func_#32"}, Array{Float64, 1}}, typeof(SciMLBase.FINALIZE_DEFAULT)}, 
                SciMLBase.DiscreteCallback{HetaSimulator.var"#37#42"{Array{Float64, 1}}, HetaSimulator.var"#38#43"{HetaSimulator.TimeEvent{Main.var"#nameless_off_tstops_func_#21", Main.var"#nameless_off_affect_func_#33"}, Tuple{Bool, Bool}, Symbol}, HetaSimulator.var"#init_time_event#39"{HetaSimulator.TimeEvent{Main.var"#nameless_off_tstops_func_#21", Main.var"#nameless_off_affect_func_#33"}, Array{Float64, 1}}, typeof(SciMLBase.FINALIZE_DEFAULT)}, 
                SciMLBase.DiscreteCallback{Main.var"#nameless_condition_func_#26", HetaSimulator.var"#48#49"{Tuple{Bool, Bool}, Symbol}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT)}}
              }
            }
          }
        }, 
        SciMLBase.StandardODEProblem
      }, 
      Array{HetaSimulator.AbstractMeasurementPoint, 1}
    }
  ).

This might be caused by recursion over very long tuples or argument lists.

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.