Skip to content

Instantly share code, notes, and snippets.

@zapu
Created May 10, 2012 09:49
Show Gist options
  • Save zapu/2652194 to your computer and use it in GitHub Desktop.
Save zapu/2652194 to your computer and use it in GitHub Desktop.
Optymalizacja
clear all;
close all;
rel_pwr_flow_data;
bigPmax = repmat(Pmax, 1, m) .* (ones(18) - eye(18));
cvx_begin
variable p(m, m)
variable g(k)
minimize (c' * g)
subject to
p < bigPmax
g < Gmax
p >= -bigPmax
g >= 0
A*p == repmat([-g; d], 1, m);
cvx_end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment