{"action":"created","issue":{"url":"https://api.github.com/repos/ucd-cws/calvin-network-tools/issues/36","repository_url":"https://api.github.com/repos/ucd-cws/calvin-network-tools","labels_url":"https://api.github.com/repos/ucd-cws/calvin-network-tools/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/ucd-cws/calvin-network-tools/issues/36/comments","events_url":"https://api.github.com/repos/ucd-cws/calvin-network-tools/issues/36/events","html_url":"https://github.com/ucd-cws/calvin-network-tools/issues/36","id":167255650,"number":36,"title":"Piecewise Cost Representation in Matrix Export","user":{"login":"msdogan","id":14085662,"avatar_url":"https://avatars.githubusercontent.com/u/14085662?v=3","gravatar_id":"","url":"https://api.github.com/users/msdogan","html_url":"https://github.com/msdogan","followers_url":"https://api.github.com/users/msdogan/followers","following_url":"https://api.github.com/users/msdogan/following{/other_user}","gists_url":"https://api.github.com/users/msdogan/gists{/gist_id}","starred_url":"https://api.github.com/users/msdogan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msdogan/subscriptions","organizations_url":"https://api.github.com/users/msdogan/orgs","repos_url":"https://api.github.com/users/msdogan/repos","events_url":"https://api.github.com/users/msdogan/events{/privacy}","received_events_url":"https://api.github.com/users/msdogan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ucd-cws/calvin-network-tools/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"jrmerz","id":1852393,"avatar_url":"https://avatars.githubusercontent.com/u/1852393?v=3","gravatar_id":"","url":"https://api.github.com/users/jrmerz","html_url":"https://github.com/jrmerz","followers_url":"https://api.github.com/users/jrmerz/followers","following_url":"https://api.github.com/users/jrmerz/following{/other_user}","gists_url":"https://api.github.com/users/jrmerz/gists{/gist_id}","starred_url":"https://api.github.com/users/jrmerz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrmerz/subscriptions","organizations_url":"https://api.github.com/users/jrmerz/orgs","repos_url":"https://api.github.com/users/jrmerz/repos","events_url":"https://api.github.com/users/jrmerz/events{/privacy}","received_events_url":"https://api.github.com/users/jrmerz/received_events","type":"User","site_admin":false},"assignees":[{"login":"jrmerz","id":1852393,"avatar_url":"https://avatars.githubusercontent.com/u/1852393?v=3","gravatar_id":"","url":"https://api.github.com/users/jrmerz","html_url":"https://github.com/jrmerz","followers_url":"https://api.github.com/users/jrmerz/followers","following_url":"https://api.github.com/users/jrmerz/following{/other_user}","gists_url":"https://api.github.com/users/jrmerz/gists{/gist_id}","starred_url":"https://api.github.com/users/jrmerz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrmerz/subscriptions","organizations_url":"https://api.github.com/users/jrmerz/orgs","repos_url":"https://api.github.com/users/jrmerz/repos","events_url":"https://api.github.com/users/jrmerz/events{/privacy}","received_events_url":"https://api.github.com/users/jrmerz/received_events","type":"User","site_admin":false},{"login":"msdogan","id":14085662,"avatar_url":"https://avatars.githubusercontent.com/u/14085662?v=3","gravatar_id":"","url":"https://api.github.com/users/msdogan","html_url":"https://github.com/msdogan","followers_url":"https://api.github.com/users/msdogan/followers","following_url":"https://api.github.com/users/msdogan/following{/other_user}","gists_url":"https://api.github.com/users/msdogan/gists{/gist_id}","starred_url":"https://api.github.com/users/msdogan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msdogan/subscriptions","organizations_url":"https://api.github.com/users/msdogan/orgs","repos_url":"https://api.github.com/users/msdogan/repos","events_url":"https://api.github.com/users/msdogan/events{/privacy}","received_events_url":"https://api.github.com/users/msdogan/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2016-07-24T21:33:12Z","updated_at":"2016-09-23T18:32:00Z","closed_at":null,"body":"@jrmerz @qjhart the piecewise cost representation seems to have some bugs in it. We have one extra link in the beginning (when k = 0), and it is constrained. Below, there is a link with piecewise cost `HU507 to AGG_COACH`. There are two months: July and August. I wonder why it constrains first pieces (k=0) with zero cost. This is true for all links with piecewise representation. \r\n\r\n```\r\ni\tj\tk\tcost\tamplitude\tlower_bound\tupper_bound\r\n\r\nHU507.2002-07-31\tAGG_COACH.2002-07-31\t0\t0\t1\t18.49\t18.49\r\nHU507.2002-07-31\tAGG_COACH.2002-07-31\t1\t-2450.118243\t1\t0\t1.85\r\nHU507.2002-07-31\tAGG_COACH.2002-07-31\t2\t-2381.098208\t1\t0\t1.84\r\nHU507.2002-07-31\tAGG_COACH.2002-07-31\t3\t-2243.863863\t1\t0\t1.850001\r\nHU507.2002-07-31\tAGG_COACH.2002-07-31\t4\t-1961.753071\t1\t0\t1.849998\r\nHU507.2002-07-31\tAGG_COACH.2002-07-31\t5\t-1641.658741\t1\t0\t1.850001\r\nHU507.2002-07-31\tAGG_COACH.2002-07-31\t6\t-1423.632549\t1\t0\t1.85\r\nHU507.2002-07-31\tAGG_COACH.2002-07-31\t7\t-1208.016126\t1\t0\t1.85\r\nHU507.2002-07-31\tAGG_COACH.2002-07-31\t8\t-979.330264\t1\t0\t1.849999\r\nHU507.2002-07-31\tAGG_COACH.2002-07-31\t9\t-768.2532673\t1\t0\t1.850002\r\nHU507.2002-07-31\tAGG_COACH.2002-07-31\t10\t-337.3858576\t1\t0\t1.84\r\nHU507.2002-07-31\tAGG_COACH.2002-07-31\t11\t0\t1\t0\t0\r\n```\r\n```\r\nHU507.2002-08-31\tAGG_COACH.2002-08-31\t0\t0\t1\t15\t15\r\nHU507.2002-08-31\tAGG_COACH.2002-08-31\t1\t-2453\t1\t0\t1.5\r\nHU507.2002-08-31\tAGG_COACH.2002-08-31\t2\t-2369.833984\t1\t0\t1.5\r\nHU507.2002-08-31\tAGG_COACH.2002-08-31\t3\t-2231.628984\t1\t0\t1.51\r\nHU507.2002-08-31\tAGG_COACH.2002-08-31\t4\t-1963.080078\t1\t0\t1.5\r\nHU507.2002-08-31\tAGG_COACH.2002-08-31\t5\t-1643.593099\t1\t0\t1.5\r\nHU507.2002-08-31\tAGG_COACH.2002-08-31\t6\t-1424.586914\t1\t0\t1.5\r\nHU507.2002-08-31\tAGG_COACH.2002-08-31\t7\t-1209.439941\t1\t0\t1.5\r\nHU507.2002-08-31\tAGG_COACH.2002-08-31\t8\t-979.9932453\t1\t0\t1.5\r\nHU507.2002-08-31\tAGG_COACH.2002-08-31\t9\t-769.160034\t1\t0\t1.5\r\nHU507.2002-08-31\tAGG_COACH.2002-08-31\t10\t-335.9533287\t1\t0\t1.5\r\nHU507.2002-08-31\tAGG_COACH.2002-08-31\t11\t0\t1\t0\t0\r\n```\r\n\r\nAha, I think I got the reason. For `HU507 to AGG_COACH` for July, our penalty data starts from  `18.49`. Below this number there is nothing. Because of that, your code constrains it. Below are figures from penalty data DSS. \r\n\r\n![cost](https://cloud.githubusercontent.com/assets/14085662/17086580/06d91788-51ab-11e6-914f-f046b2d99528.jpg)\r\n![inputcost](https://cloud.githubusercontent.com/assets/14085662/17086589/2027461a-51ab-11e6-83de-7bf0454194a4.JPG)\r\n\r\nI think the decision was to extend the beginning and ending penalties. As far as I know, HEC-PRM does that automatically. Am I right @qjhart @mimijenkins1?\r\n"},"comment":{"url":"https://api.github.com/repos/ucd-cws/calvin-network-tools/issues/comments/249268716","html_url":"https://github.com/ucd-cws/calvin-network-tools/issues/36#issuecomment-249268716","issue_url":"https://api.github.com/repos/ucd-cws/calvin-network-tools/issues/36","id":249268716,"user":{"login":"jdherman","id":1936620,"avatar_url":"https://avatars.githubusercontent.com/u/1936620?v=3","gravatar_id":"","url":"https://api.github.com/users/jdherman","html_url":"https://github.com/jdherman","followers_url":"https://api.github.com/users/jdherman/followers","following_url":"https://api.github.com/users/jdherman/following{/other_user}","gists_url":"https://api.github.com/users/jdherman/gists{/gist_id}","starred_url":"https://api.github.com/users/jdherman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdherman/subscriptions","organizations_url":"https://api.github.com/users/jdherman/orgs","repos_url":"https://api.github.com/users/jdherman/repos","events_url":"https://api.github.com/users/jdherman/events{/privacy}","received_events_url":"https://api.github.com/users/jdherman/received_events","type":"User","site_admin":false},"created_at":"2016-09-23T18:32:00Z","updated_at":"2016-09-23T18:32:00Z","body":"Notes from 9/23 meeting, we worked out the logic for how to handle these. Picture attached.\r\n(\"slope\" refers to any of the slopes for the full curve. LB/UB are the physical bounds for the whole link. Lowercase l/u are the lower/upper bounds on each piecewise piece in the matrix export).\r\n\r\nWe don't want to change the actual HOBBES data. This should all be happening in the matrix exporting script.\r\n\r\n![img_8473](https://cloud.githubusercontent.com/assets/1936620/18797140/505be90c-8181-11e6-84f6-d0ef0ae7e0eb.JPG)\r\n\r\nDoes this make sense?"}}
{"actor":{"display_login":"jdherman"}}