-
Notifications
You must be signed in to change notification settings - Fork 33
Set macro
Marcelo Forets edited this page Jan 30, 2022
·
5 revisions
The task is to define two convenience macros for modeling with sets:
-
@var
: to define the "working" variables. -
@set
: to describe and instantiate a set object.
Related issues:
- https://github.com/JuliaReach/LazySets.jl/issues/718
- https://github.com/JuliaReach/LazySets.jl/pull/2314
Related libraries that have dealt with this problem.
- SetProg: https://github.com/blegat/SetProg.jl
- JuMP: https://github.com/JuliaOpt/JuMP.jl/blob/master/src/macros.jl
- ModelingToolkit: https://github.com/JuliaDiffEq/ModelingToolkit.jl
- HCModelKit: https://github.com/JuliaHomotopyContinuation/HCModelKit.jl
For instance,
H = HalfSpace([1., 1.], 2.0) # x + y <= 2
@variables x y
H = @set x + y <= 2
TODO complete
TODO