Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit223c38f

Browse files
committed
Fix lint warnings in benchmarks/
1 parentf6799ab commit223c38f

File tree

4 files changed

+1
-11
lines changed

4 files changed

+1
-11
lines changed

‎benchmarks/flatsys_bench.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
importnumpyasnp
99
importmath
10-
importcontrolasct
1110
importcontrol.flatsysasflat
1211
importcontrol.optimalasopt
1312

‎benchmarks/optestim_bench.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# used for optimization-based estimation.
77

88
importnumpyasnp
9-
importmath
109
importcontrolasct
1110
importcontrol.optimalasopt
1211

‎benchmarks/optimal_bench.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# performance of the functions used for optimization-base control.
77

88
importnumpyasnp
9-
importmath
109
importcontrolasct
1110
importcontrol.flatsysasfs
1211
importcontrol.optimalasopt
@@ -21,7 +20,6 @@
2120
'RK23': ('RK23', {}),
2221
'RK23_sloppy': ('RK23', {'atol':1e-4,'rtol':1e-2}),
2322
'RK45': ('RK45', {}),
24-
'RK45': ('RK45', {}),
2523
'RK45_sloppy': ('RK45', {'atol':1e-4,'rtol':1e-2}),
2624
'LSODA': ('LSODA', {}),
2725
}
@@ -129,9 +127,6 @@ def time_optimal_lq_methods(integrator_name, minimizer_name, method):
129127
Tf=10
130128
timepts=np.linspace(0,Tf,20)
131129

132-
# Create the basis function to use
133-
basis=get_basis('poly',12,Tf)
134-
135130
res=opt.solve_ocp(
136131
sys,timepts,x0,traj_cost,constraints,terminal_cost=term_cost,
137132
solve_ivp_method=integrator[0],solve_ivp_kwargs=integrator[1],
@@ -223,8 +218,6 @@ def time_discrete_aircraft_mpc(minimizer_name):
223218
# compute the steady state values for a particular value of the input
224219
ud=np.array([0.8,-0.3])
225220
xd=np.linalg.inv(np.eye(5)-A) @B @ud
226-
yd=C @xd
227-
228221
# provide constraints on the system signals
229222
constraints= [opt.input_range_constraint(sys, [-5,-6], [5,6])]
230223

@@ -234,7 +227,6 @@ def time_discrete_aircraft_mpc(minimizer_name):
234227
cost=opt.quadratic_cost(model,Q,R,x0=xd,u0=ud)
235228

236229
# Set the time horizon and time points
237-
Tf=3
238230
timepts=np.arange(0,6)*0.2
239231

240232
# Get the minimizer parameters to use

‎pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ filterwarnings = [
6060
[tool.ruff]
6161

6262
# TODO: expand to cover all code
63-
include = ['control/**.py']
63+
include = ['control/**.py','benchmarks/*.py']
6464

6565
[tool.ruff.lint]
6666
select = [

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp