Skip to content

Commit 06afd4e

Browse files
authored
return IO-processed system from generate_control_function
It's sometimes useful downstream. This PR makes the return value a named tuple, but should be a non-breaking change since any iteration of the previously returned tuple should work in the same way now.
1 parent 0325d7b commit 06afd4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/inputoutput.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ has_var(ex, x) = x ∈ Set(get_variables(ex))
160160
# Build control function
161161

162162
"""
163-
(f_oop, f_ip), dvs, p = generate_control_function(
163+
(f_oop, f_ip), dvs, p, io_sys = generate_control_function(
164164
sys::AbstractODESystem,
165165
inputs = unbound_inputs(sys),
166166
disturbance_inputs = nothing;
@@ -240,7 +240,7 @@ function generate_control_function(sys::AbstractODESystem, inputs = unbound_inpu
240240
pre, sol_states = get_substitutions_and_solved_states(sys)
241241
f = build_function(rhss, args...; postprocess_fbody = pre, states = sol_states,
242242
expression = Val{false}, kwargs...)
243-
f, dvs, ps
243+
(; f, dvs, ps, io_sys = sys)
244244
end
245245

246246
function inputs_to_parameters!(state::TransformationState, io)

0 commit comments

Comments
 (0)