def get_min_value(solution, field=0):
    """
    Get the minimum value in a field in a solution.
    """

    min_val = 1e38

    for state in solution.states:
        min_temp = state.q[field, :, :].min()
        if min_temp < min_val:
            min_val = min_temp

    return min_val