Map Supply Policy
Map raw rows into the scenario's supply policy table: the rules for supply at each location, how much is available, and at what per-unit cost.
This is the input side of supply. Pair it with Map Supply State when you also need to preserve what got used in a baseline.
When to use this¶
- Always, when supply is part of a scenario
- Network Optimization reads this table directly. Capacity becomes the upper bound on per-(location, product) supply, and the unit cost becomes what it pays
Without it the optimizer has no constraint on supply and nothing to charge for it, and the run stops: a missing supply policy is one of its three refusals.
What you need¶
- An upstream Import Data node carrying one row per (location, product) you supply from
- A column identifying the supplier or supply location, matching a location identifier
- A per-unit supply cost, a purchase or production rate. If you only have realized totals, use Map Supply State instead. This table needs a rate
Field mapping¶
Auto-detection is all or nothing. With no explicit mapping on the node, every field is matched against the headers listed below, case-insensitively, and a space in your header reads as an underscore, so Site Name matches site_name. Set even one field explicitly and detection switches off for the whole node: only the fields named in the mapping are filled, and the rest arrive empty.
Set mappings in the node's panel. Connect an upstream table and select the mapping node to see automatic matches. Choosing a column saves all displayed matches as an explicit mapping. Use Use automatic detection to return to header detection. Required fields without a match are marked in the panel.
| Field | Type | Required | Example | What it is | Auto-detected headers |
|---|---|---|---|---|---|
| Location | text | Yes | Warehouse A |
Where supply originates. Must match a Location name. | location, loc, name, id, location_id, loc_id |
| Product | text | Yes | Widget |
Product or SKU this rule applies to. Required — name it even in a single-product scenario. | product, sku, item, material, product_id |
| Capacity | number | No | 1000.0 |
Maximum quantity available from this location — the optimizer's upper bound. Blank = unconstrained. Its unit goes in Quantity Unit. | capacity, max_flow, max_quantity, max_volume, quantity |
| Quantity Unit | text | No | units |
Unit that capacity is expressed in. Pick one unit and use it consistently across the scenario. | quantity_unit, qty_unit, unit, uom |
| Unit Supply Cost | number | No | 5.0 |
Cost to supply one unit, in the scenario currency. Optimization requires a value on every row — set 0 only when the supply is genuinely free. | unit_supply_cost, cost_per_unit, unit_cost, procurement_rate |
How it works¶
Each row becomes a supply policy record. Network Optimization treats capacity as the maximum it may source from that (location, product) and the unit supply cost as the price it pays. Cost to Serve does not read this table. It allocates the realized total on supply state, and a rate is not a cost to it.
A column called quantity auto-detects to Capacity here, and it usually
should not. An observed quantity is the state side, and capacity is an upper
bound. The mapping cannot be corrected on the canvas, so fix it upstream: rename
the column in the file you upload, or split the observed half off into its own
file and wire that to Map Supply State.
Workflow wiring¶
For an optimization-only workflow, wire only the policy side:
flowchart LR
n1["Import Data (supply.csv)"] --> n2["Map Supply Policy"]
n2 --> n3["Create Scenario"]
n3 --> n4["Network Optimization"]
For a baseline that also preserves observed history, fan the same file out to both:
flowchart LR
n1["Import Data (supply.csv)"] --> n2["Map Supply Policy"]
n2 --> n3["Create Scenario"]
n1 --> n4["Map Supply State"]
n4 --> n3
Common mistakes¶
- Mapping an observed total cost to Unit Supply Cost. It is per unit. A realized total belongs on Map Supply State as Realized Supply Cost.
- Wiring only Map Supply State. The optimizer reads this table and never reads state. Without it the run stops.
- Mapping an observed
quantityto Capacity. Capacity is an upper limit. Set it only from data that really is one.