diff --git a/src/OptAlgorithm/OptAlgorithm.py b/src/OptAlgorithm/OptAlgorithm.py index c86e411..e0e8108 100644 --- a/src/OptAlgorithm/OptAlgorithm.py +++ b/src/OptAlgorithm/OptAlgorithm.py @@ -116,7 +116,8 @@ class OptAlgorithm(AutoConfigClass): dF0 = self.a_max_1 * self.Ts["tclose_1_acc"] * self.k_hardness_1 dFmax = min(self.v_max_1 * self.k_hardness_1, sqrt(self.k_hardness_1/(self.mass_1))* self.Ftogrow) - self.Fmeet = 1/ self.freq * sqrt(self.freq**2 * self.Ftogrow**2 - dFmax**2) + eps = 1e1 + self.Fmeet = 1/ self.freq * sqrt(self.freq**2 * self.Ftogrow**2 - dFmax**2 + eps) tspeed = self.Ts["tspeed"] Fspeed = - self.eff_control * cos(self.freq * tspeed) + self.eff_control + 1/self.freq * dF0 * sin(self.freq * tspeed) if t < self.Ts["tspeed"]: diff --git a/src/OptAlgorithm/OptTimeCalculator.py b/src/OptAlgorithm/OptTimeCalculator.py index 5b103aa..d5b93af 100644 --- a/src/OptAlgorithm/OptTimeCalculator.py +++ b/src/OptAlgorithm/OptTimeCalculator.py @@ -173,7 +173,7 @@ class OptTimeCalculator(AutoConfigClass): t5max = (Tfull - v0/a)/2 - t1 v1 = v0 + a * t1 S1 = v0*t1 + a*t1*t1/2 + v1*t31 - a*t31*t31/2 - S2max = abs(Sfull) + abs(S1) + S2max = Sfull + S1 t5 = min(t5max, (vmax)/a, sqrt(S2max / a)) t3 = abs(v0)/a + t1 + t5 t32 = t5