{"action":"created","issue":{"url":"https://api.github.com/repos/convexengineering/robust/issues/14","repository_url":"https://api.github.com/repos/convexengineering/robust","labels_url":"https://api.github.com/repos/convexengineering/robust/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/convexengineering/robust/issues/14/comments","events_url":"https://api.github.com/repos/convexengineering/robust/issues/14/events","html_url":"https://github.com/convexengineering/robust/issues/14","id":361809246,"node_id":"MDU6SXNzdWUzNjE4MDkyNDY=","number":14,"title":"Can Gamma be a variable?","user":{"login":"1ozturkbe","id":15684191,"node_id":"MDQ6VXNlcjE1Njg0MTkx","avatar_url":"https://avatars0.githubusercontent.com/u/15684191?v=4","gravatar_id":"","url":"https://api.github.com/users/1ozturkbe","html_url":"https://github.com/1ozturkbe","followers_url":"https://api.github.com/users/1ozturkbe/followers","following_url":"https://api.github.com/users/1ozturkbe/following{/other_user}","gists_url":"https://api.github.com/users/1ozturkbe/gists{/gist_id}","starred_url":"https://api.github.com/users/1ozturkbe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1ozturkbe/subscriptions","organizations_url":"https://api.github.com/users/1ozturkbe/orgs","repos_url":"https://api.github.com/users/1ozturkbe/repos","events_url":"https://api.github.com/users/1ozturkbe/events{/privacy}","received_events_url":"https://api.github.com/users/1ozturkbe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-09-19T15:40:34Z","updated_at":"2018-09-26T14:48:19Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"(For goal programming) I added SimPleAC_goal to robustSPpaper/code, and when I made Gamma a variable there I got the following error:\r\n```python\r\nrun SimPleAC_goal\r\nSP is not converging! Last GP iteration had a higher cost (5.8e+02) than the previous one (5.1e+02). Results for each iteration are in (Model).program.results. If your model contains SignomialEqualities, note that convergence is not guaranteed: try replacing any SigEqs you can and solving again.\r\n---------------------------------------------------------------------------\r\nAttributeError                            Traceback (most recent call last)\r\nC:\\Users\\Berk\\Dropbox (MIT)\\MIT Graduate School\\code\\robustSPpaper\\code\\SimPleAC_goal.py in <module>()\r\n     15     Gamma = Variable('\\Gamma','-','Uncertainty bound')\r\n     16     m = Model(1/Gamma, [m, m.cost <= sol['cost']*1.2, Gamma <= 1e30])\r\n---> 17     rm = RobustModel(m, 'elliptical', twoTerm=False, gamma=Gamma)\r\n     18     rmsol = rm.robustsolve(verbosity=0)  # solve the robust model\r\n     19\r\n\r\nc:\\users\\berk\\dropbox (mit)\\mit graduate school\\code\\robust\\robust\\robust.pyc in __init__(self, model, type_of_uncertainty_set, **options)\r\n    143         self.number_of_gp_posynomials = len(gp_posynomials)\r\n    144\r\n--> 145         constraints_posynomials_tuple = self.classify_gp_constraints(gp_posynomials)\r\n    146\r\n    147         self.ready_gp_constraints += constraints_posynomials_tuple[0]\r\n\r\nc:\\users\\berk\\dropbox (mit)\\mit graduate school\\code\\robust\\robust\\robust.pyc in classify_gp_constraints(self, gp_posynomials, offset)\r\n    262         for i, p in enumerate(data_gp_posynomials):\r\n    263             if len(p.exps) == 1:\r\n--> 264                 robust_monomial = self.robustify_monomial(p)\r\n    265                 ready_gp_constraints += [robust_monomial <= 1]\r\n    266             elif len(p.exps) == 2 and self.setting.get('linearizeTwoTerm'):\r\n\r\nc:\\users\\berk\\dropbox (mit)\\mit graduate school\\code\\robust\\robust\\robust.pyc in robustify_monomial(self, monomial)\r\n    287         for var in m_direct_uncertain_vars:\r\n    288             eta_min, eta_max = RobustGPTools.generate_etas(var, self.type_of_uncertainty_set,\r\n--> 289                                                            self.number_of_stds, self.setting)\r\n    290             center = (eta_min + eta_max) / 2.0\r\n    291             scale = eta_max - center\r\n\r\nc:\\users\\berk\\dropbox (mit)\\mit graduate school\\code\\robust\\robust\\robust_gp_tools.pyc in generate_etas(var, type_of_uncertainty_set, number_of_stds, setting)\r\n     52                 elif type_of_uncertainty_set == 'elliptical':\r\n     53                     pr = var.key.pr * setting.get(\"gamma\")\r\n---> 54                     eta_max = np.log(1 + pr / 100.0)\r\n     55                     eta_min = np.log(1 - pr / 100.0)\r\n     56         return eta_min, eta_max\r\n\r\nAttributeError: 'Posynomial' object has no attribute 'log'\r\n```\r\nI guess here you are trying to take a log of the Gamma variable, so I am wondering if you can even make it a variable in the current code? @alisaab "},"comment":{"url":"https://api.github.com/repos/convexengineering/robust/issues/comments/424744186","html_url":"https://github.com/convexengineering/robust/issues/14#issuecomment-424744186","issue_url":"https://api.github.com/repos/convexengineering/robust/issues/14","id":424744186,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNDc0NDE4Ng==","user":{"login":"1ozturkbe","id":15684191,"node_id":"MDQ6VXNlcjE1Njg0MTkx","avatar_url":"https://avatars0.githubusercontent.com/u/15684191?v=4","gravatar_id":"","url":"https://api.github.com/users/1ozturkbe","html_url":"https://github.com/1ozturkbe","followers_url":"https://api.github.com/users/1ozturkbe/followers","following_url":"https://api.github.com/users/1ozturkbe/following{/other_user}","gists_url":"https://api.github.com/users/1ozturkbe/gists{/gist_id}","starred_url":"https://api.github.com/users/1ozturkbe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1ozturkbe/subscriptions","organizations_url":"https://api.github.com/users/1ozturkbe/orgs","repos_url":"https://api.github.com/users/1ozturkbe/repos","events_url":"https://api.github.com/users/1ozturkbe/events{/privacy}","received_events_url":"https://api.github.com/users/1ozturkbe/received_events","type":"User","site_admin":false},"created_at":"2018-09-26T14:48:19Z","updated_at":"2018-09-26T14:48:19Z","author_association":"CONTRIBUTOR","body":"oh crud, didn't realize we needed different branches of literally everything. Will do!"}}
{"actor":{"display_login":"1ozturkbe"}}