Skip to content

Commit

Permalink
fixed ADMM issue when inequalities are emptyfuns, closes #100
Browse files Browse the repository at this point in the history
  • Loading branch information
alexe15 committed Mar 24, 2020
1 parent 25053ce commit 43dbc9d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/extensions/run_ADMMnew.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 43dbc9d

Please sign in to comment.