Skip to content
This repository has been archived by the owner on Dec 14, 2020. It is now read-only.

Commit

Permalink
Merge pull request #28 from ccoffrin/master
Browse files Browse the repository at this point in the history
Maintenance for Julia v0.5 and JuMP v0.15
  • Loading branch information
mlubin authored Apr 1, 2017
2 parents 413f657 + db1909c commit 462f9b3
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ os:
- linux
- osx
julia:
- 0.4
- 0.5
- nightly
notifications:
email: false
Expand Down
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
julia 0.4
julia 0.5
Clp
Cbc
Ipopt
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
environment:
matrix:
- JULIAVERSION: "julialang/bin/winnt/x86/0.4/julia-0.4-latest-win32.exe"
- JULIAVERSION: "julialang/bin/winnt/x64/0.4/julia-0.4-latest-win64.exe"
- JULIAVERSION: "julialang/bin/winnt/x86/0.5/julia-0.5-latest-win32.exe"
- JULIAVERSION: "julialang/bin/winnt/x64/0.5/julia-0.5-latest-win64.exe"
- JULIAVERSION: "julianightlies/bin/winnt/x86/julia-latest-win32.exe"
- JULIAVERSION: "julianightlies/bin/winnt/x64/julia-latest-win64.exe"

Expand Down
8 changes: 5 additions & 3 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ version = "2.9.2"
provides(Sources, URI("http://www.coin-or.org/download/source/OS/OS-$version.tgz"),
[libOS], os = :Unix)

@windows_only begin
@static if is_windows()
using WinRPM
push!(WinRPM.sources, "http://download.opensuse.org/repositories/home:/kelman:/mingw-coinor/openSUSE_13.2")
WinRPM.update()
provides(WinRPM.RPM, "OptimizationServices", [libOS], os = :Windows)
end

@osx_only begin
@static if is_apple()
using Homebrew
provides(Homebrew.HB, "Optimizationservices", [libOS], os = :Darwin)
end
Expand All @@ -33,8 +33,10 @@ patchdir = BinDeps.depsdir(libOS)
builddir = joinpath(BinDeps.depsdir(libOS), "src", "OS-$version", "build")

ENV2 = copy(ENV)
@unix_only ENV2["PKG_CONFIG_PATH"] = string(joinpath(cbclibdir, "pkgconfig"),
@static if is_unix()
ENV2["PKG_CONFIG_PATH"] = string(joinpath(cbclibdir, "pkgconfig"),
":", joinpath(ipoptlibdir, "pkgconfig"))
end
cbcincdir = joinpath(cbclibdir, "..", "include", "coin")

provides(SimpleBuild,
Expand Down
16 changes: 8 additions & 8 deletions src/CoinOptServices.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ osildir = Pkg.dir("CoinOptServices", ".osil")

export OsilSolver, OsilBonminSolver, OsilCouenneSolver, OSOption
immutable OsilSolver <: AbstractMathProgSolver
solver::UTF8String
osil::UTF8String
osol::UTF8String
osrl::UTF8String
solver::String
osil::String
osol::String
osrl::String
printLevel::Int
options::Vector{Dict}
end
Expand Down Expand Up @@ -89,10 +89,10 @@ OSOption(optname, optval; kwargs...) =
OSOption(name = optname, value = optval; kwargs...)

type OsilMathProgModel <: AbstractMathProgModel
solver::UTF8String
osil::UTF8String
osol::UTF8String
osrl::UTF8String
solver::String
osil::String
osol::String
osrl::String
printLevel::Int
options::Vector{Dict}

Expand Down
3 changes: 2 additions & 1 deletion test/REQUIRE
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
JuMP 0.13
JuMP 0.15
OffsetArrays 0.2.13
FactCheck
6 changes: 3 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ nvar = 10
solver=OsilSolver(solver = "couenne")
m = Model(solver=solver)
@variable(m, -10 <= x[i=1:nvar] <= 10)
@NLobjective(m, Min, sum{1/(1+exp(-x[i])), i=1:nvar})
@constraint(m, sum{x[i], i=1:nvar} <= .4*nvar)
@NLobjective(m, Min, sum(1/(1+exp(-x[i])) for i in 1:nvar))
@constraint(m, sum(x[i] for i in 1:nvar) <= .4*nvar)
@test solve(m) == :Optimal
@test isapprox(getvalue(x[1]),-10.0)
@test isapprox(getvalue(x[1]), -10.0)


include(Pkg.dir("JuMP","test","runtests.jl"))

0 comments on commit 462f9b3

Please sign in to comment.