From 43dbc9d993d5c7ccb040cf0c2f27c677f8ab02f3 Mon Sep 17 00:00:00 2001 From: Engelmann Date: Tue, 24 Mar 2020 12:03:40 +0100 Subject: [PATCH] fixed ADMM issue when inequalities are emptyfuns, closes #100 --- src/extensions/run_ADMMnew.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/extensions/run_ADMMnew.m b/src/extensions/run_ADMMnew.m index ea685e8..2921d29 100644 --- a/src/extensions/run_ADMMnew.m +++ b/src/extensions/run_ADMMnew.m @@ -31,12 +31,12 @@ iter.loc.xxCas = SX.sym('x',nx,1); % local inequality constraints - sProb.locFunsCas.ggi = sProb.locFuns.ggi{i}(iter.yyCas); - sProb.locFunsCas.hhi = sProb.locFuns.hhi{i}(iter.yyCas); + sProb.locFunsCas.ggi{i} = sProb.locFuns.ggi{i}(iter.yyCas); + sProb.locFunsCas.hhi{i} = sProb.locFuns.hhi{i}(iter.yyCas); % output dimensions of local constraints - nngi{i} = size(sProb.locFunsCas.ggi,1); - nnhi{i} = size(sProb.locFunsCas.hhi,1); + nngi{i} = size(sProb.locFunsCas.ggi{i},1); + nnhi{i} = size(sProb.locFunsCas.hhi{i},1); % set up bounds for equalities/inequalities @@ -62,7 +62,7 @@ end % set up local solvers - nlp = struct('x',iter.yyCas,'f',ffiLocCas,'g',[sProb.locFunsCas.ggi; sProb.locFunsCas.hhi],'p',pCas); + nlp = struct('x',iter.yyCas,'f',ffiLocCas,'g',[sProb.locFunsCas.ggi{i}; sProb.locFunsCas.hhi{i}],'p',pCas); nnlp{i} = nlpsol('solver',opts.locSol,nlp); end