{"action":"created","issue":{"url":"https://api.github.com/repos/tbeu/Modelica/issues/1068","repository_url":"https://api.github.com/repos/tbeu/Modelica","labels_url":"https://api.github.com/repos/tbeu/Modelica/issues/1068/labels{/name}","comments_url":"https://api.github.com/repos/tbeu/Modelica/issues/1068/comments","events_url":"https://api.github.com/repos/tbeu/Modelica/issues/1068/events","html_url":"https://github.com/tbeu/Modelica/issues/1068","id":197081066,"number":1068,"title":"Illegal uses of conditional components in Fluid.Vessels","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":[{"id":504692710,"url":"https://api.github.com/repos/tbeu/Modelica/labels/bug","name":"bug","color":"ee0701","default":true}],"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":{"url":"https://api.github.com/repos/tbeu/Modelica/milestones/43","html_url":"https://github.com/tbeu/Modelica/milestone/43","labels_url":"https://api.github.com/repos/tbeu/Modelica/milestones/43/labels","id":2209214,"number":43,"title":"ModelicaSpec3.2rev2","description":"","creator":{"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},"open_issues":1,"closed_issues":1,"state":"closed","created_at":"2016-12-21T08:15:37Z","updated_at":"2016-12-22T02:34:13Z","due_on":"2012-09-07T07:00:00Z","closed_at":"2016-12-21T08:15:37Z"},"comments":5,"created_at":"2016-12-22T02:32:33Z","updated_at":"2016-12-22T02:34:24Z","closed_at":null,"body":"**Reported by jmattsson on 9 Apr 2013 16:12 UTC**\n`Modelica.Fluid.Vessels.BaseClasses.PartialLumpedVessel` contains the declarations (with others in between):\n```\nparameter Boolean use_portsData = true;\nparameter Modelica.Fluid.Vessels.BaseClasses.VesselPortsData[nPorts] portsData if use_portsData;\nModelica.Blocks.Interfaces.RealInput[nPorts] portsData_diameter_internal = portsData.diameter if use_portsData and nPorts > 0;\nModelica.Blocks.Interfaces.RealInput[nPorts] portsData_height_internal = portsData.height if use_portsData and nPorts > 0;\nModelica.Blocks.Interfaces.RealInput[nPorts] portsData_zeta_in_internal = portsData.zeta_in if use_portsData and nPorts > 0;\nModelica.Blocks.Interfaces.RealInput[nPorts] portsData_zeta_out_internal = portsData.zeta_out if use_portsData and nPorts > 0;\n```\n\nThe problem is that the last four use portsData in their value modifications. While it might be easy to see that they only exist if portsData does, the specification forbids any uses of conditional components other than in connect clauses.\n\n----\n\nMigrated-From: https://trac.modelica.org/Modelica/ticket/1068"},"comment":{"url":"https://api.github.com/repos/tbeu/Modelica/issues/comments/268703052","html_url":"https://github.com/tbeu/Modelica/issues/1068#issuecomment-268703052","issue_url":"https://api.github.com/repos/tbeu/Modelica/issues/1068","id":268703052,"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-22T02:34:23Z","updated_at":"2016-12-22T02:34:23Z","body":"**Comment by jmattsson on 19 Apr 2013 14:30 UTC**\nReplying to [comment:4 otter]:\n> The issue is that \" the specification forbids any uses of conditional components other than in connect clauses.\" is not correct. \n\nThe actual specification text is: _A component declared with a condition_attribute can only be modified and/or used in connections._ Note that it says \"modified\", not \"used in modifiers\".\n\n> Conditional components can be used in declarations, as long as this declaration is only present if the conditional component is present. This feature is not only used in the partialLumpedVessel model but also in other cases. I also think that this makes complete sense.\n\nThe problem is that it is very hard to determine if that holds. If both conditional expressions are references to the same parameter, then it is simple, but isn't necessarily the case.\n\nIf I understand the problem you describe correctly, it sounds like it would work to make the size dependent on use_portsData:\n```mo\nparameter VesselPortsData[if use_portsData nPorts else 0] portsData;\n```"}}
{"actor":{"display_login":"modelica-trac-importer"}}