analyses/utils.py
def define_time(time: list, n_shooting: tuple):
    """
    Create the time vector

    Parameters
    ----------
    time : list
        List of duration of each phase of the simulation
    n_shooting : tuple
        Number of shooting points for each phase
    """
    time_vector = np.hstack(
        (
            np.linspace(0, float(time[0]) - 1 / n_shooting[0] * float(time[0]), n_shooting[0]),
            np.linspace(float(time[0]), float(time[0]) + float(time[1]), n_shooting[1] + 1),
        )
    )
    return time_vector

    Create the time vector

    Parameters
    ----------
    time : list
        List of duration of each phase of the simulation
    n_shooting : tuple
        Number of shooting points for each phase
    
Create the time vector
Parameters

time : list
List of duration of each phase of the simulation
n_shooting : tuple
Number of shooting points for each phase
Create the time vector Parameters time : list List of duration of each phase of the simulation n_shooting : tuple Number of shooting points for each phase
def define_time(time: list, n_shooting: tuple):
    time_vector = np.hstack(
        (
            np.linspace(0, float(time[0]) - 1 / n_shooting[0] * float(time[0]), n_shooting[0]),
            np.linspace(float(time[0]), float(time[0]) + float(time[1]), n_shooting[1] + 1),
        )
    )
    return time_vector
def define_time ( time : list , n_shooting : tuple ) : time_vector = np . hstack ( ( np . linspace ( 0 , float ( time [ 0 ] ) - 1 / n_shooting [ 0 ] * float ( time [ 0 ] ) , n_shooting [ 0 ] ) , np . linspace ( float ( time [ 0 ] ) , float ( time [ 0 ] ) + float ( time [ 1 ] ) , n_shooting [ 1 ] + 1 ) , ) ) return time_vector
Create the time vector
Parameters
Create the time vector Parameters
"""
    Create the time vector

    Parameters
    ----------
    time : list
        List of duration of each phase of the simulation
    n_shooting : tuple
        Number of shooting points for each phase
    """
time
list
n_shooting
tuple