Skip to content

Commit

Permalink
Sanity check objective dimensions in solvebilevel
Browse files Browse the repository at this point in the history
  • Loading branch information
johanlofberg committed Jun 21, 2023
1 parent 680e018 commit fe4d0df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/bilevel/solvebilevel.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@
end
end

if numel(OuterObjective) > 1 || numel(InnerObjective) > 1
error('The objective functions have to be scalar functions');
end

% User wants to use fmincon, cplex or something like
if strcmp(options.bilevel.algorithm,'external')
% Derive KKT conditions of inner problem, append with outer, and solve
Expand Down

0 comments on commit fe4d0df

Please sign in to comment.