Skip to content

Commit fbf18ad

Browse files
committed
wip explicit jump ration
1 parent f8a6280 commit fbf18ad

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

biome.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"noNonNullAssertion": "off",
5252
"useNumberNamespace": "off",
5353
"noParameterAssign": "off",
54+
"noInferrableTypes": "off",
5455
"useFilenamingConvention": {
5556
"level": "error",
5657
"options": {

lib/solvers/SimplifiedPathSolver/SingleSimplifiedPathSolver4_DistanceBased.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ export class SingleSimplifiedPathSolver4 extends SingleSimplifiedPathSolver {
2727
private tailDistanceAlongPath: number = 0
2828
private stepSize: number = 0.5 // Default step size, can be adjusted
2929

30+
TAIL_JUMP_RATIO: number = 0.8
31+
3032
constructor(
3133
public inputRoute: HighDensityIntraNodeRoute,
3234
public otherHdRoutes: HighDensityIntraNodeRoute[],
@@ -335,7 +337,8 @@ export class SingleSimplifiedPathSolver4 extends SingleSimplifiedPathSolver {
335337
// Path is not valid, add the middle segment
336338
const midDistance =
337339
this.tailDistanceAlongPath +
338-
(this.headDistanceAlongPath - this.tailDistanceAlongPath) / 2
340+
(this.headDistanceAlongPath - this.tailDistanceAlongPath) *
341+
this.TAIL_JUMP_RATIO
339342
const midPoint = this.getPointAtDistance(midDistance)
340343

341344
// Add the tail point if not already added

0 commit comments

Comments
 (0)