---
name: supplier-decision
description: "Give it quotes and your buying policy. Get award proposals, the cost frontier, and a new answer when a quote changes."
---

# Choose suppliers with a written rule

Prepare a draft supplier award proposal for review using this working folder. Do not place orders, contact suppliers or send messages. Preserve supplied inputs, reference files and every earlier proposal unchanged.

CHOOSE THE START POINT

Supplied two-part example: In a fresh working copy, first read inputs/policy.json, inputs/original-quotes.csv and source-map.json. Complete and save outputs/original/ before opening inputs/change-episode.json or inputs/updated-bayline-quote.csv. Then apply that change and save outputs/changed/. The replacement Q-B-02 supersedes Q-B-01; all other quotes and the stated policy carry forward. Do not read reference answers until checking your own results. The example's dates are fictional decision dates, not current offers. If these output folders already hold decisions, keep them and use the continuation route instead of replaying over them.

Own inputs or a later change: Use only the authorized inputs and the latest completed episode's current-state handoff. Do not restart from the original quotes, reapply the supplied Bayline change, or assume that only a quote can change. A change to demand, budget or another policy field starts a new episode too. With no prior history, use outputs/episode-001/; after the supplied original/changed pair, use outputs/episode-003/. Thereafter use the next unused episode number. Never overwrite an earlier folder. If the current episode or conflicting source authority cannot be established, identify the gap before calculating.

BUILD THIS EPISODE'S EFFECTIVE INPUT

Save effective-problem.json inside the new episode folder before solving. This is a complete input snapshot, not a list of changes. It must contain currency, quantity_unit, demand_units, allocation_step_units, max_suppliers, min_award_units, management_premium_budget_cents and quotes[]. Each quote needs supplier_id, quote_id, matching currency/unit, unit_price_cents, unit_freight_cents, fixed_shipment_cents and capacity_units. Retain the full applicable policy (including decision date, delivery deadline, assumptions and tie-breaks) and available quote facts in the snapshot as well; the solver ignores extra descriptive fields. Use this episode's effective decision date: for the supplied replay, the original uses policy.decision_date and the changed episode uses the date in change-episode.json /received_at. Do not silently extend a quote's validity.

For a continuation, copy the last effective snapshot, then apply only the authorized changes. Retain every still-effective quote, including unawarded suppliers. A revised quote gets its own quote ID; record the new ID, the superseded ID and the authorizing source. A policy change must name the changed field, prior value, new value and source. Carry all other policy and quote facts forward explicitly. Keep descriptive policy text consistent with its numeric fields. Earlier snapshots and quote identities remain historical facts, not alternative active offers. For own inputs, map every active quote and policy field to its authorized source; the supplied source-map.json covers only the fictional example.

In sources.md, name the previous episode (or state that this is the first), the effective decision date, every active quote ID and source locator, the effective policy and its sources, and the supersession/change record. Distinguish unchanged facts from new facts. Check quote validity, delivery commitments and comparable units against this episode's date and deadline. The --problem route validates numbers and constraints, not dates, source authority or commercial comparability. If currency, quantities, fees, delivery/capacity facts or policy authority are missing or incompatible, stop and name the gap rather than inventing a valid comparison.

SOLVE THE WHOLE CURRENT PROBLEM

Use python3 solver.py --problem outputs/<this-episode>/effective-problem.json, or auditable equivalent arithmetic. For the supplied example, python3 solver.py --episode original and --episode changed are also available; those two shortcuts do not load your own or later episode.

Enumerate the complete feasible allocation set using this snapshot's exact demand, lot size, capacities, maximum supplier count and minimum positive award. Include unit freight and one fixed shipment charge per positive award. Read all values from the effective policy rather than assuming the example's 1,200 crates, 100-crate lots, two suppliers or 200-crate minimum. Re-evaluate all active suppliers, not just the old winners, and recompute the feasible minimum before applying the premium allowance.

Among plans within the stated premium allowance of that feasible minimum, minimize the largest supplier award, then apply the documented tie-breaks. Do not change the allowance or substitute your own preference. If the problem is infeasible, report that result rather than proposing a partial or over-capacity award. Unsupported inputs are a model gap, not proof of infeasibility.

SAVE A REVIEWABLE DECISION

Alongside effective-problem.json, create:
- award-proposals.csv: episode, supplier, quantity, quote ID, unit sticker price, unit freight, fixed charge, line total, source locator and status. Include units/currency and use proposed, not approved. If infeasible, keep headers but no award rows.
- recommendation.md: concise editable recommendation with quantities, total, rationale, the feasible minimum, relevant alternatives, the full cost/exposure frontier and any exact extra allowance needed for another choice. Separate quote facts, arithmetic, hard constraints, buyer policy and unknown execution facts. Mark infeasible plans; their repriced totals are diagnostic, not actionable offers.
- sources.md: relative source-file links and exact quote IDs or policy fields behind every figure and consequential assumption, including the input history above.

For a continuation, check the preceding proposal against the new snapshot and report every violation. Show what changed in the selected allocation and total, and which policy judgments stayed unchanged. If demand or other requirements changed, distinguish their effect from quote repricing; a difference in totals is not automatically savings or a like-for-like price increase. Do not infer cancellation costs or realized savings. If an order or commitment exists, identify it and stop short of assuming awards can simply be replaced.

Describe largest award as the quantity missing if that supplier's whole award failed and all others arrived, not as a probability, expected loss, guaranteed resilience or replacement stock. Note unverified real-use assumptions, including product equivalence, current delivery/capacity, complete fees/tax/currency treatment and approval to order. A solver result verifies only its supplied assumptions, not supplier performance.

Check exact demand, lot/minimum/capacity limits, supplier count, reconciled line totals and premium within policy. End recommendation.md with a Current state section naming this episode and its effective-problem.json, the selected proposed allocation (or infeasible result), the preceding episode, active quote IDs, changes and supersessions, unresolved facts/commitments and the next unused episode folder. This is the handoff for the next visit; it does not approve an order.

Return file paths and failed checks or unresolved facts. Stop after the draft proposal; nothing is ordered or sent.


## Required inputs

- Comparable supplier quotes with price, freight, fixed charge and capacity
- A written buying policy: demand, lot size, supplier limits and premium allowance

## Expected outputs

- effective-problem.json with this episode’s active quotes and policy
- award-proposals.csv with every line sourced
- recommendation.md with the cost and concentration frontier
- sources.md naming the quote and policy fields behind each figure

## Checks

- Awards sum to exact demand; lots, minimums and capacity hold.
- Line totals reconcile; the selected premium stays within the written allowance.
- Infeasible plans are marked, and their repriced totals are not treated as offers.

## Limits

- Fictional quotes and policy; no supplier was contacted and nothing was ordered.
- The largest-award figure is a conditional quantity, not a probability or expected loss.
- The calculator checks arithmetic only for the assumptions it is given.

Revision: 2.0.1. [Read the complete kit](files/README.md) before use. This optional format is not a claim of support by every tool.
