Map Demand Policy
Map raw rows into the scenario's demand policy table: the rules for demand at each location, how much is requested, and what each fulfilled unit earns.
This is the input side of demand. Pair it with Map Demand State when you also need to preserve what was fulfilled in a baseline.
When to use this¶
- Always, when demand is part of a scenario
- Network Optimization reads this table directly. The requested quantity becomes the demand it must satisfy, and the unit revenue becomes what it earns by satisfying it
Without it the optimizer has nothing to satisfy and no incentive to ship, and the run stops: a missing demand policy is one of its three refusals.
What you need¶
- An upstream Import Data node with one row per (location, product) you have demand for
- A column identifying the demand location, matching a location identifier
- A requested-quantity column, and ideally a per-unit revenue column
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 | Store 1 |
Where demand occurs. Must match a Location name. | location, loc, name, id, location_id, loc_id |
| Product | text | Yes | Widget |
Product or SKU demanded. Required — name it even in a single-product scenario. | product, sku, item, material, product_id |
| Requested Quantity | number | No | 100.0 |
Quantity requested at this location — the demand the optimizer tries to meet. Blank = no demand. Its unit goes in Quantity Unit. | requested_quantity, requested, quantity, qty, demand, demand_quantity |
| Quantity Unit | text | No | units |
Unit that requested quantity is expressed in. | quantity_unit, qty_unit, unit, uom |
| Unit Revenue | number | No | 12.0 |
Revenue earned per unit fulfilled, in the scenario currency. Optimization requires a value on every row when it may leave demand unserved; when every order must be met it only scales the reported objective. | unit_revenue, revenue, sales_price, price_per_unit |
How it works¶
Each row becomes a demand policy record. Network Optimization treats the requested quantity as the requirement at that (location, product) and the unit revenue as the reward for meeting it. With Allow partial demand fulfillment off on Network Optimization, which is the default, the requested quantity is a hard requirement.
Auto-detection maps a column called quantity to Requested Quantity. That is
usually right on the policy side: requested is what the optimizer must satisfy.
Workflow wiring¶
For an optimization-only workflow, wire only the policy side:
flowchart LR
n1["Import Data (demand.csv)"] --> n2["Map Demand Policy"]
n2 --> n3["Create Scenario"]
n3 --> n4["Network Optimization"]
For a baseline that also preserves observed fulfilment, fan the same file out to both:
flowchart LR
n1["Import Data (demand.csv)"] --> n2["Map Demand Policy"]
n2 --> n3["Create Scenario"]
n1 --> n4["Map Demand State"]
n4 --> n3
Common mistakes¶
- Mapping a total
revenuecolumn to Unit Revenue. It is per unit. A realized total belongs on Map Demand State as Realized Revenue. - Wiring only Map Demand State. The optimizer reads this table and never reads state. Without it there is no demand requirement and the run stops.