\displaystyle P = P(a,v, Z, d, N) = a + S \cdot v = a + \sum_{i \leq d, n_i \leq N_i}{n_i v_i}