{"action":"created","issue":{"url":"https://api.github.com/repos/MATPOWER/matpower/issues/35","repository_url":"https://api.github.com/repos/MATPOWER/matpower","labels_url":"https://api.github.com/repos/MATPOWER/matpower/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/MATPOWER/matpower/issues/35/comments","events_url":"https://api.github.com/repos/MATPOWER/matpower/issues/35/events","html_url":"https://github.com/MATPOWER/matpower/pull/35","id":317332523,"node_id":"MDExOlB1bGxSZXF1ZXN0MTgzODE2NTc4","number":35,"title":"Add soft limit option extension","user":{"login":"eranschweitzer","id":28018315,"node_id":"MDQ6VXNlcjI4MDE4MzE1","avatar_url":"https://avatars0.githubusercontent.com/u/28018315?v=4","gravatar_id":"","url":"https://api.github.com/users/eranschweitzer","html_url":"https://github.com/eranschweitzer","followers_url":"https://api.github.com/users/eranschweitzer/followers","following_url":"https://api.github.com/users/eranschweitzer/following{/other_user}","gists_url":"https://api.github.com/users/eranschweitzer/gists{/gist_id}","starred_url":"https://api.github.com/users/eranschweitzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eranschweitzer/subscriptions","organizations_url":"https://api.github.com/users/eranschweitzer/orgs","repos_url":"https://api.github.com/users/eranschweitzer/repos","events_url":"https://api.github.com/users/eranschweitzer/events{/privacy}","received_events_url":"https://api.github.com/users/eranschweitzer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":52,"created_at":"2018-04-24T17:55:30Z","updated_at":"2018-09-27T22:50:20Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/MATPOWER/matpower/pulls/35","html_url":"https://github.com/MATPOWER/matpower/pull/35","diff_url":"https://github.com/MATPOWER/matpower/pull/35.diff","patch_url":"https://github.com/MATPOWER/matpower/pull/35.patch"},"body":"Function 'toggle_softlims.m' is updated to allow not just soft limits on\r\nline rating but on votlage magnitude, generator limits, and angle\r\ndifferences as well. Additionally, in stead of always creating a soft\r\nlimit bounded by infinity, the options to specify a fixed value or a\r\nfraction of the hard limit is implemented.\r\n\r\nTests in 't/t_opf_softlims.m' have been updated in accordance witht the\r\nnew data structure. All previous tests have been kept and several new\r\nadded for the different limit types.\r\n\r\nUtility function 'calc_branch_angle.m' is added, which simply calculates\r\nthe angle differences accross active branches.\r\n\r\nNOTE 1: In keeping with the previous implementation the print callback\r\nfunction selects all elements where the soft limit is used (non-zero\r\noverload) OR where the shadow price is non-zero. As a result the\r\nsoftlimits section prints some items, where the softlimits are\r\ntechnically not active.\r\n\r\nNOTE 2: The softlims_defaults function is responsible for setting up\r\nmuch of the softlims structure. This includes creating an appropriately\r\nsized upper bound 'ub' vector for the slack variable. If an upper bound\r\nvector is specified, it is used as is. It is therefore NOT recommended\r\nto set up softlims on an mpc, run opf, save the results, modify the\r\nsoftlims structure in the results, and rerun opf. Instead, the original\r\nmpc should be altered.\r\n\r\n Changes to be committed:\r\n\tnew file:   lib/calc_branch_angle.m\r\n\tmodified:   lib/t/t_opf_softlims.m\r\n\tmodified:   lib/toggle_softlims.m"},"comment":{"url":"https://api.github.com/repos/MATPOWER/matpower/issues/comments/425266969","html_url":"https://github.com/MATPOWER/matpower/pull/35#issuecomment-425266969","issue_url":"https://api.github.com/repos/MATPOWER/matpower/issues/35","id":425266969,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNTI2Njk2OQ==","user":{"login":"eranschweitzer","id":28018315,"node_id":"MDQ6VXNlcjI4MDE4MzE1","avatar_url":"https://avatars0.githubusercontent.com/u/28018315?v=4","gravatar_id":"","url":"https://api.github.com/users/eranschweitzer","html_url":"https://github.com/eranschweitzer","followers_url":"https://api.github.com/users/eranschweitzer/followers","following_url":"https://api.github.com/users/eranschweitzer/following{/other_user}","gists_url":"https://api.github.com/users/eranschweitzer/gists{/gist_id}","starred_url":"https://api.github.com/users/eranschweitzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eranschweitzer/subscriptions","organizations_url":"https://api.github.com/users/eranschweitzer/orgs","repos_url":"https://api.github.com/users/eranschweitzer/repos","events_url":"https://api.github.com/users/eranschweitzer/events{/privacy}","received_events_url":"https://api.github.com/users/eranschweitzer/received_events","type":"User","site_admin":false},"created_at":"2018-09-27T22:50:20Z","updated_at":"2018-09-27T22:50:20Z","author_association":"NONE","body":"Hi,\r\n1. I'm ok with using `busnum` instead of `idx` I think. It makes things a bit messier in that the field names are not as consistent between the different limits, but if you think it's clearer that's ok. If you make that change then what is `idx` becomes `rowidx` and `busnum` is what *was* `idx`, in that respect you should be able to get rid of `rowidx`.\r\n\r\n2. What I meant by breaking code is that especially `ub` is used quite heavily in the problem formulation. Removing it in the `int2ext` callback should be fine however. However, here is a reason to consider *not* removing it. As you have pointed out previously, when the softlimit is active the respective shadow-price should be equal to the cost of the limit. However, this is only true if the softlimit has *not* hit its upper-bound. Therefore, the information in `ub` is useful in understanding whether things are operating correctly. To that end, I may have actually used it in some of the tests (I'd have to double check this). "}}
{"actor":{"display_login":"eranschweitzer"}}