Arguments not assigned during call to "mosekopt"

93 views
Skip to first unread message

researcher

unread,
Aug 2, 2020, 9:45:21 PM8/2/20
to YALMIP
I'm trying to execute this simple optimization problem (taken from https://yalmip.github.io/tutorial/globaloptimization/  and modified slightly to include an initial guess)

clear all
x1
= sdpvar(1,1);
x2
= sdpvar(1,1);
x3
= sdpvar(1,1);
p
= -2*x1+x2-x3;
F
= [x1*(4*x1-4*x2+4*x3-20)+x2*(2*x2-2*x3+9)+x3*(2*x3-13)+24>=0,
     
4-(x1+x2+x3)>=0,
     
6-(3*x2+x3)>=0,
               x1
>=0,
             
2-x1>=0,
               x2
>=0,
               x3
>=0,
             
3-x3>=0]


assign
(x1,3.0)
assign
(x2,3.0)
assign
(x3,3.0)
         
options
= sdpsettings('solver','bmibnb','usex0',1,'showprogress',2,'verbose',2,'debug',1);
optimize
(F,p,options);


If I don't use the initial guess (i.e. 'usex0',0 ), it works. But as soon as I use 'usex0',1, I get this error:

+ Solver chosen : BMIBNB
+ Processing objective function
+ Processing constraints
+ Branch and bound started
+ Calling MOSEK
*** Error(1200): param.MSK_IPAR_MIO_CONSTRUCT_SOL
Return code - 1200 [MSK_RES_ERR_IN_ARGUMENT] [A function argument is incorrect.]
One or more output arguments not assigned during call to "mosekopt".

Error in call_mosek_primal (line 159)
    [r,res] = mosekopt('minimize echo(0)',prob,param);

Error in callmosek>call_mosek_lpqpsocpsdp (line 102)
        [x,D_struc,problem,r,res,solvertime,prob] = call_mosek_primal(model);

Error in callmosek (line 51)
    [x,D_struc,problem,r,res,solvertime,prob] = call_mosek_lpqpsocpsdp(model);

Error in root_node_tighten (line 69)
            output = feval(lowersolver,removenonlinearity(p));

Error in bmibnb (line 275)
p = root_node_tighten(p,upper);

Error in solvesdp (line 361)
    eval(['output = ' solver.call '(interfacedata);']);

Error in optimize (line 31)
[varargout{1:nargout}] = solvesdp(varargin{:});

Error in untitled2 (line 20)
optimize(F,p,options);


How could I solve it?

Thanks!



Johan Löfberg

unread,
Aug 3, 2020, 2:21:46 AM8/3/20
to YALMIP
The problem is more that YALMIP has selected an unsuitable upper bound solver (bmibnb.uppersolver). You should force it to something relevant, i.e. a general nonlinear solver (such as fmincon)

researcher

unread,
Aug 3, 2020, 8:58:21 AM8/3/20
to YALMIP
Thanks for the reply

So I've tried to change the uppersolver to fmincon, and the same error appears. I've also tried to change both the upper and the lower solver to fmincon:

options = sdpsettings('solver','bmibnb','usex0',1,'showprogress',2,'verbose',2,'debug',1,'bmibnb.uppersolver','fmincon','bmibnb.lowersolver','fmincon');

And the same error still appears

Thanks again!

researcher

unread,
Aug 3, 2020, 9:03:46 AM8/3/20
to YALMIP
Ok, so the problem seemed to be with both the lpsolver and the lowersolver of bmibnb. If I change both to fmincon, it works:

options = sdpsettings('solver','bmibnb','usex0',1,'showprogress',2,'verbose',2,'debug',1,'bmibnb.lowersolver','fmincon','bmibnb.lpsolver','fmincon');

Thanks

Johan Löfberg

unread,
Aug 3, 2020, 10:32:04 AM8/3/20
to YALMIP
don't use fmincon as lpsolver/lowersolver

doesn't it work with mosek?

optimize(F,p,options);
* Starting YALMIP global branch & bound.
* Upper solver     : fmincon
* Lower solver     : MOSEK
* LP solver        : MOSEK
* -Extracting bounds from model
* -Perfoming root-node bound propagation
* -Calling upper solver (found a solution!)
* -Branch-variables : 3
* -More root-node bound-propagation
* -Performing LP-based bound-propagation 
* -And some more root-node bound-propagation
* Starting the b&b process
 Node       Upper      Gap(%)       Lower    Open   Time
    1 :   -4.000E+00    33.33     -6.000E+00    2     0s    
    2 :   -4.000E+00    33.33     -6.000E+00    3     0s    
    3 :   -4.000E+00    28.01     -5.629E+00    4     0s    
    4 :   -4.000E+00    28.01     -5.629E+00    3     0s  Poor bound in lower, killing node  
    5 :   -4.000E+00    13.56     -4.728E+00    2     0s  Infeasible in node bound-propagation  
    6 :   -4.000E+00    13.56     -4.728E+00    1     0s  Infeasible in node bound-propagation  
    7 :   -4.000E+00     0.00     -4.000E+00    0     0s  Poor bound in lower, killing node  
* Finished.  Cost: -4 Gap: 0%
* Termination with all nodes pruned 
* Timing: 19% spent in upper solver (4 problems solved)
*         2% spent in lower solver (5 problems solved)
*         62% spent in LP-based domain reduction (112 problems solved)
*         2% spent in upper heuristics (107 candidates tried)

Assigning an initial guess which isn't feasible anyway won't help you in any sense. However, bmibnb has no problems finding a feasible solution already in the first node

researcher

unread,
Aug 4, 2020, 1:02:53 PM8/4/20
to YALMIP
Just found that the reason was that I had a previous version of Mosek installed, it works with the latest version

Thanks!
Reply all
Reply to author
Forward
0 new messages