Skip to content

Commit

Permalink
Add support for pexp in baron
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan Löfberg committed Sep 3, 2024
1 parent de4b306 commit 3d87091
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions solvers/callbaron.m
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@
end
end
z = [z(1:end-1) ')'];
elseif strcmp(model.evalMap{pos}.fcn,'pexp')
j1 = find(model.linearindicies == map.variableIndex(1));
j2 = find(model.linearindicies == map.variableIndex(2));
xs = ['x(' num2str(j1) ')'];
ys = ['x(' num2str(j2) ')'];
z = ['(' xs '*exp(' ys '/' xs '))']
elseif strcmp(model.evalMap{pos}.fcn,'slogfrac')
j1 = find(model.linearindicies == map.variableIndex(1));
j2 = find(model.linearindicies == map.variableIndex(2));
Expand Down

0 comments on commit 3d87091

Please sign in to comment.