Skip to content

Commit fdccd4e

Browse files
fix: use 2-argument consolidate in dynamic optimization tests
1 parent cd52862 commit fdccd4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/extensions/dynamic_optimization.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ end
259259
eqs = [D(x(t)) ~ -2 + 0.5 * u(t)]
260260
# Integral cost function
261261
costs = [-Symbolics.Integral(t in (0, tf))(x(t) - u(t)), -x(tf)]
262-
consolidate(u) = u[1] + u[2]
262+
consolidate(u, sub) = u[1] + u[2] + sum(sub)
263263
@named rocket = System(eqs, t; costs, consolidate)
264264
rocket = structural_simplify(rocket; inputs = [u(t)])
265265

0 commit comments

Comments
 (0)