From 8d4866eb143aae3f212f35a59b3e9acc35e2cfb3 Mon Sep 17 00:00:00 2001 From: 1-Bart-1 Date: Thu, 14 Nov 2024 21:15:31 +0100 Subject: [PATCH 1/2] fix method overriding warning --- src/KPS4_3L.jl | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/KPS4_3L.jl b/src/KPS4_3L.jl index ef6386cd7..953f7d26b 100644 --- a/src/KPS4_3L.jl +++ b/src/KPS4_3L.jl @@ -555,18 +555,6 @@ function calc_acc_speed(motor::AsyncMachine, tether_vel, norm_, set_speed) end @register_symbolic calc_acc_speed(motor::AsyncMachine, tether_vel, norm_, set_speed) -function WinchModels.calc_acceleration(wm::TorqueControlledMachine, speed, force; set_torque=nothing, set_speed=nothing, use_brake = false) - omega = wm.set.gear_ratio/wm.set.drum_radius * speed - τ = WinchModels.calc_coulomb_friction(wm) * WinchModels.smooth_sign(omega) + WinchModels.calc_viscous_friction(wm, omega) - # calculate tau based on the set_torque - K = 1.0 - tau = set_torque * K - # calculate tau_total based on the friction - tau_total = tau + wm.set.drum_radius / wm.set.gear_ratio * force - τ - # calculate omega_dot_m based on tau_total and the inertia - omega_dot_m = tau_total/wm.set.inertia_total - return wm.set.drum_radius/wm.set.gear_ratio * omega_dot_m -end function calc_acc_torque(motor::TorqueControlledMachine, tether_vel, norm_, set_torque) calc_acceleration(motor, tether_vel, norm_; set_speed=nothing, set_torque, use_brake=false) end From 84eeaae9fac6345c734d2e71c752adc9a7ca3df6 Mon Sep 17 00:00:00 2001 From: 1-Bart-1 Date: Thu, 14 Nov 2024 21:16:49 +0100 Subject: [PATCH 2/2] move import --- examples/simple_3l_control.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/simple_3l_control.jl b/examples/simple_3l_control.jl index b3ce1c0b0..65ebf68dd 100644 --- a/examples/simple_3l_control.jl +++ b/examples/simple_3l_control.jl @@ -1,11 +1,11 @@ -using Revise, KiteModels, LinearAlgebra +using KiteModels, LinearAlgebra using Base: summarysize using Pkg if ! ("ControlPlots" ∈ keys(Pkg.project().dependencies)) using TestEnv; TestEnv.activate() end -using ControlPlots, StatsBase +using ControlPlots, StatsBase, Revise set = deepcopy(load_settings("system_3l.yaml")) # set.elevation = 71