Skip to content

Map Production Policy

Map raw rows into the scenario's production policy table: the rule for production. It says where a recipe from Map Bill of Materials can be run, at what per-unit conversion cost, and up to what capacity.

This is the input side of production. Pair it with Map Production State for the quantity produced and the cost realized.

When to use this

  • Your network makes products and you want Network Optimization to decide how much to produce where
  • You have a per-unit conversion cost, and optionally a capacity, for each production site

What you need

  • A Map Bill of Materials node defining each recipe
  • An upstream Import Data node with one row per (location, recipe) the site can run
  • A per-unit production cost column, and optionally a capacity

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.

Same for every row. A file with no unit column still states its unit: in Quantity Unit, pick Same for every row and type the unit, such as bike, and every row is in it. Over MCP, set it in field_mappings as "quantity_unit": "__const__:bike". Quantity Unit is required on every row with Unit Production Cost, Capacity or Emissions per Unit, and the panel marks it required once one of those is mapped.

Field Type Required Example What it is Auto-detected headers
Location text Yes Berlin Assembly Plant Where production happens (the plant/assembly site). Must match a Location name. location, loc, name, id, location_id, loc_id
Bom Name text Yes City Bike BoM Recipe to produce here. Must match a recipe on the bill of materials table. bom_name
Unit Production Cost number No 40.0 Cost to produce one unit of the BoM's output product (labour/overhead beyond component cost), in the scenario currency. Blank = production adds no conversion cost. Must be greater than or equal to 0. unit_production_cost
Capacity number No 500.0 Maximum units of the output product produceable here — the optimizer's upper bound. Zero closes production for this recipe at this location. Blank = unconstrained. Must be greater than or equal to 0. Its unit goes in Quantity Unit. capacity, max_flow, max_quantity, max_volume, quantity
Quantity Unit text No bike Unit the capacity and the per-unit cost and emissions are in, as a unit of the output product. Required on every row that carries one. A unit other than the scenario's needs a conversion for the product. quantity_unit, qty_unit, unit, uom
Emissions per Unit number No 3.0 Emissions produced per output unit manufactured, in the scenario's emissions unit, set on Create Scenario. Blank = production emissions are not modelled. Must be greater than or equal to 0. emissions_per_unit, co2_per_unit, carbon_per_unit, emission_rate

How it works

Network Optimization adds a production decision for each (location, recipe). Producing a unit of the output consumes its components, which creates derived demand for them, and pays the per-unit conversion cost, bounded by capacity.

Workflow wiring

flowchart LR
    n1["Import Data (bom.csv)"] --> n2["Map Bill of Materials"]
    n3["Import Data (production.csv)"] --> n4["Map Production Policy"]
    n5["Import Data (locations.csv)"] --> n6["Map Locations"]
    n7["Import Data (products.csv)"] --> n8["Map Products"]
    n2 & n4 & n6 & n8 --> n9["Create Scenario"]

Common mistakes

  • No matching recipe. The Bom Name must match a recipe on Map Bill of Materials. Create Scenario refuses a row that names a recipe the bill of materials does not have.
  • Putting the produced quantity here. That is an outcome, and it belongs on Map Production State.

Messages this node can show

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.