Private API
This page lists non-exported (internal) symbols of CTModels.Init.
From CTModels.Init
_build_block_with_components
CTModels.Init._build_block_with_components — Function
_build_block_with_components(
ocp::CTModels.OCP.AbstractModel,
role::Symbol,
block_data,
comp_data::Dict{Int64, Any}
) -> Any
Build an initialisation function combining block-level and component-level data.
Merges a base initialisation with per-component overrides.
_build_component_function
CTModels.Init._build_component_function — Function
_build_component_function(data) -> Function
Build a component-level initialisation function from data.
Handles both time-dependent (time, data) tuples and time-independent data.
_build_component_function_with_time
CTModels.Init._build_component_function_with_time — Function
_build_component_function_with_time(
data,
time::AbstractVector
) -> Function
Build a component function from data with an associated time grid.
Interpolates vector data over the time grid.
_build_component_function_without_time
CTModels.Init._build_component_function_without_time — Function
_build_component_function_without_time(data) -> Function
Build a component function from time-independent data (scalar, vector, or function).
_build_time_dependent_init
CTModels.Init._build_time_dependent_init — Function
_build_time_dependent_init(
ocp::CTModels.OCP.AbstractModel,
role::Symbol,
data,
time::AbstractVector
) -> Union{Nothing, Function}
Build a time-dependent initialisation function from data and a time grid.
Interpolates the provided data over the time grid to create a callable function.
_format_init_data_for_grid
CTModels.Init._format_init_data_for_grid — Function
_format_init_data_for_grid(data) -> Any
Convert matrix data to vector-of-vectors format for time-grid interpolation.
_format_time_grid
CTModels.Init._format_time_grid — Function
_format_time_grid(time_data) -> Any
Normalise time grid data to a vector format.
_initial_guess_from_namedtuple
CTModels.Init._initial_guess_from_namedtuple — Function
_initial_guess_from_namedtuple(
ocp::CTModels.OCP.AbstractModel,
init_data::NamedTuple
) -> CTModels.Init.InitialGuess
Build an initial guess from a NamedTuple.
Parses keys for state, control, variable (by name or component) and constructs the appropriate initialisation functions. Validation against the OCP is performed by build_initial_guess.
_initial_guess_from_preinit
CTModels.Init._initial_guess_from_preinit — Function
_initial_guess_from_preinit(
ocp::CTModels.OCP.AbstractModel,
pre::CTModels.Init.PreInitialGuess
) -> CTModels.Init.InitialGuess
Build an initial guess from a pre-initialisation object.
Converts raw data into functions and trajectories. Validation against the OCP is performed by build_initial_guess.
_initial_guess_from_solution
CTModels.Init._initial_guess_from_solution — Function
_initial_guess_from_solution(
ocp::CTModels.OCP.AbstractModel,
sol::CTModels.OCP.AbstractSolution
) -> Union{CTModels.Init.InitialGuess{X, U, V} where {X<:Function, U<:Function, V<:Real}, CTModels.Init.InitialGuess{X, U, V} where {X<:Function, U<:Function, V<:(AbstractVector{<:Real})}}
Build an initial guess from a previous solution (warm start).
Extracts state, control, and variable trajectories from the solution. Dimensional consistency is checked against the solution metadata; final validation against the OCP is performed by build_initial_guess.
_validate_initial_guess
CTModels.Init._validate_initial_guess — Function
_validate_initial_guess(
ocp::CTModels.OCP.AbstractModel,
init::CTModels.Init.InitialGuess
) -> CTModels.Init.InitialGuess
Internal validation of an InitialGuess.
Samples the state and control functions at a test time and verifies dimensions.