IntervalConstraintProgramming.jl API
Types
Create a separator without the use of macros using ModelingToolkit
e.g vars = @variables x y z S = Separator(vars, x^2+y^2<1) X= IntervalBox(-0.5..1.5, -0.5..1.5, -0.5..1.5) S(X)
Macros
@constraint - Macro
Create a separator from a given constraint expression, written as standard Julia code.
e.g. C = @constraint x^2 + y^2 <= 1
The variables (x
and y
, in this case) are automatically inferred. External constants can be used as e.g. $a
:
a = 3
C = @constraint x^2 + y^2 <= $a
@contractor - Macro
Usage:
C = @contractor(x^2 + y^2)
A = -∞..1 # the constraint interval
x = y = @interval(0.5, 1.5)
C(A, x, y)
`@contractor` makes a function that takes as arguments the variables contained in the expression, in lexicographic order
TODO: Hygiene for global variables, or pass in parameters
Methods
pave
takes the given working list of boxes and splits them into inner and boundary lists with the given separator
pave(S::Separator, domain::IntervalBox, eps)`
Find the subset of domain
defined by the constraints specified by the separator S
. Returns (sub)pavings inner
and boundary
, i.e. lists of IntervalBox
.
© JuliaIntervals. Last modified: March 05, 2021. Website built with Franklin.jl.