Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1402 - Remove old v0.6/v0.7 remainder #1406

Merged
merged 5 commits into from
May 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ uuid = "b4f0291d-fe17-52bc-9479-3d1a343d9043"
version = "1.12.0"

[deps]
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
GLPKMathProgInterface = "3c7084bd-78ad-589a-b5bb-dbd673274bea"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
IntervalArithmetic = "d1acc4aa-44c8-5952-acd4-ba5d80a2a253"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MathProgBase = "fdba3010-5040-5b88-9595-932c9decdf73"
Expand All @@ -18,7 +18,6 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[compat]
julia = "≥ 1.0.0"
Compat = "≥ 1.0.0"
Expokit = "≥ 0.1.0"
GLPKMathProgInterface = "≥ 0.4.0"
IntervalArithmetic = "≥ 0.14.0"
Expand All @@ -29,7 +28,6 @@ RecipesBase = "≥ 0.3.0"
Requires = "≥ 0.4.0"

[extras]
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Expokit = "a1e7a1ef-7a5d-5822-a38c-be74e1bb89f4"
GLPKMathProgInterface = "3c7084bd-78ad-589a-b5bb-dbd673274bea"
Expand All @@ -44,4 +42,4 @@ RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"

[targets]
test = ["Expokit", "Pkg", "IntervalArithmetic", "GLPKMathProgInterface", "Compat", "RecipesBase", "MathProgBase", "Requires", "Optim", "Polyhedra", "Documenter", "Plots", "GR"]
test = ["Expokit", "Pkg", "IntervalArithmetic", "GLPKMathProgInterface", "RecipesBase", "MathProgBase", "Requires", "Optim", "Polyhedra", "Documenter", "Plots", "GR"]
2 changes: 0 additions & 2 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[deps]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
CDDLib = "3391f64e-dcde-5f30-b752-e11513730f60"
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Expokit = "a1e7a1ef-7a5d-5822-a38c-be74e1bb89f4"
GR = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71"
Expand All @@ -15,7 +14,6 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
[compat]
BenchmarkTools = "≥ 0.4.2"
CDDLib = "≥ 0.5.2"
Compat = "≥ 1.0.0"
Documenter = "≥ 0.22.3"
Expokit = "≥ 0.1.0"
GR = "≥ 0.39.1"
Expand Down
3 changes: 1 addition & 2 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
DocTestFilters = [r"[0-9\.]+ seconds \(.*\)"]
CurrentModule = LazySets
DocTestSetup = quote
using LazySets
using Compat.SparseArrays, Compat.LinearAlgebra
using LazySets, SparseArrays, LinearAlgebra
end
```

Expand Down
2 changes: 1 addition & 1 deletion docs/src/lib/interfaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Depth = 4
CurrentModule = LazySets
DocTestSetup = quote
using LazySets
using Compat.InteractiveUtils: subtypes
using InteractiveUtils: subtypes
end
```

Expand Down
2 changes: 1 addition & 1 deletion docs/src/lib/operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Depth = 3
CurrentModule = LazySets
DocTestSetup = quote
using LazySets
using Compat.SparseArrays, Compat.LinearAlgebra
using SparseArrays, LinearAlgebra
end
```

Expand Down
2 changes: 1 addition & 1 deletion docs/src/lib/representations.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Depth = 3
CurrentModule = LazySets
DocTestSetup = quote
using LazySets
using Compat.SparseArrays, Compat.LinearAlgebra
using SparseArrays, LinearAlgebra
end
```

Expand Down
4 changes: 2 additions & 2 deletions docs/src/man/concrete_polyhedra.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Depth = 3

```@meta
DocTestSetup = quote
using Plots, LazySets, LazySets.Approximations, Polyhedra, Compat.LinearAlgebra
using Plots, LazySets, LazySets.Approximations, Polyhedra, LinearAlgebra
end
```

Expand All @@ -42,7 +42,7 @@ To use the `Polyhedra.jl` interface, you need to load the package with `using Po
Let's create an H-representation object:

```@example concrete_polyhedra
using Plots, LazySets, Polyhedra, Compat.LinearAlgebra
using Plots, LazySets, Polyhedra, LinearAlgebra

A = [1. 1;1 -1;-1 0]
b = [1.,0,0]
Expand Down
4 changes: 2 additions & 2 deletions docs/src/man/interval_hulls.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Depth = 3

```@meta
DocTestSetup = quote
using Plots, LazySets, LazySets.Approximations, Compat.SparseArrays
using Plots, LazySets, LazySets.Approximations, SparseArrays
end
```

Expand Down Expand Up @@ -126,7 +126,7 @@ It is defined in the `Approximations` module as well.

```@example example_ih
import LazySets.Approximations.symmetric_interval_hull
using Compat.SparseArrays
using SparseArrays

plot(X, 1e-3, aspectratio=1)
plot!(Y, 1e-3)
Expand Down
9 changes: 4 additions & 5 deletions docs/src/man/reach_zonotopes.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,17 @@ overapproximates the states reachable by any trajectory of this IVP.
## Algorithm

```@example example_reach_zonotopes
using Plots, LazySets, Compat.LinearAlgebra, Compat.SparseArrays
import LazySets.expmat
using Plots, LazySets, LinearAlgebra, SparseArrays

function Algorithm1(A, X0, δ, μ, T)
# bloating factors
Anorm = norm(A, Inf)
α = (expmat(δ * Anorm) - 1 - δ * Anorm) / norm(X0, Inf)
β = (expmat(δ * Anorm) - 1) * μ / Anorm
α = (exp(δ * Anorm) - 1 - δ * Anorm) / norm(X0, Inf)
β = (exp(δ * Anorm) - 1) * μ / Anorm

# discretized system
n = size(A, 1)
ϕ = expmat(δ * A)
ϕ = exp(δ * A)
N = floor(Int, T / δ)

# preallocate arrays
Expand Down
9 changes: 4 additions & 5 deletions docs/src/man/reach_zonotopes_hybrid.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ Depending on the transition semantics, we add the discrete successors to the
queue and continue with the next iteration until the queue is empty.

```@example example_reach_zonotopes_hybrid
using Plots, LazySets, Compat.LinearAlgebra
import LazySets.expmat
using Plots, LazySets, LinearAlgebra

function reach_hybrid(As, Ts, init, δ, μ, T, max_order, instant_transitions)
# initialize queue with initial mode and states at time t=0
Expand Down Expand Up @@ -83,12 +82,12 @@ concrete operations on zonotopes.
function reach_continuous(A, X0, δ, μ, T, max_order)
# bloating factors
Anorm = norm(A, Inf)
α = (expmat(δ*Anorm) - 1 - δ*Anorm)/norm(X0, Inf)
β = (expmat(δ*Anorm) - 1)*μ/Anorm
α = (exp(δ*Anorm) - 1 - δ*Anorm)/norm(X0, Inf)
β = (exp(δ*Anorm) - 1)*μ/Anorm

# discretized system
n = size(A, 1)
ϕ = expmat(δ*A)
ϕ = exp(δ*A)
N = floor(Int, T/δ)

# preallocate array
Expand Down
56 changes: 16 additions & 40 deletions src/AbstractPolytope.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,48 +130,24 @@ end
# =============================================

function load_polyhedra_abstractpolytope() # function to be loaded by Requires

return quote
import .Polyhedra: polyhedron
export polyhedron
using .Polyhedra: HRep, VRep,
removehredundancy!, removevredundancy!,
hreps, vreps,
intersect,
convexhull,
hcartesianproduct, vcartesianproduct,
points,
default_library

function default_polyhedra_backend(P, N::Type{<:AbstractFloat})
return default_library(LazySets.dim(P), Float64)
end

@static if VERSION < v"0.7-"
import Polyhedra: polyhedron
export polyhedron
using Polyhedra: HRep, VRep,
removehredundancy!, removevredundancy!,
hreps, vreps,
intersect,
convexhull,
hcartesianproduct, vcartesianproduct,
points
import CDDLib # default backend

function default_polyhedra_backend(P, N::Type{<:AbstractFloat})
return CDDLib.CDDLibrary()
end

function default_polyhedra_backend(P, N::Type{<:Rational})
return CDDLib.CDDLibrary(:exact)
end

else
import .Polyhedra: polyhedron
export polyhedron
using .Polyhedra: HRep, VRep,
removehredundancy!, removevredundancy!,
hreps, vreps,
intersect,
convexhull,
hcartesianproduct, vcartesianproduct,
points,
default_library

function default_polyhedra_backend(P, N::Type{<:AbstractFloat})
return default_library(LazySets.dim(P), Float64)
end

function default_polyhedra_backend(P, N::Type{<:Rational})
return default_library(LazySets.dim(P), Rational{Int})
end
function default_polyhedra_backend(P, N::Type{<:Rational})
return default_library(LazySets.dim(P), Rational{Int})
end
end # quote
end # function load_polyhedra_hpolytope()
4 changes: 1 addition & 3 deletions src/Approximations/Approximations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ support vectors.
"""
module Approximations

using LazySets, Requires
using LazySets, Requires, LinearAlgebra, SparseArrays

export approximate,
ballinf_approximation,
Expand All @@ -23,8 +23,6 @@ export approximate,
PolarDirections,
SphericalDirections

include("../compat.jl")

const TOL(N::Type{Float64}) = eps(N)
const TOL(N::Type{Float32}) = eps(N)
const TOL(N::Type{Rational{INNER}}) where {INNER} = zero(N)
Expand Down
2 changes: 1 addition & 1 deletion src/Approximations/overapproximate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ hybrid systems using a combination of zonotopes and polytopes. Nonlinear analysi
hybrid systems, 4(2), 233-249.*
"""
function overapproximate(Z::Zonotope, ::Type{<:Hyperrectangle})::Hyperrectangle
r = Compat.sum(abs.(Z.generators), dims=2)[:]
r = sum(abs.(Z.generators), dims=2)[:]
return Hyperrectangle(Z.center, r)
end

Expand Down
Loading