@tscircuit/capacity-autorouter 0.0.209 → 0.0.211

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1209,6 +1209,29 @@ declare class AvailableSegmentPointSolver extends BaseSolver {
1209
1209
  visualize(): GraphicsObject;
1210
1210
  }
1211
1211
 
1212
+ /**
1213
+ * Precomputed parameters that can be shared across multiple PortPointPathingSolver instances.
1214
+ * These are computed once and passed to each solver to avoid redundant computation.
1215
+ */
1216
+ interface PrecomputedInitialParams {
1217
+ /** Map from nodeId to InputNodeWithPortPoints */
1218
+ nodeMap: Map<CapacityMeshNodeId, InputNodeWithPortPoints>;
1219
+ /** Average node pitch for heuristic calculations */
1220
+ avgNodePitch: number;
1221
+ /** Nodes with off-board connections */
1222
+ offBoardNodes: InputNodeWithPortPoints[];
1223
+ /** Map from portPointId to InputPortPoint */
1224
+ portPointMap: Map<string, InputPortPoint>;
1225
+ /** Map from nodeId to list of port points accessible from that node */
1226
+ nodePortPointsMap: Map<CapacityMeshNodeId, InputPortPoint[]>;
1227
+ /** Map from nodeId to assigned port points (empty initially, will be cloned per solver) */
1228
+ nodeAssignedPortPoints: Map<CapacityMeshNodeId, PortPoint[]>;
1229
+ /** Connections with results (NOT shuffled) - shuffling is done per solver */
1230
+ unshuffledConnectionsWithResults: ConnectionPathResult[];
1231
+ /** Map from connection name to goal node IDs */
1232
+ connectionNameToGoalNodeIds: Map<string, CapacityMeshNodeId[]>;
1233
+ }
1234
+
1212
1235
  interface PortPointPathingHyperParameters {
1213
1236
  SHUFFLE_SEED?: number;
1214
1237
  CENTER_OFFSET_DIST_PENALTY_FACTOR?: number;
@@ -1380,13 +1403,14 @@ declare class PortPointPathingSolver extends BaseSolver {
1380
1403
  offBoardNodes: InputNodeWithPortPoints[];
1381
1404
  /** Cache of base node cost (cost of node in current committed state) */
1382
1405
  private baseNodeCostCache;
1383
- constructor({ simpleRouteJson, inputNodes, capacityMeshNodes, colorMap, nodeMemoryPfMap, hyperParameters, }: {
1406
+ constructor({ simpleRouteJson, inputNodes, capacityMeshNodes, colorMap, nodeMemoryPfMap, hyperParameters, precomputedInitialParams, }: {
1384
1407
  simpleRouteJson: SimpleRouteJson;
1385
1408
  capacityMeshNodes: CapacityMeshNode[];
1386
1409
  inputNodes: InputNodeWithPortPoints[];
1387
1410
  colorMap?: Record<string, string>;
1388
1411
  nodeMemoryPfMap?: Map<CapacityMeshNodeId, number>;
1389
1412
  hyperParameters?: Partial<PortPointPathingHyperParameters>;
1413
+ precomputedInitialParams?: PrecomputedInitialParams;
1390
1414
  });
1391
1415
  private clearCostCaches;
1392
1416
  private clampPf;
@@ -1511,6 +1535,7 @@ interface HyperPortPointPathingSolverParams {
1511
1535
  }
1512
1536
  declare class HyperPortPointPathingSolver extends HyperParameterSupervisorSolver<PortPointPathingSolver> {
1513
1537
  private params;
1538
+ private precomputedInitialParams;
1514
1539
  constructor(params: HyperPortPointPathingSolverParams);
1515
1540
  getHyperParameterDefs(): Array<HyperParameterDef>;
1516
1541
  getCombinationDefs(): Array<string[]>;
@@ -3137,6 +3162,7 @@ interface CapacityMeshSolverOptions$1 {
3137
3162
  capacityDepth?: number;
3138
3163
  targetMinCapacity?: number;
3139
3164
  cacheProvider?: CacheProvider | null;
3165
+ effort?: number;
3140
3166
  }
3141
3167
  type PipelineStep$1<T extends new (...args: any[]) => BaseSolver> = {
3142
3168
  solverName: string;
@@ -3168,6 +3194,7 @@ declare class AssignableAutoroutingPipeline2 extends BaseSolver {
3168
3194
  multiSectionPortPointOptimizer?: MultiSectionPortPointOptimizer;
3169
3195
  viaDiameter: number;
3170
3196
  minTraceWidth: number;
3197
+ effort: number;
3171
3198
  startTimeOfPhase: Record<string, number>;
3172
3199
  endTimeOfPhase: Record<string, number>;
3173
3200
  timeSpentOnPhase: Record<string, number>;