Suppose I have a "scalar" function $\displaystyle H$ which takes a "vector" ($\displaystyle L_i$) for an argument:

$\displaystyle H(L_i) = \sum_{i=1}^D [\alpha (L_{i+1} - L_i)^2 + P \cdot L_i]$

The vector $\displaystyle L_i$ (D dimensional) takes only integer values.

Also suppose that $\displaystyle D$, $\displaystyle \alpha$ and $\displaystyle P$ are known.

To close the system we choose quasi-periodic boundaries $\displaystyle L_{D+1} = L_1$.

I wish to find a "vector" $\displaystyle L_i$ such that $\displaystyle H$ takes its minimum value, under an assumption that $\displaystyle L_i \geqslant X_i$, where the integer values of $\displaystyle X_i$ are known.

I'm looking for two kind's of solutions:

1) When I'm simply given a vector $\displaystyle X_i$ and asked to find $\displaystyle Min(H)$, with some arbitrary initial guess for $\displaystyle L_i$.

2) When I have found a solution to this problem, and then one of the $\displaystyle X_i$'s is changed by 1.

Any advice on how to economically solve this problem would be greatly appreciated!