Map Location State
Record whether each site is open and its total fixed operating cost for the scenario planning period. Each row references an existing location. Costs use the scenario currency. A closed site must have a Total Fixed Cost of zero: Network Optimization refuses a closed site with any other cost, and a negative or non-finite cost, naming the row.
When to use this¶
Use this node to import an observed footprint and its incurred fixed costs. For an optimization, enter rules through Map Location Policy instead: Network Optimization writes fresh location state from the policy: the open decisions and costs in its result are its own, never carried over from the state it was given. It still reads that state, and refuses a row the rule above refuses.
What you need¶
One row per location, an open indicator written TRUE or FALSE, and a
nonnegative total fixed cost. Any other open value, such as yes or 1, is
refused, naming the row.
An open site may carry no volume and still incur its operating cost.
Field mapping¶
Fields are matched by name unless you set them. When the workflow runs, every field you have not set a column for is matched against the headers listed below, case-insensitively and ignoring spaces around the header, and a space inside your header reads as an underscore, so Site Name matches site_name. Setting a column for one field fixes that field only; the others keep following your file's headers, so a renamed column is still found. A required field that no column supplies — no header matched, or you set none or one your table lacks — is reported once, with the headers your table does have.
Set mappings in the node's panel. Connect an upstream table and select the mapping node. A field matched by name is marked Matched by name; pick a column to set it yourself, and Match by name puts it back. Match all by name clears every field you set. Required fields without a match are marked in the panel.
Reshape rows in a Script first. A mapping node only says which column is which field. To drop rows, recode values, or split or combine columns, connect a Script node before it and map the columns the Script returns.
| Field | Type | Required | Example | What it is | Auto-detected headers |
|---|---|---|---|---|---|
| Location | text | Yes | Warehouse A |
Site identifier, matching a location in this scenario. | location, location_id |
| Is Open | boolean | Yes | True |
Whether the site is open during the scenario planning period; an open site may carry no volume. | is_open |
| Total Fixed Cost | number | Yes | 100000.0 |
Fixed operating cost incurred once at this site for the scenario planning period, in its currency. Every open site carries it, idle ones included; one-time opening and closure costs are not modeled and are not in it. Must be greater than or equal to 0. | total_fixed_cost |
Workflow wiring¶
Wire Import Data into this node and its records into Create Scenario, alongside Map Locations. The scenario keeps each site's fixed operating cost in the location state's Total Fixed Cost column. Cost to Serve does not allocate this site-level component among customers or products.
flowchart LR
n1["Import Data (sites.csv)"] --> n2["Map Location State"]
n3["Import Data (locations.csv)"] --> n4["Map Locations"]
n2 & n4 --> n5["Create Scenario"]
Messages this node can show¶
- Field matches several columns
- Mapped table empty
- Number outside its allowed bound
- Required field absent
- Row doesn’t fit its table
- Text padded with spaces
- Value not a plain number
- Yes/no value not readable
The table this node makes is checked again with the rest of the scenario when Create Scenario assembles it: see messages about the scenario.
A run gives this node 5 minutes. A node that takes longer stops with Time limit reached.
Like every node, it can also stop on the checks before a run and the run's limits.