Something went wrong. Try again.
A functional toolkit for authoring resource-leveling algorithms — compose constraint and scoring blocks, enumerate feasible schedules
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408{ "levelsetVersion": "0.1.0", "formatVersion": 1, "composition": { "order": [ "constraint", "scorer", "search", "collector" ], "follows": { "constraint": [ "constraint", "scorer", "search" ], "scorer": [ "scorer", "search" ], "search": [ "collector" ], "collector": [ "collector" ] }, "cardinality": { "constraint": { "min": 0, "max": null }, "scorer": { "min": 0, "max": null }, "search": { "min": 1, "max": 1 }, "collector": { "min": 0, "max": null } } }, "authoring": { "instance": { "reservedParamNames": [ "code", "provenance", "shadow", "enabled" ], "enabledWhenOmitted": true, "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "instanceId": { "type": "string" }, "code": { "type": "string" }, "params": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "provenance": { "default": "curated", "type": "string", "enum": [ "curated", "candidate" ] }, "shadow": { "default": false, "type": "boolean" }, "enabled": { "type": "boolean" } }, "required": [ "instanceId", "code", "params" ] } }, "sweep": { "enabledTarget": "$enabled", "defaultMaxCombinations": 64, "hardMaxCombinations": 4096, "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "axes": { "minItems": 1, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "targets": { "minItems": 1, "type": "array", "items": { "type": "object", "properties": { "instanceId": { "type": "string", "minLength": 1 }, "paramPath": { "type": "string", "minLength": 1 }, "valueKey": { "type": "string", "minLength": 1 } }, "required": [ "instanceId", "paramPath" ], "additionalProperties": false } }, "values": { "minItems": 1, "type": "array", "items": { "$ref": "#/$defs/__schema0" } } }, "required": [ "id", "targets", "values" ], "additionalProperties": false } }, "maxCombinations": { "default": 64, "type": "integer", "exclusiveMinimum": 0, "maximum": 4096 } }, "required": [ "axes" ], "additionalProperties": false, "$defs": { "__schema0": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" }, { "type": "array", "items": { "$ref": "#/$defs/__schema0" } }, { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "$ref": "#/$defs/__schema0" } } ] } } } }, "objective": { "lexicographicTierSchema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "anyOf": [ { "type": "string" }, { "type": "object", "properties": { "weightedSum": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "number" } } }, "required": [ "weightedSum" ], "additionalProperties": false } ] } } }, "blocks": [ { "code": "levelset.MaxConcurrentResource.v1", "family": "constraint", "tier": "estimator", "doc": { "nl": "At most N tasks may simultaneously demand the named resource on any working day.", "pseudocode": "forall day d: count(t demanding r and active(t,d)) <= max" }, "defaultShadow": { "resourceUniqueId": 0, "max": 1 }, "assumptionTemplate": "at most {max} concurrent tasks on resource {resourceUniqueId}", "inputSchema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "resourceUniqueId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "max": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "resourceUniqueId", "max" ] }, "fields": [ { "path": "resourceUniqueId", "kind": "number", "label": "resourceUniqueId", "integer": true, "defaultValue": 0 }, { "path": "max", "kind": "number", "label": "max", "min": 1, "integer": true, "defaultValue": 1 } ], "variadic": [], "complexParams": [] }, { "code": "levelset.PeakCap.v1", "family": "constraint", "tier": "estimator", "doc": { "nl": "Summed fractional unit demand on the named resource may not exceed the cap on any working day (optionally within a day window).", "pseudocode": "forall day d [in window]: sum(units of active tasks demanding r) <= cap" }, "defaultShadow": { "resourceUniqueId": 0, "cap": 1 }, "assumptionTemplate": "peak demand on resource {resourceUniqueId} capped at {cap} units", "inputSchema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "resourceUniqueId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "cap": { "type": "number", "exclusiveMinimum": 0 }, "window": { "type": "object", "properties": { "fromDay": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "toDay": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "fromDay", "toDay" ] } }, "required": [ "resourceUniqueId", "cap" ] }, "fields": [ { "path": "resourceUniqueId", "kind": "number", "label": "resourceUniqueId", "integer": true, "defaultValue": 0 }, { "path": "cap", "kind": "number", "label": "cap", "min": 0, "integer": false, "defaultValue": 1 }, { "path": "window.fromDay", "kind": "number", "label": "fromDay", "min": 0, "integer": true }, { "path": "window.toDay", "kind": "number", "label": "toDay", "min": 0, "integer": true } ], "variadic": [], "complexParams": [] }, { "code": "levelset.ConcurrentUnitsLimit.v1", "family": "constraint", "tier": "estimator", "doc": { "nl": "At most N work units may have active work on any single day (optionally scoped to one discipline) — a WIP cap that prioritizes finishing open units before starting more.", "pseudocode": "forall day d: count(u in units where any task of u active on d) <= max" }, "defaultShadow": { "unitIds": [], "max": 1 }, "assumptionTemplate": "at most {max} work units open at once", "inputSchema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "unitIds": { "type": "array", "items": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "discipline": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "max": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "unitIds", "max" ] }, "fields": [ { "path": "discipline", "kind": "number", "label": "discipline", "integer": true }, { "path": "max", "kind": "number", "label": "max", "min": 1, "integer": true, "defaultValue": 1 } ], "variadic": [ { "path": "unitIds", "label": "unitIds", "itemKind": "number", "integer": true, "minItems": 0, "emptySeed": 0, "defaultValues": [] } ], "complexParams": [] }, { "code": "levelset.Deadline.v1", "family": "constraint", "tier": "estimator", "doc": { "nl": "The task must finish on or before the given day index; later placements are rejected.", "pseudocode": "finish(task) <= latestFinish" }, "defaultShadow": { "taskUniqueId": 0, "latestFinish": 0 }, "assumptionTemplate": "task {taskUniqueId} finishes by day {latestFinish}", "inputSchema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "taskUniqueId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "latestFinish": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "taskUniqueId", "latestFinish" ] }, "fields": [ { "path": "taskUniqueId", "kind": "number", "label": "taskUniqueId", "integer": true, "defaultValue": 0 }, { "path": "latestFinish", "kind": "number", "label": "latestFinish", "min": 0, "integer": true, "defaultValue": 0 } ], "variadic": [], "complexParams": [] }, { "code": "levelset.Release.v1", "family": "constraint", "tier": "estimator", "doc": { "nl": "The task may not start before the given day index.", "pseudocode": "start(task) >= earliestStart" }, "defaultShadow": { "taskUniqueId": 0, "earliestStart": 0 }, "assumptionTemplate": "task {taskUniqueId} starts no earlier than day {earliestStart}", "inputSchema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "taskUniqueId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "earliestStart": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "taskUniqueId", "earliestStart" ] }, "fields": [ { "path": "taskUniqueId", "kind": "number", "label": "taskUniqueId", "integer": true, "defaultValue": 0 }, { "path": "earliestStart", "kind": "number", "label": "earliestStart", "min": 0, "integer": true, "defaultValue": 0 } ], "variadic": [], "complexParams": [] }, { "code": "levelset.PhaseRelease.v1", "family": "constraint", "tier": "estimator", "doc": { "nl": "Every task in the phase may start no earlier than the shared day index.", "pseudocode": "for task in phase: start(task) >= earliestStart" }, "defaultShadow": { "taskUniqueIds": [ 0 ], "earliestStart": 0 }, "assumptionTemplate": "phase tasks start no earlier than day {earliestStart}", "inputSchema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "taskUniqueIds": { "minItems": 1, "type": "array", "items": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "earliestStart": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "taskUniqueIds", "earliestStart" ] }, "fields": [ { "path": "earliestStart", "kind": "number", "label": "earliestStart", "min": 0, "integer": true, "defaultValue": 0 } ], "variadic": [ { "path": "taskUniqueIds", "label": "taskUniqueIds", "itemKind": "number", "integer": true, "minItems": 1, "emptySeed": 0, "defaultValues": [ 0 ] } ], "complexParams": [] }, { "code": "levelset.ModeSelection.v1", "family": "constraint", "tier": "engineer", "doc": { "nl": "The task runs in exactly one of the listed modes — alternative duration and resource-demand pairs. Order is preference: a later mode is chosen only when it starts the task strictly earlier.", "pseudocode": "(duration(task), demand(task)) = modes[chosen], chosen in modeIds" }, "defaultShadow": { "taskUniqueId": 0, "modes": [ { "modeId": 1, "durationDays": 1, "resourceDemand": [] } ] }, "assumptionTemplate": "task {taskUniqueId} chooses among its listed duration/crew modes", "inputSchema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "taskUniqueId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "modes": { "minItems": 1, "type": "array", "items": { "type": "object", "properties": { "modeId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "durationDays": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "resourceDemand": { "type": "array", "items": { "type": "object", "properties": { "resourceUniqueId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "units": { "type": "number", "exclusiveMinimum": 0 } }, "required": [ "resourceUniqueId", "units" ] } } }, "required": [ "modeId", "durationDays", "resourceDemand" ] } } }, "required": [ "taskUniqueId", "modes" ] }, "fields": [ { "path": "taskUniqueId", "kind": "number", "label": "taskUniqueId", "integer": true, "defaultValue": 0 } ], "variadic": [], "complexParams": [ "modes" ] }, { "code": "levelset.CrewBorrow.v1", "family": "constraint", "tier": "engineer", "doc": { "nl": "Listed tasks prefer their static home-crew assignment, but may substitute the borrow crew when that starts the task earlier.", "pseudocode": "modes(task) = [static demand, static demand with home resource replaced by borrow]" }, "defaultShadow": { "taskUniqueIds": [ 0 ], "homeResourceUniqueId": 0, "borrowResourceUniqueId": 1 }, "assumptionTemplate": "listed tasks may substitute resource {borrowResourceUniqueId} for home resource {homeResourceUniqueId}", "inputSchema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "taskUniqueIds": { "minItems": 1, "type": "array", "items": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "homeResourceUniqueId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "borrowResourceUniqueId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "taskUniqueIds", "homeResourceUniqueId", "borrowResourceUniqueId" ], "additionalProperties": false }, "fields": [ { "path": "homeResourceUniqueId", "kind": "number", "label": "homeResourceUniqueId", "integer": true, "defaultValue": 0 }, { "path": "borrowResourceUniqueId", "kind": "number", "label": "borrowResourceUniqueId", "integer": true, "defaultValue": 1 } ], "variadic": [ { "path": "taskUniqueIds", "label": "taskUniqueIds", "itemKind": "number", "integer": true, "minItems": 1, "emptySeed": 0, "defaultValues": [ 0 ] } ], "complexParams": [] }, { "code": "levelset.ConcurrentResourceCost.v1", "family": "scorer", "tier": "estimator", "doc": { "nl": "Exponential per-day penalty on concurrent demand: each marginal worker beyond threshold costs growthBase× more than the previous one.", "pseudocode": "sum_d (load[d] > threshold ? basePrice * (growthBase^(load[d] - threshold) - 1) : 0)" }, "defaultShadow": { "resourceUniqueId": 0, "basePrice": 100, "growthBase": 2, "threshold": 0 }, "inputSchema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "resourceUniqueId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "basePrice": { "type": "number", "exclusiveMinimum": 0 }, "growthBase": { "type": "number", "exclusiveMinimum": 1 }, "threshold": { "default": 0, "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "resourceUniqueId", "basePrice", "growthBase" ] }, "fields": [ { "path": "resourceUniqueId", "kind": "number", "label": "resourceUniqueId", "integer": true, "defaultValue": 0 }, { "path": "basePrice", "kind": "number", "label": "basePrice", "min": 0, "integer": false, "defaultValue": 100 }, { "path": "growthBase", "kind": "number", "label": "growthBase", "min": 1, "integer": false, "defaultValue": 2 }, { "path": "threshold", "kind": "number", "label": "threshold", "min": 0, "integer": true, "defaultValue": 0 } ], "variadic": [], "complexParams": [] }, { "code": "levelset.OpenUnitPenalty.v1", "family": "scorer", "tier": "estimator", "doc": { "nl": "Soft WIP penalty: prices each open-unit-day beyond a free allowance (softMax), where a unit is open across its whole span including idle gaps. Pressures the schedule to finish units before opening more.", "pseudocode": "sum_d weight * max(0, count(u open on d) - softMax)" }, "defaultShadow": { "unitIds": [], "softMax": 0, "weight": 1 }, "inputSchema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "unitIds": { "type": "array", "items": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "discipline": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "softMax": { "default": 0, "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "weight": { "default": 1, "type": "number", "exclusiveMinimum": 0 } }, "required": [ "unitIds" ] }, "fields": [ { "path": "discipline", "kind": "number", "label": "discipline", "integer": true }, { "path": "softMax", "kind": "number", "label": "softMax", "min": 0, "integer": true, "defaultValue": 0 }, { "path": "weight", "kind": "number", "label": "weight", "min": 0, "integer": false, "defaultValue": 1 } ], "variadic": [ { "path": "unitIds", "label": "unitIds", "itemKind": "number", "integer": true, "minItems": 0, "emptySeed": 0, "defaultValues": [] } ], "complexParams": [] }, { "code": "levelset.HiringLagPenalty.v1", "family": "scorer", "tier": "estimator", "doc": { "nl": "Penalty for headcount increases on a resource: each week-over-week rise counts as new hires that cost (trainingWeeks × costPerCrewWeek) before becoming productive.", "pseudocode": "hires = profile[0] + sum_{w>0} max(0, profile[w] - profile[w-1]); penalty = hires * trainingWeeks * costPerCrewWeek" }, "defaultShadow": { "resourceUniqueId": 0, "trainingWeeks": 2, "costPerCrewWeek": 1000 }, "inputSchema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "resourceUniqueId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "trainingWeeks": { "type": "number", "exclusiveMinimum": 0 }, "costPerCrewWeek": { "type": "number", "minimum": 0 } }, "required": [ "resourceUniqueId", "trainingWeeks", "costPerCrewWeek" ] }, "fields": [ { "path": "resourceUniqueId", "kind": "number", "label": "resourceUniqueId", "integer": true, "defaultValue": 0 }, { "path": "trainingWeeks", "kind": "number", "label": "trainingWeeks", "min": 0, "integer": false, "defaultValue": 2 }, { "path": "costPerCrewWeek", "kind": "number", "label": "costPerCrewWeek", "min": 0, "integer": false, "defaultValue": 1000 } ], "variadic": [], "complexParams": [] }, { "code": "levelset.PhaseLateness.v1", "family": "scorer", "tier": "estimator", "doc": { "nl": "Completion-priority penalty: for each phase, the working days its latest task finishes past the phase's target day, weighted by the phase's completion-priority weight and summed. A finish boundary at or before the target costs nothing — note the boundary is the exclusive finishDay index (finishDay d+1 for last work on day d), not the calendar date of that last work.", "pseudocode": "sum_p weight_p * workingDays(target_p, max(finish(t) for t in phase_p)) when that finish is late" }, "defaultShadow": { "phases": [] }, "inputSchema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "phases": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "taskUniqueIds": { "type": "array", "items": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "targetDay": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "weight": { "default": 1, "type": "number", "exclusiveMinimum": 0 } }, "required": [ "taskUniqueIds", "targetDay" ] } } }, "required": [ "phases" ] }, "fields": [], "variadic": [], "complexParams": [ "phases" ] }, { "code": "levelset.PhaseEarliness.v1", "family": "scorer", "tier": "estimator", "doc": { "nl": "Early-start penalty: for each phase, the working days its earliest task starts before the phase's target day, weighted by the phase's completion-priority weight and summed. Starting on or after target costs nothing.", "pseudocode": "sum_p weight_p * workingDays(min(start(t) for t in phase_p), target_p) when that start is early" }, "defaultShadow": { "phases": [] }, "inputSchema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "phases": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "taskUniqueIds": { "type": "array", "items": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "targetDay": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "weight": { "default": 1, "type": "number", "exclusiveMinimum": 0 } }, "required": [ "taskUniqueIds", "targetDay" ] } } }, "required": [ "phases" ] }, "fields": [], "variadic": [], "complexParams": [ "phases" ] }, { "code": "levelset.UnimodalDeviation.v1", "family": "scorer", "tier": "engineer", "doc": { "nl": "Magnitude of off-pattern dips before the dominant peak and bumps after it. Zero for a strictly unimodal profile within jitter tolerance.", "pseudocode": "sum(drop_i for i ≤ peak if drop_i > tol) + sum(rise_i for i > peak after descent if !allowSecondPeak || nth>1)" }, "defaultShadow": { "resourceUniqueId": 0, "allowSecondPeak": false, "jitterTolerance": 1 }, "inputSchema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "resourceUniqueId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "allowSecondPeak": { "default": false, "type": "boolean" }, "jitterTolerance": { "default": 1, "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "resourceUniqueId" ] }, "fields": [ { "path": "resourceUniqueId", "kind": "number", "label": "resourceUniqueId", "integer": true, "defaultValue": 0 }, { "path": "allowSecondPeak", "kind": "checkbox", "label": "allowSecondPeak", "defaultValue": false }, { "path": "jitterTolerance", "kind": "number", "label": "jitterTolerance", "min": 0, "integer": true, "defaultValue": 1 } ], "variadic": [], "complexParams": [] }, { "code": "levelset.Makespan.v1", "family": "scorer", "tier": "sales", "doc": { "nl": "The latest finish day across all tasks — the schedule's total length.", "pseudocode": "max(finish(task) for task in tasks)" }, "defaultShadow": {}, "inputSchema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {} }, "fields": [], "variadic": [], "complexParams": [] }, { "code": "levelset.SerialSGS.v1", "family": "search", "tier": "engineer", "doc": { "nl": "Greedy serial schedule-generation scheme: topological order, earliest feasible placement per task. Deterministic, single schedule per run.", "pseudocode": "for task in topo order: place at earliest day satisfying precedence + caps" }, "defaultShadow": {}, "inputSchema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {} }, "fields": [], "variadic": [], "complexParams": [] }, { "code": "levelset.KBest.v1", "family": "collector", "tier": "engineer", "doc": { "nl": "Keeps the best k schedules, ranked lexicographically over the referenced scorers (order matters).", "pseudocode": "sort(candidates, lex(by)).slice(0, k)" }, "defaultShadow": { "k": 3, "by": [ "makespan" ] }, "inputSchema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "k": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "by": { "minItems": 1, "type": "array", "items": { "type": "string" } } }, "required": [ "k", "by" ] }, "fields": [ { "path": "k", "kind": "number", "label": "k", "min": 1, "integer": true, "defaultValue": 3 } ], "variadic": [ { "path": "by", "label": "by", "itemKind": "text", "integer": false, "minItems": 1, "emptySeed": "", "defaultValues": [ "makespan" ] } ], "complexParams": [] }, { "code": "levelset.Pareto.v1", "family": "collector", "tier": "engineer", "doc": { "nl": "Keeps the non-dominated set across the referenced scorers — the Pareto frontier.", "pseudocode": "candidates.filter(c => !candidates.some(o => dominates(o, c, over)))" }, "defaultShadow": { "over": [ "makespan", "cost" ] }, "inputSchema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "over": { "minItems": 1, "type": "array", "items": { "type": "string" } } }, "required": [ "over" ] }, "fields": [], "variadic": [ { "path": "over", "label": "over", "itemKind": "text", "integer": false, "minItems": 1, "emptySeed": "", "defaultValues": [ "makespan", "cost" ] } ], "complexParams": [] }, { "code": "levelset.Gate.v1", "family": "collector", "tier": "engineer", "doc": { "nl": "Keeps only schedules that satisfy every limit; when none pass, returns nothing or the single least-bad schedule.", "pseudocode": "pass = candidates.filter(within all limits); pass.length ? pass : (fallback == 'leastBad' ? [leastViolating(candidates)] : [])" }, "defaultShadow": { "limits": [ { "scorer": "makespan", "max": 0 } ], "fallback": "none" }, "inputSchema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "limits": { "minItems": 1, "type": "array", "items": { "type": "object", "properties": { "scorer": { "type": "string" }, "max": { "type": "number" }, "min": { "type": "number" } }, "required": [ "scorer" ] } }, "fallback": { "type": "string", "enum": [ "leastBad", "none" ] } }, "required": [ "limits", "fallback" ] }, "fields": [ { "path": "fallback", "kind": "dropdown", "label": "fallback", "options": [ "leastBad", "none" ], "defaultValue": "none" } ], "variadic": [], "complexParams": [ "limits" ] } ]}