Skip to content

Commit

Permalink
Fix check_units for optimization systems
Browse files Browse the repository at this point in the history
  • Loading branch information
YingboMa committed Nov 10, 2023
1 parent cea83b3 commit f793c0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/systems/optimization/optimizationsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ struct OptimizationSystem <: AbstractOptimizationSystem
gui_metadata = nothing, complete = false, parent = nothing;
checks::Union{Bool, Int} = true)
if checks == true || (checks & CheckUnits) > 0
unwrap(op) isa Symbolic && check_units(op)
check_units(observed)
u = __get_unit_type(states, ps)
unwrap(op) isa Symbolic && check_units(u, op)
check_units(u, observed)
check_units(u, constraints)

Check warning on line 72 in src/systems/optimization/optimizationsystem.jl

View check run for this annotation

Codecov / codecov/patch

src/systems/optimization/optimizationsystem.jl#L69-L72

Added lines #L69 - L72 were not covered by tests
end
new(tag, op, states, ps, var_to_name, observed,
Expand Down

0 comments on commit f793c0b

Please sign in to comment.