Skip to content

Commit

Permalink
Fixes #1350 mpMILP with parametric cost fails
Browse files Browse the repository at this point in the history
  • Loading branch information
johanlofberg committed Dec 1, 2023
1 parent 54ab083 commit d18078a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions modules/parametric/mpt_project_back_equality.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
for i=1:length(Fi)
details.Bi{i} = OriginalMatrices.H*Fi{i} + OriginalMatrices.F;
details.Ci{i} = OriginalMatrices.H*Gi{i};
if isfield(OriginalMatrices,'D')
% details.Ai{i} = Fi{i}'*OriginalMatrices.D;
details.Bi{i} = details.Bi{i} + Gi{i}'*OriginalMatrices.D;
end
end
end
end
Expand Down
3 changes: 2 additions & 1 deletion modules/parametric/mpt_project_on_equality.m
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@
Matrices.H = M.H*S1;
if isfield(Matrices,'D')
% Latest MPT does not fullify D
Matrices.D = full((Matrices.D'*S1)');
Matrices.Cx = full(Matrices.Cx + S3'*Matrices.D);
Matrices.D = full((Matrices.D'*S1)');
end
end

Expand Down

0 comments on commit d18078a

Please sign in to comment.