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

Draft engine #77

Open
wants to merge 46 commits into
base: master
Choose a base branch
from
Open

Draft engine #77

wants to merge 46 commits into from

Conversation

mschauer
Copy link
Owner

@mschauer mschauer commented Apr 25, 2021

I want to design an engine for our samplers, so we do not have to reimplement everything just there is a new reflective wall in space.

I think we just need something like this:

while t′ < T
    # Who is (i) next, when (t′) and what (j) happens?
     i, t′ = peek(Q)
     e = action[i] 
     # Trigger state change
     if e > 0 # something? 
         sindex(action!, e, i, t′, u, args...)
     end
     # What happens next now has changed for each j, trigger updates
     for j in affected(G, e, i, t′, u, args...)
         τ, e = sfindmin(nextevent, j, e, i, t′, u, args...)
         Q[j] = τ
         action[j] = e
     end

     # register event (t′, i, u[i], e)
end

here sindex calls the i th function in the vector action! and sfindmin gives index and return value of each function in the function vector nextnext.

@codecov-commenter
Copy link

codecov-commenter commented Apr 25, 2021

Codecov Report

Merging #77 (aa5a290) into master (a1989fe) will decrease coverage by 30.84%.
The diff coverage is 0.47%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #77       +/-   ##
===========================================
- Coverage   79.85%   49.01%   -30.85%     
===========================================
  Files          18       34       +16     
  Lines        1127     2228     +1101     
===========================================
+ Hits          900     1092      +192     
- Misses        227     1136      +909     
Impacted Files Coverage Δ
src/ZigZagBoomerang.jl 100.00% <ø> (ø)
src/common.jl 56.66% <0.00%> (-28.34%) ⬇️
src/discrete-continuous_zigzag.jl 0.00% <0.00%> (ø)
src/discrete_zigzag.jl 0.00% <0.00%> (ø)
src/engine.jl 0.00% <0.00%> (ø)
src/engineex.jl 0.00% <0.00%> (ø)
src/rev_jumps_vs_sticky.jl 0.00% <0.00%> (ø)
src/switch.jl 0.00% <0.00%> (ø)
src/trace.jl 67.94% <ø> (-23.23%) ⬇️
src/wranglers.jl 0.00% <0.00%> (ø)
... and 32 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a1989fe...aa5a290. Read the comment docs.

@mschauer mschauer changed the title Draft scheduler Draft engine Apr 26, 2021
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

Successfully merging this pull request may close these issues.

3 participants