changedOutput schema / properties / pair / anyOf
Previous value: -[
- {
- "properties": {
- "a": {
- "properties": {
- "assembly_partial": {
- "default": false,
- "description": "True when this calculation is an assembly priced only in part: a component did not price, so unit_cost and total_cost cover the priced components only — a lower bound, not a price. It states no offer_price, is never ranked or called cheaper, and is never a quote; read its components with explain_cost.",
- "type": "boolean"
- },
- "calculation_id": {
- "type": "string"
- },
- "currency": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Currency this side's offer_price / unit_cost / total_cost are stated in."
- },
- "environment_changed_since_run": {
- "anyOf": [
- {
- "additionalProperties": true,
- "type": "object"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Null when this price was computed on its costing environment as it stands. Otherwise {latest_at}: the environment was edited after the run read it, and a new calculation prices with the current setup while this result does not."
- },
- "inputs_changed_since_run": {
- "anyOf": [
- {
- "additionalProperties": true,
- "type": "object"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Null when this price reflects every input on its part revision. Otherwise {roles, corrections, latest_at}: files attached and corrections applied to the part after the run read its inputs, which a new calculation reads and this one did not."
- },
- "lot_size": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "default": null
- },
- "machine": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null
- },
- "name": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null
- },
- "needs_review": {
- "default": false,
- "description": "True when this calculation is flagged for human review — its number is not a quote yet. The reasons are on the calculation.",
- "type": "boolean"
- },
- "offer_price": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "The headline: offer price per unit, cost-sheet surcharges included — the figure the calculation itself headlines (explain_cost's offer_price) and the one comparisons and rankings are struck on. Equal to unit_cost where the environment states no surcharges. Null until priced, and null on an assembly priced only in part (assembly_partial)."
- },
- "overhead_scheme": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Which overhead system unit_cost was built on: 'flat' when the cost sheet carries the flat variable overhead (overhead_var) inside unit_cost, 'ladder' when the environment states Material-/Fertigungsgemeinkosten, which switch that default off and sit above unit_cost; null when the result states neither."
- },
- "status": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null
- },
- "total_cost": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "unit_cost for the whole lot, on the same basis as unit_cost."
- },
- "unit_cost": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Unit cost per part: direct cost plus overhead_var and overhead_fixed. Where the costing environment states no Material-/Fertigungsgemeinkosten, overhead_var is the flat variable overhead (platform default 15 % of direct cost); once it states them, that default is 0 and those overheads sit above unit_cost as cost-sheet rungs, with administration and selling, margin and the other surcharges. Secondary: it is not like-for-like across environments, nor across overhead schemes (see overhead_scheme)."
- },
- "unit_time_s": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Production time per unit, in seconds."
- }
- },
- "required": [
- "calculation_id"
- ],
- "type": "object"
- },
- "b": {
- "properties": {
- "assembly_partial": {
- "default": false,
- "description": "True when this calculation is an assembly priced only in part: a component did not price, so unit_cost and total_cost cover the priced components only — a lower bound, not a price. It states no offer_price, is never ranked or called cheaper, and is never a quote; read its components with explain_cost.",
- "type": "boolean"
- },
- "calculation_id": {
- "type": "string"
- },
- "currency": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Currency this side's offer_price / unit_cost / total_cost are stated in."
- },
- "environment_changed_since_run": {
- "anyOf": [
- {
- "additionalProperties": true,
- "type": "object"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Null when this price was computed on its costing environment as it stands. Otherwise {latest_at}: the environment was edited after the run read it, and a new calculation prices with the current setup while this result does not."
- },
- "inputs_changed_since_run": {
- "anyOf": [
- {
- "additionalProperties": true,
- "type": "object"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Null when this price reflects every input on its part revision. Otherwise {roles, corrections, latest_at}: files attached and corrections applied to the part after the run read its inputs, which a new calculation reads and this one did not."
- },
- "lot_size": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "default": null
- },
- "machine": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null
- },
- "name": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null
- },
- "needs_review": {
- "default": false,
- "description": "True when this calculation is flagged for human review — its number is not a quote yet. The reasons are on the calculation.",
- "type": "boolean"
- },
- "offer_price": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "The headline: offer price per unit, cost-sheet surcharges included — the figure the calculation itself headlines (explain_cost's offer_price) and the one comparisons and rankings are struck on. Equal to unit_cost where the environment states no surcharges. Null until priced, and null on an assembly priced only in part (assembly_partial)."
- },
- "overhead_scheme": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Which overhead system unit_cost was built on: 'flat' when the cost sheet carries the flat variable overhead (overhead_var) inside unit_cost, 'ladder' when the environment states Material-/Fertigungsgemeinkosten, which switch that default off and sit above unit_cost; null when the result states neither."
- },
- "status": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null
- },
- "total_cost": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "unit_cost for the whole lot, on the same basis as unit_cost."
- },
- "unit_cost": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Unit cost per part: direct cost plus overhead_var and overhead_fixed. Where the costing environment states no Material-/Fertigungsgemeinkosten, overhead_var is the flat variable overhead (platform default 15 % of direct cost); once it states them, that default is 0 and those overheads sit above unit_cost as cost-sheet rungs, with administration and selling, margin and the other surcharges. Secondary: it is not like-for-like across environments, nor across overhead schemes (see overhead_scheme)."
- },
- "unit_time_s": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Production time per unit, in seconds."
- }
- },
- "required": [
- "calculation_id"
- ],
- "type": "object"
- },
- "comparable": {
- "description": "False if the two used different lot sizes, costing environments, currencies or overhead schemes, or either is an assembly priced only in part — see incomparable_reasons for which.",
- "type": "boolean"
- },
- "guidance": {
- "default": "",
- "description": "What the delta means and what to do next (alias of note for naming consistency with the other tools).",
- "type": "string"
- },
- "incomparable_reasons": {
- "description": "Why comparable is false: lot_size_mismatch, environment_mismatch, currency_mismatch and/or assembly_partial (the same vocabulary the REST comparison matrix uses), and cost_scheme_mismatch when one side's unit_cost carries the flat variable overhead and the other's a stated MGK/FGK ladder above it (unit_cost_delta is then null; compare at the offer price or Herstellkosten). Empty when comparable.",
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "note": {
- "type": "string"
- },
- "offer_price_delta": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "b − a offer price, per unit, in the shared currency — the delta that says which option is cheaper. Null when the two are quoted in different currencies — there is no FX rail, so a cross-currency difference would be an invented number — and when either side is an assembly priced only in part."
- },
- "offer_price_delta_pct": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "offer_price_delta as % of a; null wherever it is."
- },
- "unit_cost_delta": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "b − a unit cost (see CalcSide.unit_cost for what it holds), per unit, in the shared currency; null across currencies, across overhead schemes (cost_scheme_mismatch) and when either side is an assembly priced only in part. Secondary: it can point the other way from offer_price_delta when the two environments state different surcharges."
- },
- "unit_cost_delta_pct": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "unit_cost_delta as % of a; null wherever it is."
- },
- "unit_time_delta_s": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "b − a, production seconds per unit — time beside cost, so a cheaper option that is slower (capacity impact) is visible. Null when either side is an assembly priced only in part."
- }
- },
- "required": [
- "a",
- "b",
- "comparable",
- "note"
- ],
- "type": "object"
- },
- {
- "type": "null"
- }
-]New value: +[
+ {
+ "properties": {
+ "a": {
+ "properties": {
+ "assembly_partial": {
+ "default": false,
+ "description": "True when this calculation is an assembly priced only in part: a component did not price, so unit_cost and total_cost cover the priced components only — a lower bound, not a price. It states no offer_price, is never ranked or called cheaper, and is never a quote; read its components with explain_cost.",
+ "type": "boolean"
+ },
+ "calculation_id": {
+ "type": "string"
+ },
+ "currency": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Currency this side's offer_price / unit_cost / total_cost are stated in."
+ },
+ "environment_changed_since_run": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Null when this price was computed on its costing environment as it stands. Otherwise {latest_at}: the environment was edited after the run read it, and a new calculation prices with the current setup while this result does not."
+ },
+ "inputs_changed_since_run": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Null when this price reflects every input on its part revision. Otherwise {roles, corrections, latest_at}: files attached and corrections applied to the part after the run read its inputs, which a new calculation reads and this one did not."
+ },
+ "lot_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "machine": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "needs_review": {
+ "default": false,
+ "description": "True when this calculation is flagged for human review — its number is not a quote yet. The reasons are on the calculation.",
+ "type": "boolean"
+ },
+ "offer_price": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The headline: offer price per unit, cost-sheet surcharges included — the figure the calculation itself headlines (explain_cost's offer_price) and the one comparisons and rankings are struck on. Equal to unit_cost where the environment states no surcharges. Null until priced, and null on an assembly priced only in part (assembly_partial)."
+ },
+ "overhead_scheme": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Which overhead system unit_cost was built on: 'flat' when the cost sheet carries the flat variable overhead (overhead_var) inside unit_cost, 'ladder' when the environment states Material-/Fertigungsgemeinkosten, which switch that default off and sit above unit_cost; null when the result states neither."
+ },
+ "status": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "total_cost": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "unit_cost for the whole lot, on the same basis as unit_cost."
+ },
+ "unit_cost": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Unit cost per part: direct cost plus overhead_var and overhead_fixed. Where the costing environment states no Material-/Fertigungsgemeinkosten, overhead_var is the flat variable overhead the environment states (none by default); once it states them, those overheads sit above unit_cost as cost-sheet rungs, with administration and selling, margin and the other surcharges. Secondary: it is not like-for-like across environments, nor across overhead schemes (see overhead_scheme)."
+ },
+ "unit_time_s": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Production time per unit, in seconds."
+ }
+ },
+ "required": [
+ "calculation_id"
+ ],
+ "type": "object"
+ },
+ "b": {
+ "properties": {
+ "assembly_partial": {
+ "default": false,
+ "description": "True when this calculation is an assembly priced only in part: a component did not price, so unit_cost and total_cost cover the priced components only — a lower bound, not a price. It states no offer_price, is never ranked or called cheaper, and is never a quote; read its components with explain_cost.",
+ "type": "boolean"
+ },
+ "calculation_id": {
+ "type": "string"
+ },
+ "currency": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Currency this side's offer_price / unit_cost / total_cost are stated in."
+ },
+ "environment_changed_since_run": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Null when this price was computed on its costing environment as it stands. Otherwise {latest_at}: the environment was edited after the run read it, and a new calculation prices with the current setup while this result does not."
+ },
+ "inputs_changed_since_run": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Null when this price reflects every input on its part revision. Otherwise {roles, corrections, latest_at}: files attached and corrections applied to the part after the run read its inputs, which a new calculation reads and this one did not."
+ },
+ "lot_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "machine": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "needs_review": {
+ "default": false,
+ "description": "True when this calculation is flagged for human review — its number is not a quote yet. The reasons are on the calculation.",
+ "type": "boolean"
+ },
+ "offer_price": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The headline: offer price per unit, cost-sheet surcharges included — the figure the calculation itself headlines (explain_cost's offer_price) and the one comparisons and rankings are struck on. Equal to unit_cost where the environment states no surcharges. Null until priced, and null on an assembly priced only in part (assembly_partial)."
+ },
+ "overhead_scheme": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Which overhead system unit_cost was built on: 'flat' when the cost sheet carries the flat variable overhead (overhead_var) inside unit_cost, 'ladder' when the environment states Material-/Fertigungsgemeinkosten, which switch that default off and sit above unit_cost; null when the result states neither."
+ },
+ "status": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "total_cost": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "unit_cost for the whole lot, on the same basis as unit_cost."
+ },
+ "unit_cost": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Unit cost per part: direct cost plus overhead_var and overhead_fixed. Where the costing environment states no Material-/Fertigungsgemeinkosten, overhead_var is the flat variable overhead the environment states (none by default); once it states them, those overheads sit above unit_cost as cost-sheet rungs, with administration and selling, margin and the other surcharges. Secondary: it is not like-for-like across environments, nor across overhead schemes (see overhead_scheme)."
+ },
+ "unit_time_s": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Production time per unit, in seconds."
+ }
+ },
+ "required": [
+ "calculation_id"
+ ],
+ "type": "object"
+ },
+ "comparable": {
+ "description": "False if the two are different parts, were priced on different materials, used different lot sizes, costing environments, currencies or overhead schemes, or either is an assembly priced only in part — see incomparable_reasons for which.",
+ "type": "boolean"
+ },
+ "guidance": {
+ "default": "",
+ "description": "What the delta means and what to do next (alias of note for naming consistency with the other tools).",
+ "type": "string"
+ },
+ "incomparable_reasons": {
+ "description": "Why comparable is false: lot_size_mismatch, environment_mismatch, currency_mismatch and/or assembly_partial (the same vocabulary the REST comparison matrix uses); cost_scheme_mismatch when one side's unit_cost carries the flat variable overhead and the other's a stated MGK/FGK ladder above it (unit_cost_delta is then null; compare at the offer price or Herstellkosten); material_mismatch when they were priced on different materials (two grades, or a grade and the environment's default material); and different_part when they price two different parts (two revisions of one part are one part). Empty when comparable.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "note": {
+ "type": "string"
+ },
+ "offer_price_delta": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "b − a offer price, per unit, in the shared currency — the delta that says which option is cheaper. Null when the two are quoted in different currencies — there is no FX rail, so a cross-currency difference would be an invented number — and when either side is an assembly priced only in part."
+ },
+ "offer_price_delta_pct": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "offer_price_delta as % of a; null wherever it is."
+ },
+ "unit_cost_delta": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "b − a unit cost (see CalcSide.unit_cost for what it holds), per unit, in the shared currency; null across currencies, across overhead schemes (cost_scheme_mismatch) and when either side is an assembly priced only in part. Secondary: it can point the other way from offer_price_delta when the two environments state different surcharges."
+ },
+ "unit_cost_delta_pct": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "unit_cost_delta as % of a; null wherever it is."
+ },
+ "unit_time_delta_s": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "b − a, production seconds per unit — time beside cost, so a cheaper option that is slower (capacity impact) is visible. Null when either side is an assembly priced only in part."
+ }
+ },
+ "required": [
+ "a",
+ "b",
+ "comparable",
+ "note"
+ ],
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+]
changedOutput schema / properties / ranking / anyOf
Previous value: -[
- {
- "description": "N calculations ranked by offer price, lowest first, with time beside\ncost — what ``compare_calculations`` answers for 3 to 20 ids.",
- "properties": {
- "best_calculation_id": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "The cheapest priced option's id (the ranking winner), or null if none are priced yet."
- },
- "comparable": {
- "description": "True only when there are at least two priced options AND they share a lot size, costing environment, overhead scheme and currency. False either because the options are not like-with-like (the spread is then not purely the part) or because fewer than two are priced and there is nothing to compare — read `note` / `incomparable_reasons` for which.",
- "type": "boolean"
- },
- "guidance": {
- "default": "",
- "description": "What the ranking means and what to do next.",
- "type": "string"
- },
- "incomparable_reasons": {
- "description": "Why comparable is false: lot_size_mismatch, environment_mismatch, cost_scheme_mismatch (the flat variable overhead vs a stated MGK/FGK ladder: unit-cost deltas are then null) and/or currency_mismatch. On currency_mismatch the options are NOT ranked at all (no rank, no deltas, no winner): there is no FX rail, so a cross-currency order would be invented.",
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "note": {
- "type": "string"
- },
- "priced_count": {
- "description": "How many of the inputs carry a price.",
- "type": "integer"
- },
- "ranked": {
- "description": "Priced options by offer price, lowest first (rank 1…k), then any blocked / unpriced calcs and any assembly priced only in part (rank null) in the order given.",
- "items": {
- "description": "One calculation's place in an N-way ranking (lowest offer price first).",
- "properties": {
- "assembly_partial": {
- "default": false,
- "description": "True when this calculation is an assembly priced only in part: a component did not price, so unit_cost and total_cost cover the priced components only — a lower bound, not a price. It states no offer_price, is never ranked or called cheaper, and is never a quote; read its components with explain_cost.",
- "type": "boolean"
- },
- "calculation_id": {
- "type": "string"
- },
- "currency": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Currency this side's offer_price / unit_cost / total_cost are stated in."
- },
- "environment_changed_since_run": {
- "anyOf": [
- {
- "additionalProperties": true,
- "type": "object"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Null when this price was computed on its costing environment as it stands. Otherwise {latest_at}: the environment was edited after the run read it, and a new calculation prices with the current setup while this result does not."
- },
- "inputs_changed_since_run": {
- "anyOf": [
- {
- "additionalProperties": true,
- "type": "object"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Null when this price reflects every input on its part revision. Otherwise {roles, corrections, latest_at}: files attached and corrections applied to the part after the run read its inputs, which a new calculation reads and this one did not."
- },
- "lot_size": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "default": null
- },
- "machine": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null
- },
- "name": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null
- },
- "needs_review": {
- "default": false,
- "description": "True when this calculation is flagged for human review — its number is not a quote yet. The reasons are on the calculation.",
- "type": "boolean"
- },
- "offer_price": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "The headline: offer price per unit, cost-sheet surcharges included — the figure the calculation itself headlines (explain_cost's offer_price) and the one comparisons and rankings are struck on. Equal to unit_cost where the environment states no surcharges. Null until priced, and null on an assembly priced only in part (assembly_partial)."
- },
- "offer_price_delta_vs_best": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Offer-price premium per unit over the winner (0 for the winner)."
- },
- "offer_price_delta_vs_best_pct": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Premium as % of the winner's offer price."
- },
- "overhead_scheme": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Which overhead system unit_cost was built on: 'flat' when the cost sheet carries the flat variable overhead (overhead_var) inside unit_cost, 'ladder' when the environment states Material-/Fertigungsgemeinkosten, which switch that default off and sit above unit_cost; null when the result states neither."
- },
- "rank": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "1 = the priced option with the lowest offer_price. Null for a calc with no price yet (blocked / not succeeded) and for an assembly priced only in part (assembly_partial); those sort to the end."
- },
- "status": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null
- },
- "total_cost": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "unit_cost for the whole lot, on the same basis as unit_cost."
- },
- "unit_cost": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Unit cost per part: direct cost plus overhead_var and overhead_fixed. Where the costing environment states no Material-/Fertigungsgemeinkosten, overhead_var is the flat variable overhead (platform default 15 % of direct cost); once it states them, that default is 0 and those overheads sit above unit_cost as cost-sheet rungs, with administration and selling, margin and the other surcharges. Secondary: it is not like-for-like across environments, nor across overhead schemes (see overhead_scheme)."
- },
- "unit_cost_delta_vs_best": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "This option's unit cost minus the winner's (the winner is the lowest offer price). Negative when this option costs less to make but more to buy: its environment states larger cost-sheet surcharges than the winner's. Null when the options use different overhead schemes (cost_scheme_mismatch)."
- },
- "unit_cost_delta_vs_best_pct": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "unit_cost_delta_vs_best as % of the winner's unit cost."
- },
- "unit_time_delta_vs_best_s": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Production seconds/unit vs the cheapest option — so a cheaper winner that is slower (capacity impact) stays visible."
- },
- "unit_time_s": {
- "anyOf": [
- {
- "type": "number"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Production time per unit, in seconds."
- }
- },
- "required": [
- "calculation_id"
- ],
- "type": "object"
- },
- "type": "array"
- },
- "total_count": {
- "description": "How many distinct calculations were ranked.",
- "type": "integer"
- }
- },
- "required": [
- "ranked",
- "priced_count",
- "total_count",
- "comparable",
- "note"
- ],
- "type": "object"
- },
- {
- "type": "null"
- }
-]New value: +[
+ {
+ "description": "N calculations ranked by offer price, lowest first, with time beside\ncost — what ``compare_calculations`` answers for 3 to 20 ids.",
+ "properties": {
+ "best_calculation_id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The cheapest priced option's id (the ranking winner), or null if none are priced yet."
+ },
+ "comparable": {
+ "description": "True only when there are at least two priced options AND they are one part, priced on one material, and share a lot size, costing environment, overhead scheme and currency. False either because the options are not like-with-like (incomparable_reasons names what differs) or because fewer than two are priced and there is nothing to compare — read `note` / `incomparable_reasons` for which.",
+ "type": "boolean"
+ },
+ "guidance": {
+ "default": "",
+ "description": "What the ranking means and what to do next.",
+ "type": "string"
+ },
+ "incomparable_reasons": {
+ "description": "Why comparable is false: lot_size_mismatch, environment_mismatch, cost_scheme_mismatch (the flat variable overhead vs a stated MGK/FGK ladder: unit-cost deltas are then null), currency_mismatch, material_mismatch (priced on different materials: two grades, or a grade and the environment's default material) and/or different_part (not all one part; two revisions of one part are one part). On currency_mismatch the options are NOT ranked at all (no rank, no deltas, no winner): there is no FX rail, so a cross-currency order would be invented.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "note": {
+ "type": "string"
+ },
+ "priced_count": {
+ "description": "How many of the inputs carry a price.",
+ "type": "integer"
+ },
+ "ranked": {
+ "description": "Priced options by offer price, lowest first (rank 1…k), then any blocked / unpriced calcs and any assembly priced only in part (rank null) in the order given.",
+ "items": {
+ "description": "One calculation's place in an N-way ranking (lowest offer price first).",
+ "properties": {
+ "assembly_partial": {
+ "default": false,
+ "description": "True when this calculation is an assembly priced only in part: a component did not price, so unit_cost and total_cost cover the priced components only — a lower bound, not a price. It states no offer_price, is never ranked or called cheaper, and is never a quote; read its components with explain_cost.",
+ "type": "boolean"
+ },
+ "calculation_id": {
+ "type": "string"
+ },
+ "currency": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Currency this side's offer_price / unit_cost / total_cost are stated in."
+ },
+ "environment_changed_since_run": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Null when this price was computed on its costing environment as it stands. Otherwise {latest_at}: the environment was edited after the run read it, and a new calculation prices with the current setup while this result does not."
+ },
+ "inputs_changed_since_run": {
+ "anyOf": [
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Null when this price reflects every input on its part revision. Otherwise {roles, corrections, latest_at}: files attached and corrections applied to the part after the run read its inputs, which a new calculation reads and this one did not."
+ },
+ "lot_size": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "machine": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "needs_review": {
+ "default": false,
+ "description": "True when this calculation is flagged for human review — its number is not a quote yet. The reasons are on the calculation.",
+ "type": "boolean"
+ },
+ "offer_price": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The headline: offer price per unit, cost-sheet surcharges included — the figure the calculation itself headlines (explain_cost's offer_price) and the one comparisons and rankings are struck on. Equal to unit_cost where the environment states no surcharges. Null until priced, and null on an assembly priced only in part (assembly_partial)."
+ },
+ "offer_price_delta_vs_best": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Offer-price premium per unit over the winner (0 for the winner)."
+ },
+ "offer_price_delta_vs_best_pct": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Premium as % of the winner's offer price."
+ },
+ "overhead_scheme": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Which overhead system unit_cost was built on: 'flat' when the cost sheet carries the flat variable overhead (overhead_var) inside unit_cost, 'ladder' when the environment states Material-/Fertigungsgemeinkosten, which switch that default off and sit above unit_cost; null when the result states neither."
+ },
+ "rank": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "1 = the priced option with the lowest offer_price. Null for a calc with no price yet (blocked / not succeeded) and for an assembly priced only in part (assembly_partial); those sort to the end."
+ },
+ "status": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "total_cost": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "unit_cost for the whole lot, on the same basis as unit_cost."
+ },
+ "unit_cost": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Unit cost per part: direct cost plus overhead_var and overhead_fixed. Where the costing environment states no Material-/Fertigungsgemeinkosten, overhead_var is the flat variable overhead the environment states (none by default); once it states them, those overheads sit above unit_cost as cost-sheet rungs, with administration and selling, margin and the other surcharges. Secondary: it is not like-for-like across environments, nor across overhead schemes (see overhead_scheme)."
+ },
+ "unit_cost_delta_vs_best": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "This option's unit cost minus the winner's (the winner is the lowest offer price). Negative when this option costs less to make but more to buy: its environment states larger cost-sheet surcharges than the winner's. Null when the options use different overhead schemes (cost_scheme_mismatch)."
+ },
+ "unit_cost_delta_vs_best_pct": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "unit_cost_delta_vs_best as % of the winner's unit cost."
+ },
+ "unit_time_delta_vs_best_s": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Production seconds/unit vs the cheapest option — so a cheaper winner that is slower (capacity impact) stays visible."
+ },
+ "unit_time_s": {
+ "anyOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Production time per unit, in seconds."
+ }
+ },
+ "required": [
+ "calculation_id"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "total_count": {
+ "description": "How many distinct calculations were ranked.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "ranked",
+ "priced_count",
+ "total_count",
+ "comparable",
+ "note"
+ ],
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+]