You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rewrite the package to use Symbolics and ReversePropagation (#212)
* Add source files for rewrite
* Add basic examples
* Add ConstraintProblem
* Bump versions
* Add model.jl
* update Project.toml and workflow
* Update rewrite branch. Working with Symbolics 5, IntervalArithmetic 0.20
* Pass nanmath=false to build_function
* Fix action of separator on box
* Require Julia 1.10
* Working with new versions of packages
* Add basic usage and image to readme
* Add boundary to plot
* Fix
* Replace PNG with SVG
* Get tests passing with new API
* Clean up by removing unneeded code and MacroTools dep
* Add back missing files after name change
---------
Co-authored-by: lucaferranti <[email protected]>
This Julia package allows us to specify a set of constraints on real-valued variables,
8
7
given by inequalities, and
@@ -13,14 +12,44 @@ The package is based on interval arithmetic using the
13
12
[`IntervalArithmetic.jl`](https://github.com/JuliaIntervals/IntervalArithmetic.jl) package (co-written by the author),
14
13
in particular multi-dimensional `IntervalBox`es (i.e. Cartesian products of one-dimensional intervals).
15
14
16
-
## Documentation
15
+
<!--## Documentation
17
16
Documentation for the package is available [here](https://juliaintervals.github.io/pages/packages/intervalconstraintprogramming/).
18
17
19
-
The best way to learn how to use the package is to look at the tutorial, available in the organisation webpage [here](https://juliaintervals.github.io/pages/tutorials/tutorialConstraintProgramming/).
18
+
The best way to learn how to use the package is to look at the tutorial, available in the organisation webpage [here](https://juliaintervals.github.io/pages/tutorials/tutorialConstraintProgramming/). -->
19
+
20
+
## Basic usage
21
+
22
+
```jl
23
+
using IntervalArithmetic, IntervalArithmetic.Symbols
- The inner, blue, region is guaranteed to lie *inside* the constraint set.
47
+
- The outer, white, region is guaranteed to lie *outside* the constraint set.
48
+
- The in-between, red, region is not known at this tolerance.
49
+
50
+

20
51
21
-
#### ℹ️ Note on ModelingToolkit
22
52
23
-
ModelingToolkit can be used to conveniently define constraints, as described in the tutorial. However, that package is only compatible up to Julia version 1.9, and it needs to be installed manually and restricted to version 3. Later versions of ModelingToolkit or Julia are not compatible yet.
@@ -133,7 +133,7 @@ p (generic function with 1 method)
133
133
julia> S=Separator(pvars, f)
134
134
Separator:
135
135
- variables: x, y
136
-
- expression:x() +y() == [-∞, 1]
136
+
- expression:x() +y() == [-Inf, 1]
137
137
```
138
138
#### BasicContractor
139
139
Objects of type `Contractor` have four fields (variables, forward, backward and expression), among them data of two fields (forward, backward) are useful (i.e forward and backward functions) for further usage of that object, thats why it is preferred to use an object of type `BasicContractor` in place of `Contractor` which only contain these two fields for less usage of memory by unloading all the extra stuff.(Note: Like object of `Contractor` type,`BasicContractor`'s object will also have all the properties which are discussed above).
@@ -196,7 +196,7 @@ There are sample 3D calculations in the `examples` directory, in particular in t
196
196
197
197
198
198
## Set operations
199
-
Separators may be combined using the operators `!` (complement), `∩` and `∪` to make
199
+
Separators may be combined using the operators `!` (complement), `⊓` and `⊔` to make
200
200
more complicated sets; see the [notebook](https://github.com/JuliaIntervals/IntervalConstraintProgrammingNotebooks/blob/master/Basic%20examples%20of%20separators.ipynb) for several examples. Further examples can be found in the repository [IntervalConstraintProgrammingNotebooks](https://github.com/JuliaIntervals/IntervalConstraintProgrammingNotebooks).
0 commit comments