Skip to content

PredictionOperation

PredictionOperation represents a single manufacturing operation within the production sequence for a brief element. Each operation contains detailed information about machine selection, material usage, sheet layouts, logistics calculations, and cost breakdowns. Operations are ordered sequentially to form the complete manufacturing process.

  • Define individual manufacturing steps in production sequence
  • Specify machine and material requirements for each operation
  • Calculate sheet layouts and optimize material usage
  • Track production timing (setup, rolling time)
  • Store logistics data (packing, pallets, delivery)
  • Break down costs by operation type
PropertyTypeDescription
idUUIDUnique identifier
partNumbernumberPart number (0-indexed, for multi-part products)
positionnumberOperation position in sequence (0-indexed)
operationIdUUIDReference to Operation entity
operationOperationOperation details (name, type, etc.)
predictionRequestComputedIdUUIDParent PredictionRequestComputed reference
PropertyTypeDescription
sheetQuantitynumberNumber of sheets required
sheetWidthnumberSheet width (mm)
sheetHeightnumberSheet height (mm)
layoutCountWidthnumberLayouts across width
layoutCountHeightnumberLayouts across height
sheetSurfacePurchasednumberPurchased sheet surface (mm²)
sheetSurfaceRequirednumberRequired sheet surface (mm²)
sheetUpgradenumberSheet upgrade factor
sheetMultiUpTotalRuleLengthnumberTotal rule length for multi-up
sheetCadMultiUpTotalRuleLengthnumberCAD-calculated rule length
sheetLayoutPatternstringLayout pattern code
sheetOptimiseByCadbooleanWhether CAD optimized layout
sheetCadPayloadCadPayloadCAD optimization data (JSONB)
sheetWidthInMachineDirectionSheetWidthInMachineDirectionSheet orientation in machine
PropertyTypeDescription
machineIdUUIDSelected machine reference
machineMachineMachine details
computedPacenumberProduction pace/speed
computedPaceUnitPaceMeasureUnitPace measurement unit (e.g., sheets/hour)
rollingTimenumberProduction rolling time (hours)
setupTimenumberMachine setup time (hours)
wasteTypeWasteBaseMeasureUnitWaste measurement unit
wasteTotalnumberTotal waste amount
machineRatesCoefficientSetIdUUIDRate coefficient set
machineRatesCoefficientSetMachineRateCoefficientSetRate coefficients for pricing
PropertyTypeDescription
corrugatedMaterialCompositionPriceIdUUIDCorrugated composition price reference
corrugatedMaterialCompositionPriceCorrugatedMaterialCompositionPriceComposition pricing details
corrugatedMaterialCompositionIdUUIDCorrugated composition reference
corrugatedMaterialCompositionCorrugatedMaterialCompositionComposition specification
materialReferenceSheetSizeIdUUIDMaterial sheet size reference
materialReferenceSheetSizeMaterialReferenceSheetSizeSheet size details
materialReferenceIdUUIDMaterial reference
materialReferenceMaterialReferenceMaterial details
compositionPricenumberComposition cost (€)
compositionStockbooleanWhether in stock
PropertyTypeDescription
productQuantitynumberProduct quantity for this operation
productWidthnumberProduct width (mm)
productHeightnumberProduct height (mm)
productCreasedbooleanWhether product is creased
productTotalSealingStripLengthnumberTotal sealing strip length (mm)
PropertyTypeDescription
sideSideNamePrinting side (FRONT, BACK, BOTH)
colorCountnumberNumber of colors
varnishCountnumberNumber of varnish applications
singleSideCreasebooleanSingle-sided crease
suppliesExtrafFlatCardBoardbooleanSupplies extra-flat cardboard
PropertyTypeDescription
palletCountnumberNumber of pallets
palletWidthnumberPallet width (mm)
palletLengthnumberPallet length (mm)
palletHeightnumberPallet height (mm)
palletIdstringPallet identifier
palletNamestringPallet name
palletMaximumHeightnumberMaximum pallet height (mm)
productPerPalletnumberProducts per pallet
productPerStacknumberProducts per stack
stackPerPalletnumberStacks per pallet
palletFloorEfficiencynumberFloor space efficiency (0-1)
palletVolumetricEfficiencynumberVolume efficiency (0-1)
palletPatternstringPallet pattern code
palletSolutionIdstringPallet solution identifier
palletAxisstringPallet orientation axis
maxProductPerPalletnumberMaximum products per pallet
maxWeightPerPalletnumberMaximum weight per pallet (kg)
maxHeightPerPalletnumberMaximum height per pallet (mm)
maxHeightConsumePercentPerPalletnumberHeight consumption percentage
palletProductPerLayernumberProducts per pallet layer
palletLayerCountnumberNumber of pallet layers
palletProductCountnumberTotal products on pallet
palletTotalWeightnumberTotal pallet weight (kg)
PropertyTypeDescription
boxCaseSolutionIdstringBox/case solution identifier
boxCasePatternstringBox/case pattern code
boxCaseAxisstringBox/case orientation axis
maxProductPerCasenumberMaximum products per case
maxWeightPerCasenumberMaximum weight per case (kg)
maxHeightPerCasenumberMaximum height per case (mm)
maxHeightConsumePercentPerCasenumberHeight consumption percentage
boxCaseFloorEfficiencynumberFloor space efficiency (0-1)
boxCaseVolumetricEfficiencynumberVolume efficiency (0-1)
boxCaseProductPerLayernumberProducts per case layer
boxCaseLayerCountnumberNumber of case layers
boxCaseWidthnumberCase width (mm)
boxCaseLengthnumberCase length (mm)
boxCaseHeightnumberCase height (mm)
boxCasePalletCountnumberCases per pallet
boxCaseCountnumberTotal number of cases
boxCaseTotalWeightnumberTotal case weight (kg)
PropertyTypeDescription
bundleWidthnumberBundle width (mm)
bundleLengthnumberBundle length (mm)
bundleHeightnumberBundle height (mm)
bundleWeightnumberBundle weight (kg)
bundleTotalWeightnumberTotal bundle weight (kg)
productPerBundlenumberProducts per bundle
bundleCountnumberNumber of bundles
PropertyTypeDescription
truckSolutionIdstringTruck solution identifier
truckPatternstringTruck loading pattern code
truckAxisstringTruck loading axis
maxPalletPerTrucknumberMaximum pallets per truck
maxWeightPerTrucknumberMaximum weight per truck (kg)
maxHeightPerTrucknumberMaximum height per truck (mm)
maxHeightConsumePercentPerTrucknumberHeight consumption percentage
truckFloorEfficiencynumberFloor space efficiency (0-1)
truckVolumetricEfficiencynumberVolume efficiency (0-1)
truckProductPerLayernumberProducts per truck layer
truckLayerCountnumberNumber of truck layers
truckWidthnumberTruck width (mm)
truckLengthnumberTruck length (mm)
truckHeightnumberTruck height (mm)
truckPalletCountnumberPallets per truck
truckCountnumberNumber of trucks
truckTotalWeightnumberTotal truck weight (kg)
linearMeterConsumedPerTrucknumberLinear meters consumed per truck
truckTotalLinearMeterConsumednumberTotal linear meters consumed
PropertyTypeDescription
productionPredictionCost[]Production costs breakdown
toolingPredictionCost[]Tooling costs
supplyPredictionCost[]Supply costs
deliveryPredictionCost[]Delivery costs
externalPredictionCost[]External provider costs
PropertyTypeDescription
providerIdUUIDExternal provider reference
providerProviderProvider details
metaOperationsstring[]Meta operation names (JSONB)
configNamesstring[]Configuration names (JSONB)
RelationshipEntityTypeDescription
predictionRequestComputedPredictionRequestComputedMany-to-OneParent manufacturing data
operationOperationMany-to-OneOperation definition
machineMachineMany-to-OneSelected machine
providerProviderMany-to-OneExternal provider
corrugatedMaterialCompositionPriceCorrugatedMaterialCompositionPriceMany-to-OneMaterial composition pricing
materialReferenceSheetSizeMaterialReferenceSheetSizeMany-to-OneSheet size specification
interface PredictionCost {
name: string; // Cost item name
cost: number; // Cost amount (€)
quantity?: number; // Quantity
unit?: string; // Unit of measurement
category?: string; // Cost category
}
interface CadPayload {
// CAD-specific optimization data
// Structure varies based on CAD system
[key: string]: any;
}

Operations are ordered by their position property to form the manufacturing sequence:

// Access operations in sequence order
const operations = predictionRequestComputed.predictionOperationSequence;
// Sort by position (0-indexed)
operations.sort((a, b) => a.position - b.position);
// Example: First operation (position: 0)
const firstOp = operations[0];
console.log(`Operation: ${firstOp.operation.name}`);
console.log(`Machine: ${firstOp.machine.name}`);
console.log(`Setup: ${firstOp.setupTime}h, Rolling: ${firstOp.rollingTime}h`);
console.log(`Sheets: ${firstOp.sheetQuantity} @ ${firstOp.sheetWidth}x${firstOp.sheetHeight}mm`);
// Material information
if (firstOp.corrugatedMaterialCompositionPrice) {
console.log(`Material: ${firstOp.corrugatedMaterialCompositionPrice.composition.name}`);
console.log(`Price: €${firstOp.compositionPrice}`);
}
// Production costs
if (firstOp.production) {
const totalProductionCost = firstOp.production.reduce((sum, cost) => sum + cost.cost, 0);
console.log(`Production cost: €${totalProductionCost}`);
}

For products with multiple parts, operations are grouped by partNumber:

// Group operations by part
const operationsByPart = operations.reduce((acc, op) => {
if (!acc[op.partNumber]) acc[op.partNumber] = [];
acc[op.partNumber].push(op);
return acc;
}, {});
// Process each part
Object.entries(operationsByPart).forEach(([partNum, partOps]) => {
console.log(`Part ${partNum}: ${partOps.length} operations`);
partOps.forEach(op => {
console.log(` ${op.position}. ${op.operation.name}`);
});
});
  1. Manufacturing Planning: Use operation sequence to plan production workflow
  2. Material Requirements: Calculate material needs from sheet dimensions and quantities
  3. Production Timing: Sum setupTime and rollingTime for total production time
  4. Machine Scheduling: Identify required machines for production planning
  5. Cost Analysis: Break down costs by operation type (production, tooling, supply, delivery, external)
  6. Logistics Planning: Use pallet, case, and truck data for shipping optimization
  7. CAD Integration: Access sheetCadPayload for CAD system integration
  • Position is 0-indexed: First operation in sequence is position 0
  • Part numbering: Multi-part products have operations grouped by partNumber (also 0-indexed)
  • Operation order matters: Operations must be executed in sequence order
  • JSONB fields: production, tooling, supply, delivery, external, metaOperations, configNames, and sheetCadPayload are stored as JSONB
  • Eager loading: operation, machine, provider, and related entities are eagerly loaded
  • Nullable relationships: Some relationships like provider, materialReference are optional
  • GET /briefs/:id/process/:position - Returns PredictionRequestComputed with full predictionOperationSequence
  • GET /briefs/:id/details - Returns complete brief with all operations