Skip to content

Commit

Permalink
Implement CPF direction switching as in legacy CPF.
Browse files Browse the repository at this point in the history
  • Loading branch information
rdzman committed Apr 15, 2021
1 parent b5034de commit 53a8f54
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/mp_network_acps.m
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,9 @@ function cpf_add_node_balance_constraints(obj, mm, dm, mpopt)
end
if ~s.done
s.done = 1;
s.warmstart = struct('nmt', nmt, 'dmt', dmt);
dir_from_jac_eigs = isempty(find(nx.z(ad.npv+ad.npq+1:end-1) > 0, 1));
s.warmstart = struct('nmt', nmt, 'dmt', dmt, ...
'dir_from_jac_eigs', dir_from_jac_eigs);
end
s.evnts(i).msg = msg;
end
Expand Down

0 comments on commit 53a8f54

Please sign in to comment.