diff --git a/Project.toml b/Project.toml index 46dc81ca7..fe3d20571 100644 --- a/Project.toml +++ b/Project.toml @@ -13,6 +13,7 @@ DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" DomainSets = "5b8099bc-c8ec-5219-889f-1d9e522a28bf" Groebner = "0b43b601-686d-58a3-8a1c-6623616c7cd4" IfElse = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173" +IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" LambertW = "984bce1d-4616-540c-a9ee-88d1112d94c9" Latexify = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" @@ -43,7 +44,9 @@ DocStringExtensions = "0.7, 0.8, 0.9" DomainSets = "0.5" Groebner = "0.3" IfElse = "0.1" +IntervalSets = "0.5, 0.6, 0.7" LaTeXStrings = "1.3" +LambertW = "0.4.5" Latexify = "0.11, 0.12, 0.13, 0.14, 0.15" MacroTools = "0.5" NaNMath = "0.3, 1" @@ -58,7 +61,6 @@ SpecialFunctions = "0.7, 0.8, 0.9, 0.10, 1.0, 2" StaticArrays = "1.1" SymbolicUtils = "1.0.1" TreeViews = "0.3" -LambertW = "0.4.5" julia = "1.6" [extras] diff --git a/src/domains.jl b/src/domains.jl index 965213c38..d5a2a8d77 100644 --- a/src/domains.jl +++ b/src/domains.jl @@ -1,4 +1,5 @@ -import DomainSets: Domain, Interval, AbstractInterval +import IntervalSets: Interval, AbstractInterval, TypedEndpointsInterval +import DomainSets: Domain import Symbolics: value, Sym, Term, Num struct VarDomainPairing @@ -10,6 +11,7 @@ const DomainedVar = Union{Symbolic{<:Number}, Num} Base.:∈(variable::DomainedVar,domain::Domain) = VarDomainPairing(value(variable),domain) Base.:∈(variable::DomainedVar,domain::Interval) = VarDomainPairing(value(variable),domain) +Base.:∈(variable::DomainedVar,domain::TypedEndpointsInterval) = VarDomainPairing(value(variable),domain) # Construct Interval domain from a Tuple Base.:∈(variable::DomainedVar,domain::NTuple{2,Real}) = VarDomainPairing(variable,Interval(domain...))