I want to solve a large LP problem using NMaximize
. This is a small instance of my bigger problem:
$$max \sum^{4}_{t=1}(\sum^{4}_{c=1} V_{c}*f_{c,t})\\ s.t\quad \sum^{5}_{t=1} f_{c,t} \leq 100,\forall t$$
where $ f_{c,t} \geq 0$ and $c=1...5$ and $t=1...5$
I wrote the following:
NMaximize[{Sum[f[c, t]*V, {c, 1, 4}, {t, 1, 4}],
Sum[f[c, t], {c, 1, 5}] <= 100}, {f[c, t]}]
How can I declare f[c,t]
as a variable?