diff --git a/src/OptAlgorithm/OptTimeCalculator.py b/src/OptAlgorithm/OptTimeCalculator.py index 0cf738e..87d0e8c 100644 --- a/src/OptAlgorithm/OptTimeCalculator.py +++ b/src/OptAlgorithm/OptTimeCalculator.py @@ -204,8 +204,10 @@ class OptTimeCalculator(AutoConfigClass): self.allTimes["tmovement"] = T def calcFirstClose(self, T : float, s : float) -> tuple[float, float]: + v0q = min(sqrt(2 * self.a_max_1 * s), self.v_max_1) + v0 = min(v0q, sqrt(1/(self.k_hardness_1*self.mass_1))* self.Ftogrow) t1 = T - sqrt(max(0, T**2 - 2 * s / self.a_max_1)) - t1 = min(t1, self.v_max_1 / self.a_max_1) + t1 = min(t1, v0 / self.a_max_1) t2 = sqrt(max(0, T**2 - 2 * s / self.a_max_1)) return t1, t2