<jupyter_start><jupyter_text>Load model<jupyter_code>%load_ext autoreload
%autoreload 2
import cloudpickle
import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import ode
from IPython.display import HTML
from utils import *
f = cloudpickle.load(open('./swing_dynamic.dll', 'rb'))
t = np.arange(0, 10, 0.01)
y0 = np.array([np.deg2rad(30), 0, 0, 0, 0, 0])
u0 = np.array([0, 0])
con0 = np.array([100, 10, 0.01, np.deg2rad(80)])
param0 = np.array([1, 1, 1, 
                   1/12, 1/12, 1/12,
                   1.5, 1, 1, 1, 
                   0.5, 0.5, 0.5,
                   0.8, 0.2, 
                   9.8])
r = ode(f).set_f_params()
x = np.linspace(-2, 2, 50)
y = (1 / (1 + np.exp( (-x-1)/ 0.01))) * 1 / (1 + np.exp( (x-1)/ 0.01))
plt.plot(x, y)
plt.show()
omega = np.array([1, 1])
amp = np.array([1, 1])
phi = np.array([np.pi/3, np.pi/3])
q_max = np.array([np.pi / 2, np.pi / 2])
w = np.array([0.01, 0.01])
fu = lambda t, x: amp * np.sin(omega * t + phi) / (1 + np.exp((x[1:3]-q_max) / w)) / (1 + np.exp((-x[1:3]-q_max) / w))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.21626617375231053, 'fraction_numerical': 0.08964879852125693, 'mean_word_length': 2.4600638977635785, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '370867', 'license': 'MIT', 'n_tokens_mistral': 549, 'n_tokens_neox': 490, 'n_words': 116, 'path': '4_swing_open_loop.ipynb', 'repo_name': 'HuiminHe/PyDy', 'size': '1082'}