def clip(value_before_switch, value_after_switch, t_switch, t):
    """
    logical function of time. Changes value at threshold time t_switch.

    """
    if t <= t_switch:
        return value_before_switch
    else:
        return value_after_switch