Modelling guide
Work that repeats a varying number of times
The same work is done several times on one unit, and how many times depends on the unit: holes per plate, welds per frame, screws per cover.
Pattern Existing features combined; the result is exact.
How
Give the capability a time per repetition and a unit whose resolver counts the repetitions for each unit:
"resolvers": { "flat": "1", "s": "1", "hole": "Math.ceil(P.plate_length / 0.25)" },
"capabilities": [{ "id": "cap_drill", "name": "Drill holes", "task": "Drill holes", "time": 8, "unit": "hole" }]
The count can come from a product dimension (P.<product id>_<axis>), a number option (ui_type: "number") or any formula of them. Each unit is timed with its own count; Auto Generate sizes for the expected one.
Check
Plates are 1-3 m long and get a hole per 0.25 m, 8 s per hole: 32-96 s, 64 s on average. One drill keeps up with the 180 s takt and the shift's 160 plates are made.