Tactical assignment logic: scoring, spatial indexing, and feasibility filtering. Survival Mode: Costs degrade to Infinity on error; Filters safe-fail to empty lists.
Tactical assignment logic: scoring, spatial indexing, and feasibility filtering. Survival Mode: Costs degrade to Infinity on error; Filters safe-fail to empty lists.
(assign-sectors targets center sectors)Map targets/entities to sectors based on azimuth relative to center. Returns { :sector-id -> #{targets...} }. Gracefully ignores entities with invalid positions.
Map targets/entities to sectors based on azimuth relative to center.
Returns { :sector-id -> #{targets...} }.
Gracefully ignores entities with invalid positions.(cost-matrix candidates weights)Calculate weighted cost for each candidate. Returns { :id -> cost }. If any value is NaN/Inf OR MISSING, the total cost for that candidate becomes Infinite.
Calculate weighted cost for each candidate.
Returns { :id -> cost }.
If any value is NaN/Inf OR MISSING, the total cost for that candidate becomes Infinite.(filter-feasible candidates constraint-fn)Filter candidates based on a predicate function. Safely handles exceptions in the predicate (treating them as infeasible).
Filter candidates based on a predicate function. Safely handles exceptions in the predicate (treating them as infeasible).
(nearest-neighbor target candidates)Find the candidate closest to the target point (using squared distance). Handles both raw vectors and {:position ...} maps. Ignores candidates with invalid/missing positions.
Find the candidate closest to the target point (using squared distance).
Handles both raw vectors and {:position ...} maps.
Ignores candidates with invalid/missing positions.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |