# 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](../schema.md) lists the keys with the version history.

| Section | Holds | What it is for |
|---|---|---|
| [`blocks`](blocks.md) | a list of blocks | Every block in the model: `name`, `type`, `position` (centre, scene units), `params`. |
| [`links`](links.md) | 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`](scenarios.md) | a list of `scenario` entries | Named parameter-override sets, run and compared by `nagasim.experiments`. |
| [`orders`](orders.md) | a list of `order` entries | Released jobs with a due date, emitted by a CREATE block in "Orders" arrival mode. |
| [`resources`](resources.md) | a list of `resource` entries | Named resources: capacity, queue discipline, optional ranking expression, capacity schedule, cost fields. |
| [`resource_sets`](resource_sets.md) | a list of `resource_set` entries | Named groups of resources with a selection rule, seized as one pseudo-resource. |
| [`schedules`](schedules.md) | a list of `schedule` entries | Piecewise-constant arrival-rate or capacity schedules, optionally repeating. |
| [`failures`](failures.md) | a list of `failure` entries | Resource failures: uptime/downtime distribution pairs per named resource group. |
| [`tables`](tables.md) | a list of `table` entries | Named 1-D/2-D lookup tables read by TABLE("name", k1[, k2]) in any expression. |
| [`sequences`](sequences.md) | a list of `sequence` entries | Named routings: ordered steps through STATION blocks, walked by a ROUTE block. |
| [`variables`](variables.md) | a list of `variable` entries | Model-level variables, read and written by expressions; reset to `initial` each replication. |
| [`entities`](entities.md) | a list of `entity` entries | Entity types: shape, colour, optional size and WIP holding cost. |
| [`timeseries_inputs`](timeseries_inputs.md) | a list of `timeseries_input` entries | Named time-series profiles read by TS("name") in any expression. |
| [`levels`](levels.md) | a list of `level` entries | Continuous quantities with bounds (battery energy, tank volume, an inventory position), read by LEVEL("name"). |
| [`flows`](flows.md) | a list of `flow` entries | Rate-based transfers between levels, re-evaluated at events. |
| [`conversions`](conversions.md) | a list of `conversion` entries | Delayed conversions with a yield curve: feed in, product released over the following hours or days. |
| [`fixed_costs`](fixed_costs.md) | 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`](fleets.md) | 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`](motion_profiles.md) | 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`](robots.md) | 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`](pallet_patterns.md) | 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`](zones.md) | 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`](chargers.md) | a list of `charger` entries | Chargers and battery-swap stations at network nodes, used by fleets that declare a `battery`. |
| [`auxiliaries`](auxiliaries.md) | a list of `auxiliary` entries | Named expressions read by AUX("name"), evaluated on read. |
| [`delays`](delays.md) | a list of `delay` entries | Delays read by DELAY("name"): input, delay time, kind and order. |
| [`subscripts`](subscripts.md) | a list of `subscript` entries | Dimensions: a record with "dims" is flattened into one record per element. |
| [`agent_types`](agent_types.md) | a list of `agent_type` entries | Statecharts run for every agent of a population: parameters, states, transitions. |
| [`populations`](populations.md) | a list of `population` entries | Agent populations: a type, a count and an initial placement. |
| [`reality_checks`](reality_checks.md) | a list of `reality_check` entries | Vensim-style reality checks: a test input and a constraint the model must then satisfy. |
| [`network`](network.md) | `null` | Optional path network: nodes at layout coordinates and the segments joining them. |
| [`annotations`](annotations.md) | a list of entries | Text notes and frames drawn behind blocks on the canvas; ignored by the engine. |
| [`submodels`](submodels.md) | an object that maps a definition's name to its definition | Reusable definitions (parameters, inner blocks/links/ports), flattened before a run. |
| [`background`](background.md) | `null` | Optional floor-plan image: path, position, scale, opacity, lock, real-world scale. |
| [`building`](building.md) | `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`](cranes.md) | `null` | Optional overhead and gantry cranes in metres: a runway, the blocks each crane serves and the axis its bridge travels along. |
| [`stockpiles`](stockpiles.md) | `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`](info.md) | an object | Optional model metadata: description, author, notes; shown in the report header. |
| [`data_sources`](data_sources.md) | a list of `data_source` entries | Declared CSV/Excel/SQLite/SQL/JSON sources model parameters can be read from. |
| [`data_bindings`](data_bindings.md) | a list of `data_binding` entries | Which column, filtered and transformed how, feeds which override path. |
| [`initial_state`](initial_state.md) | an object | Warm start: entities already in blocks, variable values and resource states the run begins with. |
| [`simulation`](simulation.md) | an object | Run settings: time_limit, warmup, replications, time_unit, currency, entity_log_limit, and the optional real-date calendar. |
| [`investment`](investment.md) | 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`](dispatch.md) | 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`](outputs.md) | an object | Optional extra output collection whose cost is opt-in, e.g. |
| [`assertions`](assertions.md) | a list of entries | Model assertions: a KPI, a comparison operator/value and a replication/confidence budget, checked by `naga check`. |
| [`path_checks`](path_checks.md) | 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`](dashboard.md) | an object | Dashboard widgets: kpi/gauge/line/bar over the model's own expressions, sampled at the same instants as the timeseries sampler. |
| [`view`](view.md) | an object | Editor view state: the canvas tab in front, layout/3D, zoom and centre per tab; written on save, ignored by the engine. |
