Private API
This page lists non-exported (internal) symbols of CTFlows.MultiPhase.
From CTFlows.MultiPhase
_apply_hamiltonian_jump [Function]
CTFlows.MultiPhase._apply_hamiltonian_jump — Function
_apply_hamiltonian_jump(
state_tuple::Tuple,
jump::Tuple
) -> Tuple{Any, Any}
Apply a tuple jump to a Hamiltonian state tuple.
Arguments
state_tuple::Tuple: Tuple of (state, costate).jump::Tuple: Tuple of (statejump, costatejump).
Returns
- Tuple of (state + statejump, costate + costatejump).
See also: CTFlows.MultiPhase._apply_jump.
_apply_hamiltonian_jump(
state_tuple::Tuple,
jump
) -> Tuple{Any, Any}
Apply a scalar jump to the costate component of a Hamiltonian state tuple.
Arguments
state_tuple::Tuple: Tuple of (state, costate).jump: Costate jump value (scalar).
Returns
- Tuple of (state, costate + jump).
See also: CTFlows.MultiPhase._apply_jump.
_apply_jump [Function]
CTFlows.MultiPhase._apply_jump — Function
_apply_jump(
mpf::CTFlows.MultiPhase.MultiPhaseFlow,
i,
state
) -> Any
Apply a jump to the state for state flows.
Arguments
mpf::MultiPhaseStateFlow: The multi-phase state flow.i: Phase index.state: Current state.
Returns
- State after applying the jump.
See also: CTFlows.MultiPhase.get_jump.
_apply_jump(
_::Type{CTBase.Traits.StateDynamics},
mpf,
i,
state
) -> Any
Apply a jump to the state for state dynamics.
Arguments
::Type{Traits.StateDynamics}: State dynamics trait tag.mpf::MultiPhaseFlow: The multi-phase flow.i::Int: Phase index.state: Current state.
Returns
- State after applying the jump (element-wise addition).
Notes
This is an internal dispatch method for the _apply_jump function.
_apply_jump(
_::Type{CTBase.Traits.HamiltonianDynamics},
mpf,
i,
state_tuple
) -> Tuple{Any, Any}
Apply a jump to the state and costate for Hamiltonian dynamics.
Arguments
::Type{Traits.HamiltonianDynamics}: Hamiltonian dynamics trait tag.mpf::MultiPhaseFlow: The multi-phase flow.i::Int: Phase index.state_tuple: Tuple of (state, costate).
Returns
- Tuple of (state, costate) after applying the jump.
Notes
This is an internal dispatch method for the _apply_jump function.
_check_switching_times_order [Function]
CTFlows.MultiPhase._check_switching_times_order — Function
_check_switching_times_order(switches::Vector{<:Real})
Validate that switching times are strictly increasing.
Throws a CTBase.Exceptions.PreconditionError if the switching times are not in strictly increasing order (i.e., if any switches[i] >= switches[i+1]).
Arguments
switches::Vector{<:Real}: Vector of switching times to validate.
Throws
CTBase.Exceptions.PreconditionError: If switching times are not strictly increasing.
Notes
- This is a private helper function used internally by concatenation operators.
- Strictly increasing means each time must be greater than the previous one.
_evaluate_multiphase [Function]
CTFlows.MultiPhase._evaluate_multiphase — Function
_evaluate_multiphase(
mpf,
config::CTFlows.Configs.AbstractEndPointConfig;
variable,
unsafe
)
Evaluate a multi-phase flow for a point configuration, returning only the final state.
Iterates through all phases sequentially, applying jumps at switching times.
Arguments
mpf: The multi-phase flow to evaluate.config::Configs.AbstractEndPointConfig: The point configuration with time span and initial conditions.variable: The variable parameter value (for NonFixed systems).unsafe: If true, bypass ODE solver retcode checking.
Returns
- Final state after all phases.
See also: CTFlows.MultiPhase._evaluate_phase, CTFlows.MultiPhase._apply_jump.
_evaluate_multiphase(
mpf,
config::CTFlows.Configs.AbstractTrajectoryConfig;
variable,
unsafe
)
Evaluate a multi-phase flow for a trajectory configuration, returning the full trajectory.
Iterates through all phases sequentially, collecting segment results and applying jumps at switching times.
Arguments
mpf: The multi-phase flow to evaluate.config::Configs.AbstractTrajectoryConfig: The trajectory configuration with time span and initial conditions.variable: The variable parameter value (for NonFixed systems).unsafe: If true, bypass ODE solver retcode checking.
Returns
- Merged trajectory solution after all phases.
See also: CTFlows.Integrators.merge, CTFlows.MultiPhase._evaluate_phase, CTFlows.MultiPhase._apply_jump.
_evaluate_phase [Function]
CTFlows.MultiPhase._evaluate_phase — Function
_evaluate_phase(
flow::CTFlows.Flows.StateFlow,
t0,
tf,
x,
::CTFlows.Configs.AbstractEndPointConfig;
variable,
unsafe
)
Evaluate a single phase for a state flow with point configuration.
Arguments
flow::Flows.StateFlow: The state flow to evaluate.t0: Start time.tf: End time.x: Initial state.::Configs.AbstractEndPointConfig: Point configuration type tag.variable: The variable parameter value (for NonFixed systems).unsafe: If true, bypass ODE solver retcode checking.
Returns
- Final state at time tf.
See also: CTFlows.Flows.StateFlow.
_evaluate_phase(
flow::CTFlows.Flows.StateFlow,
t0,
tf,
x,
::CTFlows.Configs.AbstractTrajectoryConfig;
variable,
unsafe
)
Evaluate a single phase for a state flow with trajectory configuration.
Arguments
flow::Flows.StateFlow: The state flow to evaluate.t0: Start time.tf: End time.x: Initial state.::Configs.AbstractTrajectoryConfig: Trajectory configuration type tag.variable: The variable parameter value (for NonFixed systems).unsafe: If true, bypass ODE solver retcode checking.
Returns
- Trajectory solution from t0 to tf.
See also: CTFlows.Flows.StateFlow.
_evaluate_phase(
flow::CTFlows.Flows.HamiltonianFlow,
t0,
tf,
state_tuple,
::CTFlows.Configs.AbstractEndPointConfig;
variable,
unsafe
)
Evaluate a single phase for a Hamiltonian flow with point configuration.
Arguments
flow::Flows.HamiltonianFlow: The Hamiltonian flow to evaluate.t0: Start time.tf: End time.state_tuple: Tuple of (initialstate, initialcostate).::Configs.AbstractEndPointConfig: Point configuration type tag.variable: The variable parameter value (for NonFixed systems).unsafe: If true, bypass ODE solver retcode checking.
Returns
- Tuple of (finalstate, finalcostate) at time tf.
See also: CTFlows.Flows.HamiltonianFlow.
_evaluate_phase(
flow::CTFlows.Flows.HamiltonianFlow,
t0,
tf,
state_tuple,
::CTFlows.Configs.AbstractTrajectoryConfig;
variable,
unsafe
)
Evaluate a single phase for a Hamiltonian flow with trajectory configuration.
Arguments
flow::Flows.HamiltonianFlow: The Hamiltonian flow to evaluate.t0: Start time.tf: End time.state_tuple: Tuple of (initialstate, initialcostate).::Configs.AbstractTrajectoryConfig: Trajectory configuration type tag.variable: The variable parameter value (for NonFixed systems).unsafe: If true, bypass ODE solver retcode checking.
Returns
- Trajectory solution from t0 to tf.
See also: CTFlows.Flows.HamiltonianFlow.
_extract_final_state [Function]
CTFlows.MultiPhase._extract_final_state — Function
_extract_final_state(
mpf::CTFlows.MultiPhase.MultiPhaseFlow,
segment,
current_state
) -> Any
Extract the final state from a segment result for state flows.
Arguments
::MultiPhaseStateFlow: Multi-phase state flow type tag.segment: The segment solution.current_state: Current state (unused for state flows).
Returns
- Final state from the segment.
See also: CTFlows.Integrators.final_state.
_extract_final_state(
_::Type{CTBase.Traits.StateDynamics},
segment,
_
) -> Any
Extract the final state from a segment result for state dynamics.
Arguments
::Type{Traits.StateDynamics}: State dynamics trait tag.segment: The segment solution._: Current state (unused for state dynamics).
Returns
- Final state from the segment.
Notes
This is an internal dispatch method for the _extract_final_state function.
_extract_final_state(
_::Type{CTBase.Traits.HamiltonianDynamics},
segment,
current_state
) -> Tuple{Any, Any}
Extract the final state and costate from a segment result for Hamiltonian dynamics.
Arguments
::Type{Traits.HamiltonianDynamics}: Hamiltonian dynamics trait tag.segment: The segment solution (concatenated state and costate).current_state: Current state tuple (state, costate) used to determine dimensions.
Returns
- Tuple of (finalstate, finalcostate).
Notes
This is an internal dispatch method for the _extract_final_state function.
_extract_initial_state [Function]
CTFlows.MultiPhase._extract_initial_state — Function
_extract_initial_state(
config::CTFlows.Configs.AbstractStateConfig
) -> Any
Extract the initial state from a state configuration.
Arguments
config::Configs.AbstractStateConfig: The state configuration (StateEndPointConfig or StateTrajectoryConfig).
Returns
- Initial state vector.
See also: CTFlows.Configs.initial_state, CTFlows.Configs.AbstractStateConfig.
_extract_initial_state(
config::CTFlows.Configs.AbstractHamiltonianConfig
) -> Tuple{Any, Any}
Extract the initial state and costate from a Hamiltonian configuration.
Arguments
config::Configs.AbstractHamiltonianConfig: The Hamiltonian configuration (HamiltonianEndPointConfig or HamiltonianTrajectoryConfig).
Returns
- Tuple of (initialstate, initialcostate).
See also: CTFlows.Configs.initial_state, CTFlows.Configs.initial_costate, CTFlows.Configs.AbstractHamiltonianConfig.
_format_final_output [Function]
CTFlows.MultiPhase._format_final_output — Function
_format_final_output(
mpf::CTFlows.MultiPhase.MultiPhaseFlow,
state
) -> Any
Format the final output for state flows.
Arguments
::MultiPhaseStateFlow: Multi-phase state flow type tag.x: Final state.
Returns
- The final state (no formatting needed).
See also: CTFlows.MultiPhase._evaluate_multiphase.
_format_final_output(
_::Type{CTBase.Traits.StateDynamics},
x
) -> Any
Format the final output for state dynamics.
Arguments
::Type{Traits.StateDynamics}: State dynamics trait tag.x: Final state.
Returns
- The final state (no formatting needed).
Notes
This is an internal dispatch method for the _format_final_output function.
_format_final_output(
_::Type{CTBase.Traits.HamiltonianDynamics},
state_tuple
) -> Any
Format the final output for Hamiltonian dynamics.
Arguments
::Type{Traits.HamiltonianDynamics}: Hamiltonian dynamics trait tag.state_tuple: Tuple of (state, costate).
Returns
- Concatenated vector [state; costate].
Notes
This is an internal dispatch method for the _format_final_output function.