> ## Documentation Index
> Fetch the complete documentation index at: https://docs.variable.global/llms.txt
> Use this file to discover all available pages before exploring further.

# Auto-assigning transport

> Match a bill of materials to existing transport lanes by location and fill in transport in bulk

Building an EPD usually means hand-attaching a transport lane to every material in the bill of materials. **Auto-assign transport** does it for you: for each material input, Variable reads the facility the material is made at (or its [supplier's location](/docs/help/supplier-locations)) and the facility your product is made at, finds an existing [transport lane](/docs/help/transport-modeling) that connects those two points, and creates the transport input — using the input's own computed weight. It never overwrites transport you've already set.

## How matching works

For every material input in the model, auto-assign resolves two points and looks for a lane between them.

| Endpoint        | Where it comes from                                                                                                               |
| :-------------- | :-------------------------------------------------------------------------------------------------------------------------------- |
| **Origin**      | The facility the material is made at, if it has one — otherwise its [supplier's default location](/docs/help/supplier-locations). |
| **Destination** | The facility your product is made at.                                                                                             |

A lane matches when its **start** falls within the chosen radius of the origin and its **end** falls within the radius of the destination. Multi-leg lanes are matched on their endpoints only — the stops in between don't matter.

When more than one lane matches, Variable ranks them:

* A lane whose endpoint is the *exact* origin or destination location (not just nearby) ranks ahead of one that only falls within the radius.
* Otherwise the lane closest to both points — the smallest combined start + end distance — wins.

The single closest lane is assigned. If two lanes are effectively tied with no clear winner, auto-assign leaves the input alone and reports it as **ambiguous** rather than guess.

<Note>
  Auto-assign only reads lanes you already have. If a model's materials have no nearby lane, model the [supplier-to-factory lane](/docs/help/transport-modeling) once, then re-run — every input that now matches gets filled in.
</Note>

## The radius

Matching is **radius-based** because a supplier's geocoded address almost never lands exactly on a lane's endpoint. The radius is the straight-line distance (in km) a lane's start and end can sit from the origin and destination and still count as a match.

* The default is **50 km**. Both the button and the bulk action expose a radius control, so you can widen or tighten it per run.
* A larger radius finds more matches but raises the chance of an **ambiguous** result when several lanes fall in range.
* Set it to **0** to match only lanes whose endpoints are the exact origin and destination locations.

## Running it

Auto-assign never runs on its own — you always trigger it, and it never touches an input that already has transport.

<Steps>
  <Step title="From a single product">
    On the product's LCA, in the inputs section, use **Auto-assign transport**. It walks every material input in that bill of materials.
  </Step>

  <Step title="For many products at once">
    On the product list, select the products and choose **Auto-assign transport** from the bulk actions.
  </Step>

  <Step title="Set the radius and review">
    Set the radius, run, and Variable processes the products in the background. When it finishes you get a summary grouped by result.
  </Step>
</Steps>

## Results

Every material input lands in one of these buckets:

| Result             | Meaning                                                                                                        |
| :----------------- | :------------------------------------------------------------------------------------------------------------- |
| **Assigned**       | A clear matching lane was found and a transport input was created.                                             |
| **No origin**      | Couldn't tell where the material ships from — it has no facility set and its supplier has no default location. |
| **No destination** | Couldn't tell where the product is made — it has no facility set.                                              |
| **No match**       | Both points are known, but no lane falls within the radius.                                                    |
| **Ambiguous**      | Two or more lanes tied with no clear nearest — none was assigned.                                              |
| **Already set**    | The input already had transport, which auto-assign never overwrites.                                           |

<Info>
  **No origin** and **no destination** usually mean missing location data. Set the facility on the material or product, or add a [location to the supplier](/docs/help/supplier-locations), then re-run — auto-assign is safe to repeat and skips anything it already assigned.
</Info>

## Related topics

* [Modeling transportation](/docs/help/transport-modeling) — building the lanes auto-assign matches against
* [Supplier locations](/docs/help/supplier-locations) — the origin endpoint for a material's supplier
* [Adding inputs to your model](/docs/getting-started/add-materials) — where transport inputs fit
