I have this optimization code:
vars1 = Array[Subscript[x, #] &, {4}];
ka = {35, 10, 20, 25};
objectiveFunction = Total[ka.vars1^5];
NMinimize[{objectiveFunction/100,
Apply[And, Thread[GreaterEqual[vars1, 0]]] && Total[vars1] == 100 &&
Element[vars1, Integers]}, Flatten[vars1], MaxIterations -> 200]
How is it possible in MMA to capture the values of variables and also objective function in each iteration and plot them versus iteration number??(Separate plots or all in one plot?)
EvaluationMonitor
examples. There are also some examples in theEvaluationMonitor
section ofNMinimize
documentation $\endgroup$