Hi Johan,
I tried to use the optimizer command to speedup many optimizations with different inputs to the objective.
Unfortunately it seems that the optimizer command behaves strange in octave, but works fine in Matlab.
Consider the following simple example, tested with Octave (4.0 Linux / 4.2.1 Windows).
min a*x
s.t. 1 <= x <= 10
x=sdpvar; a=sdpvar;p=optimizer([x>=1, x<=10], a*x', sdpsettings('solver', 'glpk'), a, x);
[l,f]=p(-1)
>> l = 1
It gets even more strange when using the solver sdpt3, then I get
>> l = 5.5000
for a = 1 and a = -1
However, using optimize gives the correct solution (as does Matlab with the above and solver=linprog):
optimize([x>=1, x<=10], -1*x', sdpsettings('solver', 'glpk')) % or sdpt3
l = value(x)
>> l = 10
Do you have any clue what is causing this problem and is there a chance to fix it?
Thank you and best regards
Tobias