Skip to content

Commit

Permalink
added random state printing
Browse files Browse the repository at this point in the history
  • Loading branch information
nsimakov committed Oct 29, 2024
1 parent 4c723f9 commit fbf5719
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/hpc_user_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,11 @@ function model_step!(model::StandardABM)
run_scheduler!(sim, model, model.sim.resource)

# ask users to do their staff
@debug "users activities"

rng_glb = copy(Random.default_rng());
rng_sim = copy(sim.rng);
rng_mdl = copy(abmrng(model));
@debug "users activities\nrng_glb=$(rand(rng_glb,Int64))\nrng_sim=$(rand(rng_sim,Int64))\nrng_mdl=$(rand(rng_mdl,Int64))"
for id in abmscheduler(model)(model)
# here `agent_step2!` may delete agents, so we check for it manually
hasid(model, id) || continue
Expand Down
4 changes: 4 additions & 0 deletions test/scheduler/scheduler_test1.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ using DataFrames
using DataStructures
using Logging

rng_glb = copy(Random.default_rng());
@info "Random.default_rng Next Int $(rand(rng_glb,Int64))"


# Replay jobs and compare node occupiency by job to refference
# the refference was manually checked for having sense

Expand Down

0 comments on commit fbf5719

Please sign in to comment.