Documentation
¶
Overview ¶
Package sim provides a multi-stage discrete-event simulation for RL-based pipeline control experiments.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Env ¶
type Env struct {
// contains filtered or unexported fields
}
Env is the RL environment wrapping a multi-stage DES.
func (*Env) CheckConservation ¶
CheckConservation verifies arrivals = backlog + WIP + completed.
func (*Env) Reset ¶
func (e *Env) Reset(seed uint64) Observation
Reset starts a new episode with the given seed. Returns initial observation.
type EnvConfig ¶
type EnvConfig struct {
Stages []StageConfig
ArrivalMean float64 // > 0
IntervalTime float64 // sim time per Step; > 0
MaxItems int // episode ends after N completions; 0 = use MaxTime
MaxTime float64 // episode ends after this sim time; 0 = use MaxItems
RewardAlpha float64 // WIP penalty coefficient; default 0.01
}
EnvConfig configures the RL environment.
type Observation ¶
Observation is the RL observation (current state only).
type StageConfig ¶
type StageConfig struct {
Workers int // parallel servers; >= 1
ServiceMean float64 // exponential mean service time; > 0
}
StageConfig configures one stage in the pipeline.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
gridsearch
command
Command gridsearch evaluates all static WIP vectors on a multi-stage DES pipeline.
|
Command gridsearch evaluates all static WIP vectors on a multi-stage DES pipeline. |
|
simenv
command
Command simenv wraps sim.Env as a JSON-over-stdio subprocess for Python RL training.
|
Command simenv wraps sim.Env as a JSON-over-stdio subprocess for Python RL training. |
Click to show internal directories.
Click to hide internal directories.