@@ -145,16 +145,28 @@ end
145
145
146
146
function initprob (:: SparseIMDPTarget , nregions, ninputs)
147
147
nchoices = nregions * ninputs
148
- prob_lower = AtomicSparseMatrixCOO {Float64, Int32} (undef, nregions + 1 , nchoices)
149
- prob_upper = AtomicSparseMatrixCOO {Float64, Int32} (undef, nregions + 1 , nchoices)
148
+ prob_lower = AtomicSparseMatrixCOO {Float64,Int32} (undef, nregions + 1 , nchoices)
149
+ prob_upper = AtomicSparseMatrixCOO {Float64,Int32} (undef, nregions + 1 , nchoices)
150
150
151
151
return prob_lower, prob_upper
152
152
end
153
153
154
154
function postprocessprob (:: SparseIMDPTarget , prob_lower, prob_upper)
155
- prob_lower = sparse (prob_lower. rows, prob_lower. cols, prob_lower. values, prob_lower. m, prob_lower. n)
156
- prob_upper = sparse (prob_upper. rows, prob_upper. cols, prob_upper. values, prob_upper. m, prob_upper. n)
157
-
155
+ prob_lower = sparse (
156
+ prob_lower. rows,
157
+ prob_lower. cols,
158
+ prob_lower. values,
159
+ prob_lower. m,
160
+ prob_lower. n,
161
+ )
162
+ prob_upper = sparse (
163
+ prob_upper. rows,
164
+ prob_upper. cols,
165
+ prob_upper. values,
166
+ prob_upper. m,
167
+ prob_upper. n,
168
+ )
169
+
158
170
return prob_lower, prob_upper
159
171
end
160
172
@@ -166,7 +178,7 @@ function convert_property(
166
178
prop = system_property (spec)
167
179
168
180
reach_states = Int32[]
169
- avoid_states = Int32[numregions (state_abstraction) + 1 ] # Absorbing state
181
+ avoid_states = Int32[numregions (state_abstraction)+ 1 ] # Absorbing state
170
182
171
183
for (i, source_region) in enumerate (regions (state_abstraction))
172
184
if ispessimistic (spec) && source_region ⊆ reach (prop)
@@ -187,7 +199,7 @@ function convert_property(
187
199
prop = system_property (spec)
188
200
189
201
reach_states = Int32[]
190
- avoid_states = Int32[numregions (state_abstraction) + 1 ] # Absorbing state
202
+ avoid_states = Int32[numregions (state_abstraction)+ 1 ] # Absorbing state
191
203
192
204
for (i, source_region) in enumerate (regions (state_abstraction))
193
205
if ispessimistic (spec) && ! iszeromeasure (avoid (prop), source_region)
@@ -211,7 +223,7 @@ function convert_property(
211
223
)
212
224
prop = system_property (spec)
213
225
214
- avoid_states = Int32[numregions (state_abstraction) + 1 ] # Absorbing state
226
+ avoid_states = Int32[numregions (state_abstraction)+ 1 ] # Absorbing state
215
227
216
228
for (i, source_region) in enumerate (regions (state_abstraction))
217
229
if ispessimistic (spec) && ! iszeromeasure (avoid (prop), source_region)
@@ -313,14 +325,16 @@ function initprob(
313
325
state_abstraction:: StateUniformGridSplit ,
314
326
ninputs,
315
327
)
316
- prob_lower = AtomicSparseMatrixCOO{Float64, Int32}[]
317
- prob_upper = AtomicSparseMatrixCOO{Float64, Int32}[]
328
+ prob_lower = AtomicSparseMatrixCOO{Float64,Int32}[]
329
+ prob_upper = AtomicSparseMatrixCOO{Float64,Int32}[]
318
330
319
331
nchoices = numregions (state_abstraction) * ninputs
320
332
321
333
for axisregions in splits (state_abstraction)
322
- local_prob_lower = AtomicSparseMatrixCOO {Float64, Int32} (undef, axisregions + 1 , nchoices)
323
- local_prob_upper = AtomicSparseMatrixCOO {Float64, Int32} (undef, axisregions + 1 , nchoices)
334
+ local_prob_lower =
335
+ AtomicSparseMatrixCOO {Float64,Int32} (undef, axisregions + 1 , nchoices)
336
+ local_prob_upper =
337
+ AtomicSparseMatrixCOO {Float64,Int32} (undef, axisregions + 1 , nchoices)
324
338
325
339
push! (prob_lower, local_prob_lower)
326
340
push! (prob_upper, local_prob_upper)
0 commit comments