Skip to content

Commit

Permalink
Fix bounds path constraints (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
WimVanRoy authored Mar 2, 2023
1 parent 0265420 commit 32b41f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nosnoc/ocp.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ def preprocess_ocp(self, model: NosnocModel):
# path constraints
n_g_path = casadi_length(self.g_path)
if len(self.lbg) == 0:
self.lbx = np.zeros((n_g_path,))
self.lbg = np.zeros((n_g_path,))
elif len(self.lbg) != n_g_path:
raise ValueError("lbg and g_path have inconsistent shapes.")
if len(self.ubg) == 0:
self.ubx = np.zeros((n_g_path,))
self.ubg = np.zeros((n_g_path,))
elif len(self.ubg) != n_g_path:
raise ValueError("ubg and g_path have inconsistent shapes")

Expand Down

0 comments on commit 32b41f7

Please sign in to comment.