{"action":"created","issue":{"url":"https://api.github.com/repos/quintel/etmoses/issues/224","labels_url":"https://api.github.com/repos/quintel/etmoses/issues/224/labels{/name}","comments_url":"https://api.github.com/repos/quintel/etmoses/issues/224/comments","events_url":"https://api.github.com/repos/quintel/etmoses/issues/224/events","html_url":"https://github.com/quintel/etmoses/issues/224","id":95174291,"number":224,"title":"Solar capping: expected behaviour","user":{"login":"ChaelKruip","id":1303760,"avatar_url":"https://avatars.githubusercontent.com/u/1303760?v=3","gravatar_id":"","url":"https://api.github.com/users/ChaelKruip","html_url":"https://github.com/ChaelKruip","followers_url":"https://api.github.com/users/ChaelKruip/followers","following_url":"https://api.github.com/users/ChaelKruip/following{/other_user}","gists_url":"https://api.github.com/users/ChaelKruip/gists{/gist_id}","starred_url":"https://api.github.com/users/ChaelKruip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChaelKruip/subscriptions","organizations_url":"https://api.github.com/users/ChaelKruip/orgs","repos_url":"https://api.github.com/users/ChaelKruip/repos","events_url":"https://api.github.com/users/ChaelKruip/events{/privacy}","received_events_url":"https://api.github.com/users/ChaelKruip/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/quintel/etmoses/labels/Enhancement","name":"Enhancement","color":"bfd4f2"}],"state":"open","locked":false,"assignee":{"login":"grdw","id":2676542,"avatar_url":"https://avatars.githubusercontent.com/u/2676542?v=3","gravatar_id":"","url":"https://api.github.com/users/grdw","html_url":"https://github.com/grdw","followers_url":"https://api.github.com/users/grdw/followers","following_url":"https://api.github.com/users/grdw/following{/other_user}","gists_url":"https://api.github.com/users/grdw/gists{/gist_id}","starred_url":"https://api.github.com/users/grdw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grdw/subscriptions","organizations_url":"https://api.github.com/users/grdw/orgs","repos_url":"https://api.github.com/users/grdw/repos","events_url":"https://api.github.com/users/grdw/events{/privacy}","received_events_url":"https://api.github.com/users/grdw/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/quintel/etmoses/milestones/7","html_url":"https://github.com/quintel/etmoses/milestones/Market%20Models","labels_url":"https://api.github.com/repos/quintel/etmoses/milestones/7/labels","id":1188659,"number":7,"title":"Market Models","description":null,"creator":{"login":"ChaelKruip","id":1303760,"avatar_url":"https://avatars.githubusercontent.com/u/1303760?v=3","gravatar_id":"","url":"https://api.github.com/users/ChaelKruip","html_url":"https://github.com/ChaelKruip","followers_url":"https://api.github.com/users/ChaelKruip/followers","following_url":"https://api.github.com/users/ChaelKruip/following{/other_user}","gists_url":"https://api.github.com/users/ChaelKruip/gists{/gist_id}","starred_url":"https://api.github.com/users/ChaelKruip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChaelKruip/subscriptions","organizations_url":"https://api.github.com/users/ChaelKruip/orgs","repos_url":"https://api.github.com/users/ChaelKruip/repos","events_url":"https://api.github.com/users/ChaelKruip/events{/privacy}","received_events_url":"https://api.github.com/users/ChaelKruip/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":0,"state":"open","created_at":"2015-07-01T09:24:00Z","updated_at":"2015-07-16T13:22:02Z","due_on":null,"closed_at":null},"comments":11,"created_at":"2015-07-15T11:59:30Z","updated_at":"2015-07-16T13:55:32Z","closed_at":null,"body":"# Complex (most beautiful) version\r\n\r\nThe slider for the capping of solar panels is a percentage between 0 and 100. This percentage gives the 'maximum percentage of the installed capacity that may be capped' if there is a congestion-problem. The installed capacity is defined for an end-point as:\r\n```\r\npv_installed_cap = units * pv_capacity\r\n````\r\nand each end-point should be treated separately.\r\n\r\nWhen deciding if there is congestion, we need to take into account all transformers that are affected by an end-point. It is probably easiest to do this top-down: find out if there is congestion on a transformer and then see which end-point are 'under' that transformer.\r\n\r\nWhen all end-points are identified, the potential for solar capping can be determined:\r\n```\r\ntotal_capping_potential = 0\r\nfor each end-point:\r\n   total_capping_potential += end-point.pv_installed_cap * max_capping_percentage\r\nend\r\n```\r\nIf the potential is smaller than the exceedance of the transformer, all end-points will cap the maximum.\r\nIf the total potential is larger than or equal to the exceedance of the transformer, the end-points will decrease their solar pv output by the following amount:\r\n\r\n```\r\nfor each end-point:\r\n   capping = end-point.pv_installed_cap * max_capping_percentage /  total_capping_potential\r\nend\r\n```\r\n\r\nThis will result in a load that is *just* what the transformer can handle.\r\n\r\n# Simpler version (still depends on trafo congestion)\r\n\r\nI realise that the above is quite complex (although it would be nice to have). A simpler version could be as follows:\r\n\r\nThe slider-value indicates the percentage of capping **no matter how big the problem at the transformer**. So, if the capping strategy is in effect, and there is congestion on a transformer 'above' the end-point, the solar pv production will be reduced by the following amount:\r\n\r\n```\r\nfor each end-point:\r\n   capping = end-point.pv_installed_cap * max_capping_percentage\r\nend\r\n```\r\n\r\n# Simplest version\r\n\r\nThe simplest thing we can do and which is still relevant is to make the simpler version independent on the transformer failure. So, whenever the capping strategy is in effect, the solar panels will be capped with the percentage given by the slider. The user must then 'tweak' this slider value to solve congestion events manually.\r\n\r\n@dennisschoenmakers @antw @grdw what do you think about the feasibility of the three options described above?"},"comment":{"url":"https://api.github.com/repos/quintel/etmoses/issues/comments/121963983","html_url":"https://github.com/quintel/etmoses/issues/224#issuecomment-121963983","issue_url":"https://api.github.com/repos/quintel/etmoses/issues/224","id":121963983,"user":{"login":"grdw","id":2676542,"avatar_url":"https://avatars.githubusercontent.com/u/2676542?v=3","gravatar_id":"","url":"https://api.github.com/users/grdw","html_url":"https://github.com/grdw","followers_url":"https://api.github.com/users/grdw/followers","following_url":"https://api.github.com/users/grdw/following{/other_user}","gists_url":"https://api.github.com/users/grdw/gists{/gist_id}","starred_url":"https://api.github.com/users/grdw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grdw/subscriptions","organizations_url":"https://api.github.com/users/grdw/orgs","repos_url":"https://api.github.com/users/grdw/repos","events_url":"https://api.github.com/users/grdw/events{/privacy}","received_events_url":"https://api.github.com/users/grdw/received_events","type":"User","site_admin":false},"created_at":"2015-07-16T13:55:32Z","updated_at":"2015-07-16T13:55:32Z","body":"If I understand correctly:\r\n\r\nIn this scope of code:\r\n\r\n````ruby\r\ndef production_at(frame)\r\n  production = super\r\n  capping = (capacity * capping_percentage).abs\r\n\r\n  production > capping ? capping : production\r\nend\r\n````\r\nIt's hard to detect if there's a problem in the overall network/topology (full thingy with all the loads).\r\nSo that has to be calculated somwhere else? For instance in another `calculation` class? Or does this need to be intertwined with the `TechnologyLoad` calculation? \r\n\r\nI'm sort of struggling right now where a logical starting point would be, to make our 'advanced' version of calculating the solar capping ."}}