alexe15 / ALADIN.m

Other
35 stars 13 forks source link

Default parameter setting working with all examples #61

Open alexe15 opened 4 years ago

timueh commented 4 years ago

AFAIU the function loadDefOpts() provides a set of default parameters. However, it does not seem to work.

>> run_ALADINnew(problem, loadDefOpts())
Error using num2str (line 53)
Input to num2str must be numeric.

Error in setDefaultOpts (line 15)
        if ~ismember(num2str(opts.(defOptFields{i})),defOpts.(defOptFields{i}))

Error in run_ALADINnew (line 20)
opts       = setDefaultOpts(sProb, opts);

When I set the options myself, e.g.

opts = struct( ...
        'rho0',1.5e1,'rhoUpdate',1.1,'rhoMax',1e8,'mu0',1e2,'muUpdate',2,...
        'muMax',2*1e6,'eps',0,'maxiter',30,'actMargin',-1e-6,'hessian','standard',...%-1e-6
        'solveQP','MA57','reg','true','locSol','ipopt','innerIter',2400,'innerAlg', ...
        'none','Hess','standard','plot',true,'slpGlob', true,'trGamma', 1e6, ...
        'Sig','const','term_eps', 0, 'parfor', false, 'reuse', false);

then I get a different error:

>> run_ALADINnew(problem, opts)
Error using setDefaultOpts (line 16)
Invalid option: '1' is not a valid for option 'plot'.

Error in run_ALADINnew (line 20)
opts       = setDefaultOpts(sProb, opts);
alexe15 commented 4 years ago

This is fixed already, loadDefOpts() should be deleted from thesource files. However, some examples still use it which we have to change first. To use the default options, you can run ALADIN with an empty struct or passing an options struct defining the non-default options only. So loadDefOpts() is not needed anymore.

timueh commented 4 years ago

why is this then pushed to the master branch?...

🙄 🙄 🙄