def vaccine(y, x, N, beta, gamma, nu):
    """
    Defines the SIR vaccine model.

    :param array y: Individuals at time step x
    :param array x: Time step
    :param int N: Population
    :param float beta: The parameter controlling how often a susceptible-infected contact results in a new infection.
    :param float gamma: The rate an infected recovers and moves into the resistant phase.
    :param float nu: The rate at which susceptible become vaccinated.

    :returns: S, I, R at time step n
    :rtype: tuple(int/float, int/float, int/float)
    """
    S = -beta * y[0] * y[1] / N - nu * y[0]
    I = beta * y[0] * y[1] / N - gamma * y[1]
    R = gamma * y[1] + nu * y[2]
    return S, I, R
