{"action":"created","issue":{"url":"https://api.github.com/repos/chocoteam/choco-solver/issues/575","repository_url":"https://api.github.com/repos/chocoteam/choco-solver","labels_url":"https://api.github.com/repos/chocoteam/choco-solver/issues/575/labels{/name}","comments_url":"https://api.github.com/repos/chocoteam/choco-solver/issues/575/comments","events_url":"https://api.github.com/repos/chocoteam/choco-solver/issues/575/events","html_url":"https://github.com/chocoteam/choco-solver/issues/575","id":278885125,"number":575,"title":"how to implement z[i][j] >= y[i][r] + y[j][r] using choco?","user":{"login":"tao0708","id":33822327,"avatar_url":"https://avatars0.githubusercontent.com/u/33822327?v=4","gravatar_id":"","url":"https://api.github.com/users/tao0708","html_url":"https://github.com/tao0708","followers_url":"https://api.github.com/users/tao0708/followers","following_url":"https://api.github.com/users/tao0708/following{/other_user}","gists_url":"https://api.github.com/users/tao0708/gists{/gist_id}","starred_url":"https://api.github.com/users/tao0708/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tao0708/subscriptions","organizations_url":"https://api.github.com/users/tao0708/orgs","repos_url":"https://api.github.com/users/tao0708/repos","events_url":"https://api.github.com/users/tao0708/events{/privacy}","received_events_url":"https://api.github.com/users/tao0708/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-12-04T06:34:25Z","updated_at":"2017-12-05T13:45:11Z","closed_at":null,"author_association":"NONE","body":"IntVar[][] z = model.intVarMatrix(\"sameway_or_not\", 10, 10, new int[]{0,1});\r\nIntVar[][] y = model.intVarMatrix(\"runways\", 10, 2, new int[]{0,1});\r\nIntVar[] runway = model.intVarArray(\"runway\", 10, 1, 2, false);\r\n\r\n(1) z[i][j] >= y[i][r] + y[j][r] - 1; i = 1, ..., 10; j = 1, ..., 10; r = 1,2\r\n(2) if runway[i] is equal to runway[j], then z[i][j] = 1\r\n(3) if runway[j] is not equal to runway[j], then z[i][j] = 0\r\n\r\nhow to implement the above 3 constraints using choco?"},"comment":{"url":"https://api.github.com/repos/chocoteam/choco-solver/issues/comments/349308030","html_url":"https://github.com/chocoteam/choco-solver/issues/575#issuecomment-349308030","issue_url":"https://api.github.com/repos/chocoteam/choco-solver/issues/575","id":349308030,"user":{"login":"jgFages","id":1172247,"avatar_url":"https://avatars2.githubusercontent.com/u/1172247?v=4","gravatar_id":"","url":"https://api.github.com/users/jgFages","html_url":"https://github.com/jgFages","followers_url":"https://api.github.com/users/jgFages/followers","following_url":"https://api.github.com/users/jgFages/following{/other_user}","gists_url":"https://api.github.com/users/jgFages/gists{/gist_id}","starred_url":"https://api.github.com/users/jgFages/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgFages/subscriptions","organizations_url":"https://api.github.com/users/jgFages/orgs","repos_url":"https://api.github.com/users/jgFages/repos","events_url":"https://api.github.com/users/jgFages/events{/privacy}","received_events_url":"https://api.github.com/users/jgFages/received_events","type":"User","site_admin":false},"created_at":"2017-12-05T13:45:11Z","updated_at":"2017-12-05T13:45:11Z","author_association":"CONTRIBUTOR","body":"Do you know how to code in Java? If not we cannot help you (really).\r\nIf yes, then yes everything is in the documentation but in case you find this simpler to follow:\r\n\r\n(in)equality constraints see line \"arithm\" there https://www.cosling.com/choco-solver/hello-world\r\n\r\niterations will be done by java for loops, not choco code (https://www.cosling.com/choco-solver/portfolio)\r\n\r\nyou have model.ifThen(A,B) constraints in choco solver (see official doc/samples or try it yourself)"}}
{"actor":{"display_login":"jgFages"}}