Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

model_simulation.md tutorial, "A Larger Model Simulation" is broken, needs clock in simulate! call. #84

Open
proudindiv opened this issue Feb 21, 2022 · 0 comments

Comments

@proudindiv
Copy link

It may not of been updated from an earlier change to the interface.

# Simulation of the model 
simulate!(model, withbar=false)

gives:

MethodError: no method matching simulate!(::Model{LightGraphs.SimpleGraphs.SimpleDiGraph{Int64}, Vector{Any}, Vector{Any}, TaskManager{Any, Any, Inport{Inpin{Bool}}, Outport{Outpin{Float64}}, Nothing}, Nothing}; withbar=false)
Closest candidates are:
  simulate!(::Model, ::Clock; simdir, simprefix, simname, logtofile, loglevel, reportsim, withbar, breakpoints) at ~/.julia/packages/Causal/2C1k8/src/models/model.jl:638
  simulate!(::Model, ::Real, ::Real, ::Real; kwargs...) at ~/.julia/packages/Causal/2C1k8/src/models/model.jl:673

Stacktrace:
 [1] top-level scope
   @ In[4]:2
 [2] eval
   @ ./boot.jl:373 [inlined]
 [3] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
   @ Base ./loading.jl:1196

Using code similar to the earlier sections seems to work:

# Simulate the model
tinit, tsample, tfinal = 0., 0.01, 10. 
sim = simulate!(model, tinit, tsample, tfinal; withbar=false)

Similarly earlier section "Investigation of Simulation" fails on Clock:

clock = filecontent["model/clock"]
KeyError: key "model/clock" not found

Stacktrace:
 [1] getindex(h::Dict{String, Any}, key::String)
   @ Base ./dict.jl:481
 [2] top-level scope
   @ In[14]:1
 [3] eval
   @ ./boot.jl:373 [inlined]
 [4] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
   @ Base ./loading.jl:1196

I just discovered Causal.jl this evening and it looks like a great package!

I'm thinking of cloning Russell Standish and Steve Keen's "Minsky systems dynamics economics modeling software" to julia with it and combining them with my econometric time series modeling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant