Skip to content

Commit

Permalink
Merge branch 'main' into hpo_fed
Browse files Browse the repository at this point in the history
  • Loading branch information
Federico-PizarroBejarano committed Apr 19, 2024
2 parents 047ab11 + 7ddb35b commit 70f2150
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ repos:
hooks:
- id: flake8
name: flake8_default
args: ['--ignore=E501,W503,W504']
args: ['--ignore=E501']
exclude: (^safe_control_gym/__init__.py|^tests/|^safe_control_gym/math_and_models/transformations.py)
- id: flake8
name: flake8_tests
Expand Down
2 changes: 1 addition & 1 deletion safe_control_gym/controllers/mpc/gp_mpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
from sklearn.model_selection import train_test_split
from skopt.sampler import Lhs

from safe_control_gym.controllers.lqr.lqr_utils import discretize_linear_system
from safe_control_gym.controllers.mpc.gp_utils import (GaussianProcessCollection, ZeroMeanIndependentGPModel,
covMatern52ard, covSEard, kmeans_centriods)
from safe_control_gym.controllers.mpc.linear_mpc import MPC, LinearMPC
from safe_control_gym.controllers.mpc.mpc_utils import discretize_linear_system
from safe_control_gym.envs.benchmark_env import Task


Expand Down
3 changes: 1 addition & 2 deletions safe_control_gym/safety_filters/cbf/cbf_nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ def setup_optimizer(self):
cost = 0.5 * cs.norm_2(uncertified_action_var - u_var) ** 2

# CBF constraint
opti.subject_to(-self.linear_func(x=barrier_at_x)['y'] - lie_derivative_at_x - learned_residual
<= right_hand_side)
opti.subject_to(-self.linear_func(x=barrier_at_x)['y'] - lie_derivative_at_x - learned_residual <= right_hand_side)

# Input constraints
for input_constraint in self.input_constraints_sym:
Expand Down

0 comments on commit 70f2150

Please sign in to comment.