@@ -46,14 +46,7 @@ function dynamicofsystem()
46
46
return F_sys, L_growthbound, ngrowthbound, DF_sys, bound_DF, bound_DDF
47
47
end
48
48
49
- function _initTargetSets ()
50
- _I_ = UT. HyperRectangle (SVector (0.4 , 0.4 , 0.0 ), SVector (0.4 , 0.4 , 0.0 ))
51
- _T_ = UT. HyperRectangle (SVector (3.0 , 0.3 , - 100.0 ), SVector (3.6 , 0.8 , 100.0 ))
52
- return _I_, _T_
53
- end
54
-
55
- function filter_obstacles (_X_, obs)
56
- _I_, _T_ = _initTargetSets ()
49
+ function filter_obstacles (_X_, _I_, _T_, obs)
57
50
obstacles = typeof (_X_)[]
58
51
for ob in obs
59
52
if ob ⊆ _X_ && isempty (ob ∩ _I_) && isempty (ob ∩ _T_)
@@ -136,12 +129,13 @@ function problem(; simple = false, approx_mode = "growth")
136
129
_I_ = UT. HyperRectangle (SVector (0.4 , 0.4 , 0.0 ), SVector (0.4 , 0.4 , 0.0 ))
137
130
_T_ = UT. HyperRectangle (SVector (3.0 , 0.3 , - 100.0 ), SVector (3.6 , 0.8 , 100.0 ))
138
131
else
139
- _X_ = UT. HyperRectangle (SVector (0.0 , 0.0 , - pi - 0.4 ), SVector (10.0 , 10.0 , pi + 0.4 ))
132
+ _X_ =
133
+ UT. HyperRectangle (SVector (- 0.1 , - 0.1 , - pi - 0.4 ), SVector (10.1 , 10.1 , pi + 0.4 ))
140
134
_I_ = UT. HyperRectangle (SVector (0.4 , 0.4 , 0.0 ), SVector (0.4 , 0.4 , 0.0 ))
141
135
_T_ = UT. HyperRectangle (SVector (9.0 , 0.3 , - 100.0 ), SVector (9.6 , 0.8 , 100.0 ))
142
136
end
143
137
obs = get_obstacles (_X_)
144
- obstacles_LU = filter_obstacles (_X_, obs)
138
+ obstacles_LU = filter_obstacles (_X_, _I_, _T_, obs)
145
139
_X_ = UT. LazySetMinus (_X_, obstacles_LU)
146
140
sys = system (_X_; approx_mode = approx_mode)
147
141
problem = PB. OptimalControlProblem (sys, _I_, _T_, nothing , nothing , PB. Infinity ())
0 commit comments