{"action":"opened","issue":{"url":"https://api.github.com/repos/coin-or/CoinMP/issues/5","repository_url":"https://api.github.com/repos/coin-or/CoinMP","labels_url":"https://api.github.com/repos/coin-or/CoinMP/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/coin-or/CoinMP/issues/5/comments","events_url":"https://api.github.com/repos/coin-or/CoinMP/issues/5/events","html_url":"https://github.com/coin-or/CoinMP/issues/5","id":370793422,"node_id":"MDU6SXNzdWUzNzA3OTM0MjI=","number":5,"title":"[Trac] Issues using Special Ordered Sets","user":{"login":"s-c-e","id":11558962,"node_id":"MDQ6VXNlcjExNTU4OTYy","avatar_url":"https://avatars3.githubusercontent.com/u/11558962?v=4","gravatar_id":"","url":"https://api.github.com/users/s-c-e","html_url":"https://github.com/s-c-e","followers_url":"https://api.github.com/users/s-c-e/followers","following_url":"https://api.github.com/users/s-c-e/following{/other_user}","gists_url":"https://api.github.com/users/s-c-e/gists{/gist_id}","starred_url":"https://api.github.com/users/s-c-e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-c-e/subscriptions","organizations_url":"https://api.github.com/users/s-c-e/orgs","repos_url":"https://api.github.com/users/s-c-e/repos","events_url":"https://api.github.com/users/s-c-e/events{/privacy}","received_events_url":"https://api.github.com/users/s-c-e/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-16T20:48:53Z","updated_at":"2018-10-16T20:48:53Z","closed_at":null,"author_association":"NONE","body":"![image](https://user-images.githubusercontent.com/11558962/47046523-e5f37680-d15a-11e8-92b2-5970b8c8ba23.png)\r\n\r\nI seem to be having an issue with Special Ordered Sets of Type 1 and Type 2. When you set up an SOS of Type 1 or Type 2 and one of the variables in the set has a cost in the objective of 0, CoinMP fails to find an optimal solution.\r\n\r\nBelow are examples model in LP Solve format. (I had to use LP Solve since it appears the output to MPS in CoinMP also does not print the SOS constraint types).\r\n\r\nIt is possible that the code I am using is doing something incorrect when constructing the model, but it does work when there are all non-zero costs in the objective row.\r\n\r\n```\r\n/*SOS Type 1 Working Model+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/\r\n/* Objective function */\r\nmin: +C1 +5 C2 +5 C3 +10 C4;\r\n\r\n/* Constraints */\r\nR1: +C1 <= 10;\r\nR2: +C2 <= 25;\r\nR3: +C3 <= 25;\r\nR4: +C4 <= 35;\r\n+C1 +C2 +C3 +C4 >= 35;\r\n\r\n/* SOS definitions */\r\nSOS\r\n5: C1:0,C2,C3,C4 <= 1:4;\r\n\r\n\r\n/*SOS Type 1 Non-working Model+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/\r\n/* Objective function */\r\nmin: +5 C2 +5 C3 +10 C4;\r\n\r\n/* Constraints */\r\nR1: +C1 <= 10;\r\nR2: +C2 <= 25;\r\nR3: +C3 <= 25;\r\nR4: +C4 <= 35;\r\n+C1 +C2 +C3 +C4 >= 35;\r\n\r\n/* SOS definitions */\r\nSOS\r\n5: C1:0,C2,C3,C4 <= 1:4;\r\n\r\n\r\n/*SOS Type 2 Working Model+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/\r\n/* Objective function */\r\nmin: +C1 +C2 +30 C3 +30 C4 +C5 +C6;\r\n\r\n/* Constraints */\r\nR1: +C1 <= 30;\r\nR2: +C2 <= 4;\r\nR3: +C3 <= 25;\r\nR4: +C4 <= 10;\r\nR5: +C5 <= 14;\r\nR6: +C6 <= 20;\r\n+C1 +C2 +C3 +C4 +C5 +C6 >= 35;\r\n\r\n/* SOS definitions */\r\nSOS\r\n7: C1:0,C2,C3,C4,C5,C6 <= 2:6;\r\n\r\n/*SOS Type 2 Non-working Model+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/\r\n/* Objective function */\r\nmin: +C2 +30 C3 +30 C4 +C5 +C6;\r\n\r\n/* Constraints */\r\nR1: +C1 <= 30;\r\nR2: +C2 <= 4;\r\nR3: +C3 <= 25;\r\nR4: +C4 <= 10;\r\nR5: +C5 <= 14;\r\nR6: +C6 <= 20;\r\n+C1 +C2 +C3 +C4 +C5 +C6 >= 35;\r\n\r\n/* SOS definitions */\r\nSOS\r\n7: C1:0,C2,C3,C4,C5,C6 <= 2:6;\r\n```"}}
{"actor":{"display_login":"s-c-e"}}