Skip to content

Commit f793c0b

Browse files
committed
Fix check_units for optimization systems
1 parent cea83b3 commit f793c0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/systems/optimization/optimizationsystem.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ struct OptimizationSystem <: AbstractOptimizationSystem
6666
gui_metadata = nothing, complete = false, parent = nothing;
6767
checks::Union{Bool, Int} = true)
6868
if checks == true || (checks & CheckUnits) > 0
69-
unwrap(op) isa Symbolic && check_units(op)
70-
check_units(observed)
7169
u = __get_unit_type(states, ps)
70+
unwrap(op) isa Symbolic && check_units(u, op)
71+
check_units(u, observed)
7272
check_units(u, constraints)
7373
end
7474
new(tag, op, states, ps, var_to_name, observed,

0 commit comments

Comments
 (0)