{"push_id":629377291,"size":2,"distinct_size":2,"ref":"refs/heads/run_scheme","head":"576cd056034ff5f47ea8b382643f00b393a3e4f9","before":"a6299a115f5e2f04ff5b56e373a97a65481145aa","commits":[{"sha":"bd1c28c8a7867d310fb74ce118d08726c9fde08b","author":{"email":"6c8ad4dca39f4ad0971678982d1908baefacbc12@gmail.com","name":"Jared Langevin"},"message":"Revert \"Small update to \"mseg.py\" from last merge\"\n\nThis reverts commit a6299a115f5e2f04ff5b56e373a97a65481145aa.","distinct":true,"url":"https://api.github.com/repos/trynthink/ptool2/commits/bd1c28c8a7867d310fb74ce118d08726c9fde08b"},{"sha":"576cd056034ff5f47ea8b382643f00b393a3e4f9","author":{"email":"6c8ad4dca39f4ad0971678982d1908baefacbc12@gmail.com","name":"Jared Langevin"},"message":"Fill out \"find_master_microsegment\" function and add tests\n\nThis commit updates the “find_master_microsegment” function (previously\n“find_microsegment”) to be fully functional given an input measure and\nan input dict with microsegment stock and energy information.\n\nThe basic “find_master_microsegment” routine is as follows:\n\n1.) Initialize a blank “mseg_total” master microsegment dict to be\nupdated as contributing information is found ({“stock: None, “energy”:\nNone}).\n\n2.) Using the master microsegment information attached to the input\nmeasure, define a set of dictionary key chains to use in finding the\nmicrosegment or microsegments that contribute to the master\nmicrosegment.\n\n3.) Loop through each key chain to find stock and energy information\nfor each contributing microsegment in the input microsegments dict\n(“mseg_in”); add this information to the “mseg_total” master\nmicrosegment dict.\n\n4.) Once all the key chains have been looped through, report out the\nfully updated master microsegment dict.\n\nA few other notes about this routine:\n\n- Master microsegments that involve the heating, secondary heating,\nand/or cooling end uses require that “supply” and “demand” nodes be\nadded to their associated key chains.\n- For microsegments where number of units information is not available\n(i.e., “demand” microsegments), the square footage floor space\nassociated with that microsegment is used as “stock” in the master\nmicrosegment.\n\nTwo tests have been added with this commit in a new file “run_test.py”:\n\n- “TestMeasureInit” checks that externally defined measure input\ninformation (which will come from “measures.json”) is correctly\ntranslated into measure object attributes.\n\n-“FindMasterMicrosegmentTest” tests the operation of the\n“find_master_microsegment” function.  Given a sample measure and a\nsample input microsegments dict, the test verifies that the function\nyields a master microsegment with correct stock and energy information.\n The test also runs a second set of cases where only part of the\nmeasure master microsegment is valid, and a final set of cases where\nnone of the measure master microsegment is valid and thus the output\nmaster microsegment should not include any stock or energy information.","distinct":true,"url":"https://api.github.com/repos/trynthink/ptool2/commits/576cd056034ff5f47ea8b382643f00b393a3e4f9"}]}