def seir_model(prev_soln, dx, population, virus):
    """
    Solve the SEIR ODE
    :param prev_soln: previous ODE solution
    :param dx: timestep
    :param population: total population
    :param virus: Virus object
    :return: solution to ODE delta values
    """
    s, e, i, r = prev_soln

    ds = - virus.beta * s * i / population
    de = virus.beta * s * i / population - virus.sigma * e
    di = virus.sigma * e - virus.gamma * i
    dr = virus.gamma * i

    return ds, de, di, dr