Finding a minimum for a "vector" function

Suppose I have a "scalar" function which takes a "vector" ( ) for an argument:

The vector (D dimensional) takes only integer values.

Also suppose that , and are known.

To close the system we choose quasi-periodic boundaries .

I wish to find a "vector" such that takes its minimum value, under an assumption that , where the integer values of are known.

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

1) When I'm simply given a vector and asked to find , with some arbitrary initial guess for .

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

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