{"action":"created","issue":{"url":"https://api.github.com/repos/tbeu/Modelica/issues/1899","repository_url":"https://api.github.com/repos/tbeu/Modelica","labels_url":"https://api.github.com/repos/tbeu/Modelica/issues/1899/labels{/name}","comments_url":"https://api.github.com/repos/tbeu/Modelica/issues/1899/comments","events_url":"https://api.github.com/repos/tbeu/Modelica/issues/1899/events","html_url":"https://github.com/tbeu/Modelica/issues/1899","id":197304468,"number":1899,"title":"ModelicaStandardTables_*_read handling is fragile","user":{"login":"modelica-trac-importer","id":22202507,"avatar_url":"https://avatars.githubusercontent.com/u/22202507?v=3","gravatar_id":"","url":"https://api.github.com/users/modelica-trac-importer","html_url":"https://github.com/modelica-trac-importer","followers_url":"https://api.github.com/users/modelica-trac-importer/followers","following_url":"https://api.github.com/users/modelica-trac-importer/following{/other_user}","gists_url":"https://api.github.com/users/modelica-trac-importer/gists{/gist_id}","starred_url":"https://api.github.com/users/modelica-trac-importer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modelica-trac-importer/subscriptions","organizations_url":"https://api.github.com/users/modelica-trac-importer/orgs","repos_url":"https://api.github.com/users/modelica-trac-importer/repos","events_url":"https://api.github.com/users/modelica-trac-importer/events{/privacy}","received_events_url":"https://api.github.com/users/modelica-trac-importer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"beutlich","id":14896695,"avatar_url":"https://avatars.githubusercontent.com/u/14896695?v=3","gravatar_id":"","url":"https://api.github.com/users/beutlich","html_url":"https://github.com/beutlich","followers_url":"https://api.github.com/users/beutlich/followers","following_url":"https://api.github.com/users/beutlich/following{/other_user}","gists_url":"https://api.github.com/users/beutlich/gists{/gist_id}","starred_url":"https://api.github.com/users/beutlich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beutlich/subscriptions","organizations_url":"https://api.github.com/users/beutlich/orgs","repos_url":"https://api.github.com/users/beutlich/repos","events_url":"https://api.github.com/users/beutlich/events{/privacy}","received_events_url":"https://api.github.com/users/beutlich/received_events","type":"User","site_admin":false},"assignees":[{"login":"beutlich","id":14896695,"avatar_url":"https://avatars.githubusercontent.com/u/14896695?v=3","gravatar_id":"","url":"https://api.github.com/users/beutlich","html_url":"https://github.com/beutlich","followers_url":"https://api.github.com/users/beutlich/followers","following_url":"https://api.github.com/users/beutlich/following{/other_user}","gists_url":"https://api.github.com/users/beutlich/gists{/gist_id}","starred_url":"https://api.github.com/users/beutlich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beutlich/subscriptions","organizations_url":"https://api.github.com/users/beutlich/orgs","repos_url":"https://api.github.com/users/beutlich/repos","events_url":"https://api.github.com/users/beutlich/events{/privacy}","received_events_url":"https://api.github.com/users/beutlich/received_events","type":"User","site_admin":false}],"milestone":null,"comments":16,"created_at":"2016-12-23T02:41:09Z","updated_at":"2016-12-23T02:43:51Z","closed_at":null,"body":"**Reported by hansolsson on 29 Jan 2016 16:05 UTC**\nThe functions ModelicaStandardTables_\\*_read are somewhat fragile in some scenarios. If they are not called for the specific table after the constructor and before the \\*_getValue calls it will just silently return 0.0.\n\nIt would suggest calling \\*_read (with force=false) at the start of \\*_getValue, or possibly inline the test to make it more efficient.\nI could add it myself if agreed on (would just be a few lines).\n\nAnother possibility would just be to generate an error message for this case. I find that less good, but still better than the current variant of silent failure is problematic.\n\nI'm aware of #1103, and I agree that the possibility of re-reading the table is an argument for having it as two functions - but I don't like the implications in terms of error handling.\n\n----\n\nMigrated-From: https://trac.modelica.org/Modelica/ticket/1899"},"comment":{"url":"https://api.github.com/repos/tbeu/Modelica/issues/comments/268932219","html_url":"https://github.com/tbeu/Modelica/issues/1899#issuecomment-268932219","issue_url":"https://api.github.com/repos/tbeu/Modelica/issues/1899","id":268932219,"user":{"login":"modelica-trac-importer","id":22202507,"avatar_url":"https://avatars.githubusercontent.com/u/22202507?v=3","gravatar_id":"","url":"https://api.github.com/users/modelica-trac-importer","html_url":"https://github.com/modelica-trac-importer","followers_url":"https://api.github.com/users/modelica-trac-importer/followers","following_url":"https://api.github.com/users/modelica-trac-importer/following{/other_user}","gists_url":"https://api.github.com/users/modelica-trac-importer/gists{/gist_id}","starred_url":"https://api.github.com/users/modelica-trac-importer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modelica-trac-importer/subscriptions","organizations_url":"https://api.github.com/users/modelica-trac-importer/orgs","repos_url":"https://api.github.com/users/modelica-trac-importer/repos","events_url":"https://api.github.com/users/modelica-trac-importer/events{/privacy}","received_events_url":"https://api.github.com/users/modelica-trac-importer/received_events","type":"User","site_admin":false},"created_at":"2016-12-23T02:43:51Z","updated_at":"2016-12-23T02:43:51Z","body":"**Comment by hansolsson on 5 Feb 2016 17:18 UTC**\nReplying to [comment:13 beutlich]:\n> Replying to [comment:11 hansolsson]:\n> > To me the hack is the requirement of calling readTableData() in an initial algorithm instead of doing this in the constructor. \n> If this is now considered as a hack I propose the following list of action items and hope we can discuss and agree on them.\n> \n> 1. Create a new ticket about clarification of initialization of external objects. It should be stated that external objects need solely to be initialized in their constructor, and especially must not be initialized by initial algorithms or initial equations. -> Hans\n\nOk, will do.\n\n>  1. Open issue: What to do with _getTableTimeTmin_/_getTableTimeTmax_ and _t_min_/_t_max_ of _CombiTimeTable_? They are pure functions and fixed-false-parameters with initial algorithms, respectively, that depend on the external object.\n\nAs I see it that isn't a problem. Similarly as if one called ...getValue in an inital algorithm to perform a table-lookup - it doesn't change the external object; it just stores a value."}}
{"actor":{"display_login":"modelica-trac-importer"}}