I need to find the maximum of the function:
a1 ^ x1 * const1 + a2 ^ x2 * const2 + .... + ak ^ xk * constk = qaulity
where xk> 0 and xk is an integer. ak is constant.
restriction: a1 ^ x1 * const1 * func (x1) + a2 ^ x2 * const2 * func (x2) + .... + ak ^ xk * constk * func (xk) <Budget
Where func is a discrete function:
func(x) { switch(x) { case 1: return 423; case 2: return 544; ... etc } }
k may be large (more than 1000). x less than 100. What is the best method?
Neir0 source share