Model file sections¶
One page per top-level key of the model file, from the published JSON Schema (naga schema): what the key holds, each field with its type, default and unit, and an example fragment that the schema and the checks accept. Model file keys lists the keys with the version history.
| Section | Holds | What it is for |
|---|---|---|
blocks |
a list of blocks | Every block in the model: name, type, position (centre, scene units), params. |
links |
a list of entries | Ordered list of {source, target, delay?, source_port?, target_port?, capacity?}; array order is branch order, and several links may join the same pair of blocks (a link is identified by source, target and which of the parallel links it is). |
scenarios |
a list of scenario entries |
Named parameter-override sets, run and compared by nagasim.experiments. |
orders |
a list of order entries |
Released jobs with a due date, emitted by a CREATE block in "Orders" arrival mode. |
resources |
a list of resource entries |
Named resources: capacity, queue discipline, optional ranking expression, capacity schedule, cost fields. |
resource_sets |
a list of resource_set entries |
Named groups of resources with a selection rule, seized as one pseudo-resource. |
schedules |
a list of schedule entries |
Piecewise-constant arrival-rate or capacity schedules, optionally repeating. |
failures |
a list of failure entries |
Resource failures: uptime/downtime distribution pairs per named resource group. |
tables |
a list of table entries |
Named 1-D/2-D lookup tables read by TABLE("name", k1[, k2]) in any expression. |
sequences |
a list of sequence entries |
Named routings: ordered steps through STATION blocks, walked by a ROUTE block. |
variables |
a list of variable entries |
Model-level variables, read and written by expressions; reset to initial each replication. |
entities |
a list of entity entries |
Entity types: shape, colour, optional size and WIP holding cost. |
timeseries_inputs |
a list of timeseries_input entries |
Named time-series profiles read by TS("name") in any expression. |
levels |
a list of level entries |
Continuous quantities with bounds (battery energy, tank volume, an inventory position), read by LEVEL("name"). |
flows |
a list of flow entries |
Rate-based transfers between levels, re-evaluated at events. |
conversions |
a list of conversion entries |
Delayed conversions with a yield curve: feed in, product released over the following hours or days. |
fixed_costs |
a list of fixed_cost entries |
Costs of the scenario rather than of the run: capex (flagged capex: true for the investment case), or an annuity over a sized parameter. |
fleets |
a list of fleet entries |
Pools of vehicles that carry entities on the network; a fleet is a resource under its own name. |
motion_profiles |
a list of motion_profile entries |
How robots, people and mechanisms move: speed, acceleration, payload derating and a collaborative speed, named by a MOTION block's profile. |
robots |
a list of robot entries |
Robots: a structure with its dimensions, or a joint chain, with each axis's range, speed and acceleration, and the tool frame; named by a MOTION block's robot. |
pallet_patterns |
a list of pallet_pattern entries |
Pallet patterns: the pallet, the item, layer layouts and how they stack, and the limits that close a pallet; named by a carrier BATCH's pattern. |
zones |
a list of zone entries |
Safety zones: a network node and a radius that a MOTION block's or a tending group's zone.name binds to; a worker inside slows the robot to its collaborative speed. |
chargers |
a list of charger entries |
Chargers and battery-swap stations at network nodes, used by fleets that declare a battery. |
auxiliaries |
a list of auxiliary entries |
Named expressions read by AUX("name"), evaluated on read. |
delays |
a list of delay entries |
Delays read by DELAY("name"): input, delay time, kind and order. |
subscripts |
a list of subscript entries |
Dimensions: a record with "dims" is flattened into one record per element. |
agent_types |
a list of agent_type entries |
Statecharts run for every agent of a population: parameters, states, transitions. |
populations |
a list of population entries |
Agent populations: a type, a count and an initial placement. |
reality_checks |
a list of reality_check entries |
Vensim-style reality checks: a test input and a constraint the model must then satisfy. |
network |
null |
Optional path network: nodes at layout coordinates and the segments joining them. |
annotations |
a list of entries | Text notes and frames drawn behind blocks on the canvas; ignored by the engine. |
submodels |
an object that maps a definition's name to its definition | Reusable definitions (parameters, inner blocks/links/ports), flattened before a run. |
background |
null |
Optional floor-plan image: path, position, scale, opacity, lock, real-world scale. |
building |
null |
Optional building: rooms, walls, wall openings, floor markings, labels and plan fixtures in metres; the walls are the walled rooms' outlines and the free-standing wall lines, each with a height, thickness and finish. |
cranes |
null |
Optional overhead and gantry cranes in metres: a runway, the blocks each crane serves and the axis its bridge travels along. |
stockpiles |
null |
Optional piles for store blocks: each listed block is drawn as a few piles of slabs (one per entity up to max_layers, then a count), an entity's pile chosen by a key per entity in creation order, with the area's total on its label; ignored by the engine. |
info |
an object | Optional model metadata: description, author, notes; shown in the report header. |
data_sources |
a list of data_source entries |
Declared CSV/Excel/SQLite/SQL/JSON sources model parameters can be read from. |
data_bindings |
a list of data_binding entries |
Which column, filtered and transformed how, feeds which override path. |
initial_state |
an object | Warm start: entities already in blocks, variable values and resource states the run begins with. |
simulation |
an object | Run settings: time_limit, warmup, replications, time_unit, currency, entity_log_limit, and the optional real-date calendar. |
investment |
an object | Optional investment case: the baseline scenario, horizon, discount rate, operating hours per year, margin per part and throughput KPI that naga invest compares every scenario with. |
dispatch |
an object | Optional storage dispatch plan: a rolling-horizon LP over the bus tags that drives every storage level marked optimal at the cheapest grid cost. |
outputs |
an object | Optional extra output collection whose cost is opt-in, e.g. |
assertions |
a list of entries | Model assertions: a KPI, a comparison operator/value and a replication/confidence budget, checked by naga check. |
path_checks |
a list of entries | Entity-path checks: rules on the blocks each entity visits (order, never, at most N times, always), checked by naga check on one traced replication. |
dashboard |
an object | Dashboard widgets: kpi/gauge/line/bar over the model's own expressions, sampled at the same instants as the timeseries sampler. |
view |
an object | Editor view state: the canvas tab in front, layout/3D, zoom and centre per tab; written on save, ignored by the engine. |