{"action":"created","issue":{"url":"https://api.github.com/repos/Pyomo/pyomo/issues/378","repository_url":"https://api.github.com/repos/Pyomo/pyomo","labels_url":"https://api.github.com/repos/Pyomo/pyomo/issues/378/labels{/name}","comments_url":"https://api.github.com/repos/Pyomo/pyomo/issues/378/comments","events_url":"https://api.github.com/repos/Pyomo/pyomo/issues/378/events","html_url":"https://github.com/Pyomo/pyomo/issues/378","id":301923061,"number":378,"title":"Using relational Expression in Objective","user":{"login":"blnicho","id":18425615,"avatar_url":"https://avatars1.githubusercontent.com/u/18425615?v=4","gravatar_id":"","url":"https://api.github.com/users/blnicho","html_url":"https://github.com/blnicho","followers_url":"https://api.github.com/users/blnicho/followers","following_url":"https://api.github.com/users/blnicho/following{/other_user}","gists_url":"https://api.github.com/users/blnicho/gists{/gist_id}","starred_url":"https://api.github.com/users/blnicho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blnicho/subscriptions","organizations_url":"https://api.github.com/users/blnicho/orgs","repos_url":"https://api.github.com/users/blnicho/repos","events_url":"https://api.github.com/users/blnicho/events{/privacy}","received_events_url":"https://api.github.com/users/blnicho/received_events","type":"User","site_admin":false},"labels":[{"id":383669303,"url":"https://api.github.com/repos/Pyomo/pyomo/labels/bug","name":"bug","color":"ee0701","default":true},{"id":838460434,"url":"https://api.github.com/repos/Pyomo/pyomo/labels/pyomo.core","name":"pyomo.core","color":"1d76db","default":false},{"id":838460744,"url":"https://api.github.com/repos/Pyomo/pyomo/labels/pyomo.solvers","name":"pyomo.solvers","color":"d4b3ef","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-03-02T22:18:14Z","updated_at":"2018-03-04T20:46:37Z","closed_at":null,"author_association":"MEMBER","body":"The following model is sent to a solver without any warning or error:\r\n\r\n    from pyomo.environ import *\r\n    m = ConcreteModel()\r\n    m.v = Var()\r\n    m.e = Expression(expr=m.v**2 + 2 >= 10)\r\n    m.obj = Objective(expr=m.e)\r\n\r\nWhile the user should be able to construct this model, the writers should be checking `is_relational` on the Expression object before the model is sent to a solver."},"comment":{"url":"https://api.github.com/repos/Pyomo/pyomo/issues/comments/370262519","html_url":"https://github.com/Pyomo/pyomo/issues/378#issuecomment-370262519","issue_url":"https://api.github.com/repos/Pyomo/pyomo/issues/378","id":370262519,"user":{"login":"jsiirola","id":356359,"avatar_url":"https://avatars3.githubusercontent.com/u/356359?v=4","gravatar_id":"","url":"https://api.github.com/users/jsiirola","html_url":"https://github.com/jsiirola","followers_url":"https://api.github.com/users/jsiirola/followers","following_url":"https://api.github.com/users/jsiirola/following{/other_user}","gists_url":"https://api.github.com/users/jsiirola/gists{/gist_id}","starred_url":"https://api.github.com/users/jsiirola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsiirola/subscriptions","organizations_url":"https://api.github.com/users/jsiirola/orgs","repos_url":"https://api.github.com/users/jsiirola/repos","events_url":"https://api.github.com/users/jsiirola/events{/privacy}","received_events_url":"https://api.github.com/users/jsiirola/received_events","type":"User","site_admin":false},"created_at":"2018-03-04T20:46:37Z","updated_at":"2018-03-04T20:46:37Z","author_association":"OWNER","body":"I am not in favor of disallowing relational (logical) expressions in Expression components.  One of the things we would like to do is add explicit support for logical expressions (first for GDP, then to support Constraint Programming modeling approaches). In those contexts I could imagine putting a logical expression in an Expression would be useful. "}}
{"actor":{"display_login":"jsiirola"}}