{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaOpt/MathProgBase.jl/issues/52","labels_url":"https://api.github.com/repos/JuliaOpt/MathProgBase.jl/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/JuliaOpt/MathProgBase.jl/issues/52/comments","events_url":"https://api.github.com/repos/JuliaOpt/MathProgBase.jl/issues/52/events","html_url":"https://github.com/JuliaOpt/MathProgBase.jl/issues/52","id":54191204,"number":52,"title":"Quadratic programs with CPLEX and Gurobi","user":{"login":"dafrick","id":8029749,"avatar_url":"https://avatars.githubusercontent.com/u/8029749?v=3","gravatar_id":"","url":"https://api.github.com/users/dafrick","html_url":"https://github.com/dafrick","followers_url":"https://api.github.com/users/dafrick/followers","following_url":"https://api.github.com/users/dafrick/following{/other_user}","gists_url":"https://api.github.com/users/dafrick/gists{/gist_id}","starred_url":"https://api.github.com/users/dafrick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dafrick/subscriptions","organizations_url":"https://api.github.com/users/dafrick/orgs","repos_url":"https://api.github.com/users/dafrick/repos","events_url":"https://api.github.com/users/dafrick/events{/privacy}","received_events_url":"https://api.github.com/users/dafrick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-13T13:02:06Z","updated_at":"2015-01-13T14:17:41Z","closed_at":null,"body":"I have an issue when using quadprog with both CPLEX and Gurobi, this seems to be due to the fact that they don't support range constraints, i.e. either rowlb or rowub has to be Inf. This would be fine but unfortunately, if I use senses and my problem data are integers then the one-sided constraints are converted to the smallest (or biggest) Int64, not Inf which makes both CPLEX als well as Gurobi trip up.\r\nThis should be fixed in quadprog.jl:29 and 33, by replacing typemin(realtype) and typemax(realtype) with -Inf and Inf respectively.\r\nThe individual solvers should have to decide how they want to deal with Inf."},"comment":{"url":"https://api.github.com/repos/JuliaOpt/MathProgBase.jl/issues/comments/69749855","html_url":"https://github.com/JuliaOpt/MathProgBase.jl/issues/52#issuecomment-69749855","issue_url":"https://api.github.com/repos/JuliaOpt/MathProgBase.jl/issues/52","id":69749855,"user":{"login":"joehuchette","id":1373010,"avatar_url":"https://avatars.githubusercontent.com/u/1373010?v=3","gravatar_id":"","url":"https://api.github.com/users/joehuchette","html_url":"https://github.com/joehuchette","followers_url":"https://api.github.com/users/joehuchette/followers","following_url":"https://api.github.com/users/joehuchette/following{/other_user}","gists_url":"https://api.github.com/users/joehuchette/gists{/gist_id}","starred_url":"https://api.github.com/users/joehuchette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joehuchette/subscriptions","organizations_url":"https://api.github.com/users/joehuchette/orgs","repos_url":"https://api.github.com/users/joehuchette/repos","events_url":"https://api.github.com/users/joehuchette/events{/privacy}","received_events_url":"https://api.github.com/users/joehuchette/received_events","type":"User","site_admin":false},"created_at":"2015-01-13T14:17:41Z","updated_at":"2015-01-13T14:17:41Z","body":"The problem with this fix is that there is no notion of Inf for Int64, so trying to do an assignment like \r\n```julia\r\nrowub = Array(Int64, 1)\r\nrowub[1] = Inf # => ERROR: InexactError()\r\n```\r\nwill fail. I'm not sure what the best fix for the general problem here is TBH, though converting your data to Float64 should fix your immediate issue. cc @mlubin @IainNZ.\r\n\r\n(I should note that at least CPLEX supports QPs with ranged constraints [I'm solving some right now], but that duals aren't supported in an intelligent way, hence the warning message).\r\n\r\n"}}