Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimulationService

A reproducible discrete-event simulation of a virtual clinical service, modelling patient arrivals, nurse availability, urgency and four service types.

Run the core model

julia --project=. -e 'using Pkg; Pkg.instantiate()'
julia --project=. test/runtests.jl

The model API is defined in vcc.jl:

include("vcc.jl")
parameters = Parameters(100, 2.0, 0.2, 14.7, 3.2, 37.5, 10.6,
                        16.72, 3.2, 22.27, 5.0, 4)
state = run_simulation(parameters, 42)

A fixed seed controls patient attributes, service selection, arrivals and service durations.

Model guarantees

  • Exactly n patients arrive and are served; n = 0 returns an empty completed state.
  • Timing means and standard deviations must be finite and strictly positive; invalid parameters fail with ArgumentError before random distributions are built.
  • Every arrival schedules its successor independently of nurse availability.
  • Waiting patients enter service once a nurse becomes free.
  • Service times are positive and patient IDs are unique.
  • Same-time events retain their true timestamp and use deterministic insertion order; simulation time is never adjusted to break a tie.
  • Assigned service intervals do not overlap for an individual nurse.

Analysis script

vccrun.jl is an optional exploratory sweep and requires additional CSV, DataFrames and Makie packages. It is intentionally separate from the minimal tested core environment. Its 100 runs per cell use the deterministic, distinct seed series 1234:1333; they are reproducible replicates rather than repeated copies of the default trajectory.

Scope

The distributions, positive-time clamping, and urgency rules are illustrative modelling assumptions, not a validated clinical staffing model. The invariant tests establish program behavior only; they do not validate inputs, outcomes, staffing requirements, or operational decisions. Validate parameters and outcomes independently before any operational use.

Licence

MIT.

About

Reproducible discrete-event service simulation in Julia.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages