{"action":"closed","issue":{"url":"https://api.github.com/repos/UWB-Biocomputing/BrainGrid/issues/64","repository_url":"https://api.github.com/repos/UWB-Biocomputing/BrainGrid","labels_url":"https://api.github.com/repos/UWB-Biocomputing/BrainGrid/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/UWB-Biocomputing/BrainGrid/issues/64/comments","events_url":"https://api.github.com/repos/UWB-Biocomputing/BrainGrid/issues/64/events","html_url":"https://github.com/UWB-Biocomputing/BrainGrid/issues/64","id":33370072,"number":64,"title":"Refactor initialization code to facilitate parameter validation","user":{"login":"stiber","id":1878411,"avatar_url":"https://avatars1.githubusercontent.com/u/1878411?v=4","gravatar_id":"","url":"https://api.github.com/users/stiber","html_url":"https://github.com/stiber","followers_url":"https://api.github.com/users/stiber/followers","following_url":"https://api.github.com/users/stiber/following{/other_user}","gists_url":"https://api.github.com/users/stiber/gists{/gist_id}","starred_url":"https://api.github.com/users/stiber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stiber/subscriptions","organizations_url":"https://api.github.com/users/stiber/orgs","repos_url":"https://api.github.com/users/stiber/repos","events_url":"https://api.github.com/users/stiber/events{/privacy}","received_events_url":"https://api.github.com/users/stiber/received_events","type":"User","site_admin":false},"labels":[{"id":635487061,"url":"https://api.github.com/repos/UWB-Biocomputing/BrainGrid/labels/3%20-%20Review","name":"3 - Review","color":"CCCCCC","default":false},{"id":15329611,"url":"https://api.github.com/repos/UWB-Biocomputing/BrainGrid/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":{"login":"tchoi1131","id":21174706,"avatar_url":"https://avatars0.githubusercontent.com/u/21174706?v=4","gravatar_id":"","url":"https://api.github.com/users/tchoi1131","html_url":"https://github.com/tchoi1131","followers_url":"https://api.github.com/users/tchoi1131/followers","following_url":"https://api.github.com/users/tchoi1131/following{/other_user}","gists_url":"https://api.github.com/users/tchoi1131/gists{/gist_id}","starred_url":"https://api.github.com/users/tchoi1131/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tchoi1131/subscriptions","organizations_url":"https://api.github.com/users/tchoi1131/orgs","repos_url":"https://api.github.com/users/tchoi1131/repos","events_url":"https://api.github.com/users/tchoi1131/events{/privacy}","received_events_url":"https://api.github.com/users/tchoi1131/received_events","type":"User","site_admin":false},"assignees":[{"login":"tchoi1131","id":21174706,"avatar_url":"https://avatars0.githubusercontent.com/u/21174706?v=4","gravatar_id":"","url":"https://api.github.com/users/tchoi1131","html_url":"https://github.com/tchoi1131","followers_url":"https://api.github.com/users/tchoi1131/followers","following_url":"https://api.github.com/users/tchoi1131/following{/other_user}","gists_url":"https://api.github.com/users/tchoi1131/gists{/gist_id}","starred_url":"https://api.github.com/users/tchoi1131/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tchoi1131/subscriptions","organizations_url":"https://api.github.com/users/tchoi1131/orgs","repos_url":"https://api.github.com/users/tchoi1131/repos","events_url":"https://api.github.com/users/tchoi1131/events{/privacy}","received_events_url":"https://api.github.com/users/tchoi1131/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/UWB-Biocomputing/BrainGrid/milestones/19","html_url":"https://github.com/UWB-Biocomputing/BrainGrid/milestone/19","labels_url":"https://api.github.com/repos/UWB-Biocomputing/BrainGrid/milestones/19/labels","id":2527913,"number":19,"title":"Summer 2017","description":"","creator":{"login":"stiber","id":1878411,"avatar_url":"https://avatars1.githubusercontent.com/u/1878411?v=4","gravatar_id":"","url":"https://api.github.com/users/stiber","html_url":"https://github.com/stiber","followers_url":"https://api.github.com/users/stiber/followers","following_url":"https://api.github.com/users/stiber/following{/other_user}","gists_url":"https://api.github.com/users/stiber/gists{/gist_id}","starred_url":"https://api.github.com/users/stiber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stiber/subscriptions","organizations_url":"https://api.github.com/users/stiber/orgs","repos_url":"https://api.github.com/users/stiber/repos","events_url":"https://api.github.com/users/stiber/events{/privacy}","received_events_url":"https://api.github.com/users/stiber/received_events","type":"User","site_admin":false},"open_issues":44,"closed_issues":9,"state":"open","created_at":"2017-05-17T21:00:09Z","updated_at":"2017-10-14T02:50:39Z","due_on":"2017-09-30T07:00:00Z","closed_at":null},"comments":9,"created_at":"2014-05-13T05:41:21Z","updated_at":"2017-10-14T02:50:39Z","closed_at":"2017-10-14T02:50:38Z","author_association":"CONTRIBUTOR","body":"This is an extension to issue #16.\n\nRight now, both the Model and SimulationInfo objects are created in BGdriver.cpp. However, the way they are created, and the order they are initialized from parsed parameter files, precludes some input validation. In particular:\n- model is declared as a global pointer to a Model; simInfo is a local variable (a SimulationInfo).\n- A default Model is created in main() and initialized by load_simulation_parameters(); the SimulationInfo object is created, initialized, and returned by makeSimulationInfo().\n- model is initialized before simInfo is created and initialized.\n- All of the parameters used to create simInfo are loaded by LoadSimParms() (which is called by load_simulation_parameters(), to make things confusing). These values are saved in global variables, then later used by makeSimulationInfo() to create and initialize simInfo.\n\nThis is confusing, and overly complex. Here are the suggested modifications:\n1. Make simInfo a global pointer variable, like model.\n2. Create a default SimulationInfo object, like is now done with the Model object.\n3. Rename load_simulation_parameters() to something like LoadAllParameters().\n4. Rename LoadSimParms() to something like LoadSimulationParameters().\n5. Make all of the parameters that are now globals (but really only used temporarily, to hold values until simInfo is created) local variables in LoadSimulationParameters().\n6. Have LoadSimulationParameters() initialize the (now global) simInfo. Do this _before_ calling Model:: readParameters(). This means that LoadSimulationParameters() will incorporate the code now in makeSimulationInfo().\n\nThis will mean that, when Model:: readParameters() executes, all of the simulation parameters will have loaded (including such things as the number of neurons). The second thing that needs to be done is to pass simInfo to Model:: readParameters(), so that it can use that information for input validation.\n\nIf it gets very cumbersome to pass simInfo to every Model method, a model object can hold a pointer to the simInfo object (we can create the simInfo object first, then pass it in when the model is constructed, for example).\n\r\n\r\n<!---\r\n@huboard:{\"milestone_order\":64.0,\"order\":58.08415686375785,\"custom_state\":\"\"}\n-->\r\n"}}
{"actor":{"display_login":"stiber"}}