WEICZ20/moonbit-computer-interlocking/src/simulator does not have a README file

    CycleReport

    pub(all) struct CycleReport {
    cycle_count : Int64
    events_processed : Int
    routes_active : Int
    safety_violations : Int
    active_slots_scanned : Int
    sections_released : Int
    switches_released : Int
    emergency_actions : Int
    execution_micro_seconds : Int64
    } derive(
    Debug
    )

    CycleReport::new

    PreallocatedEventQueue

    pub(all) struct PreallocatedEventQueue {
    buffer : FixedArray[SimulationEvent]
    capacity : Int
    head : Int
    tail : Int
    count : Int
    } derive(
    Debug
    )

    PreallocatedEventQueue::clear

    PreallocatedEventQueue::is_empty

    fn PreallocatedEventQueue::is_empty(self : PreallocatedEventQueue) -> Bool

    PreallocatedEventQueue::new

    PreallocatedEventQueue::pop

    PreallocatedEventQueue::push

    ScanCycleCounters

    pub(all) struct ScanCycleCounters {
    active_slots_scanned : Int
    sections_released : Int
    switches_released : Int
    } derive(
    Debug
    )

    SimulatedTrain

    pub(all) struct SimulatedTrain {
    train_id : String
    route_id :
    RouteId

    current_section_index : Int
    distance_in_current_section : Double
    speed_m_per_s : Double
    is_finished : Bool
    } derive(
    Debug
    )

    SimulationEngine

    SimulationEngine::push_event

    fn SimulationEngine::push_event(self : SimulationEngine, event : SimulationEvent) -> Bool

    SimulationEngine::register_train

    fn SimulationEngine::register_train(self : SimulationEngine, train : SimulatedTrain) -> Unit

    SimulationEngine::step_cycle

    SimulationEngine::step_cycle_fast

    fn SimulationEngine::step_cycle_fast(self : SimulationEngine) -> CycleReport

    SimulationEventType

    pub(all) enum SimulationEventType {
    EventRequestRoute
    EventCancelRoute
    EventThrowSwitch
    EventOccupyTrack
    EventClearTrack
    EventInjectFault
    EventClearFault
    EventTrainStep
    } derive(Eq,
    Debug
    )