data/offline_models/
An offline model: how a station’s work advances while its place is unloaded and when the world starts again after time has passed, as whole cycles of the station’s own work numbers at a share of the online rate, bounded by the station’s stock. A station names its model. Loaded by the server only.
| Registry | manifold-ai:offline-model |
| Files | data/offline_models/*.ron, *.update.ron, *.final.ron |
| Sides | server: only the server loads it |
| Reads | nothing |
| Contract | Population, data stage |
Entry
A record, written OfflineModel(..); the name before the parentheses is optional.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | yes | The model’s key, <mod-id>:<name>. | |
kind | OfflineKind | yes | What it advances. | |
max_credit_hours | u32 | no | 72 | At most this many hours are credited when a space starts. |
Example
No bundled file declares one yet. From the reference’s test fixture, crates/manifold-server-state/tests/data-reference-fixture/data/offline_models/workbench.ron, which the data stage loads in its tests:
OfflineModel(id: "dataref-fixture:offline/workbench", kind: StationWork(efficiency: 1.0))
Types
OfflineKind
What an offline model advances.
| Variant | Written | Description |
|---|---|---|
StationWork | StationWork(efficiency: .., max_cycles: ..) | A station’s work cycles. |
StationWork fields:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
efficiency | f32 | no | 1.0 | The offline rate as a share of the online rate, above 0 and at most 1.0: logging out never earns more than staying. |
max_cycles | u32 or None | no | no limit | The most cycles one catch-up credits. |