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
Copy file name to clipboardExpand all lines: doc/manual/manual/contractors/analytic/ctcinverse.rst
+58-25Lines changed: 58 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,7 +92,9 @@ To represent the vectors :math:`\mathbf{x}\in\mathbb{R}^n` consistent with the c
92
92
:end-before: [ctcinv-1-end]
93
93
:dedent: 0
94
94
95
-
The contractor can be used as an operator to contract a 2d box :math:`[\mathbf{x}]`. It can also be involved in a paver in order to reveal the constraint:
95
+
The contractor can be used as an operator to contract a :math:`n`-d box :math:`[\mathbf{x}]`.
96
+
97
+
Note that the contraction may be fast but not minimal, depending on your analytic expression. Therefore, you can also combine a ``CtcInverse`` with a ``CtcFixpoint`` to apply the contraction procedure repeatedly until a fixpoint is reached on the same box. The following code corresponds to a contraction revealed in the next figure, which shows contraction cases in blue and their fixpoint counterparts in red.
96
98
97
99
.. tabs::
98
100
@@ -120,14 +122,10 @@ The contractor can be used as an operator to contract a 2d box :math:`[\mathbf{x
120
122
:end-before: [ctcinv-2-end]
121
123
:dedent: 0
122
124
123
-
Which produces the following output:
124
-
125
-
.. figure:: ./himmelblau_50.png
125
+
.. figure:: ./himmelblau_boxes.png
126
126
:width:400px
127
127
128
-
Outer approximation of the solution set for :math:`f(\mathbf{x})\in[50,50]`. This paving result reveals three connected subsets approximated with outer boxes. Blue parts are guaranteed not to contain solutions.
129
-
130
-
We recall that for thick solution sets, one should prefer the use of the ``SepInverse`` separator in order to get both outer and inner approximations. For instance, the solution set associated with :math:`f(\mathbf{x})\leqslant50` corresponds to:
128
+
As any other contractor, a ``CtcInverse`` can also be involved in a paver in order to reveal the constraint set:
131
129
132
130
.. tabs::
133
131
@@ -155,6 +153,41 @@ We recall that for thick solution sets, one should prefer the use of the ``SepIn
155
153
:end-before: [ctcinv-3-end]
156
154
:dedent: 0
157
155
156
+
Which produces the following output:
157
+
158
+
.. figure:: ./himmelblau_50.png
159
+
:width:400px
160
+
161
+
Outer approximation of the solution set for :math:`f(\mathbf{x})\in[50,50]`. This paving result reveals three connected subsets approximated with outer boxes. Blue parts are guaranteed not to contain solutions.
162
+
163
+
We recall that for thick solution sets, one should prefer the use of the ``SepInverse`` separator in order to get both outer and inner approximations. For instance, the solution set associated with :math:`f(\mathbf{x})\leqslant50` corresponds to:
164
+
165
+
.. tabs::
166
+
167
+
.. group-tab:: Python
168
+
169
+
.. literalinclude:: src.py
170
+
:language: py
171
+
:start-after: [ctcinv-4-beg]
172
+
:end-before: [ctcinv-4-end]
173
+
:dedent: 4
174
+
175
+
.. group-tab:: C++
176
+
177
+
.. literalinclude:: src.cpp
178
+
:language: c++
179
+
:start-after: [ctcinv-4-beg]
180
+
:end-before: [ctcinv-4-end]
181
+
:dedent: 4
182
+
183
+
.. group-tab:: Matlab
184
+
185
+
.. literalinclude:: src.m
186
+
:language: matlab
187
+
:start-after: [ctcinv-4-beg]
188
+
:end-before: [ctcinv-4-end]
189
+
:dedent: 0
190
+
158
191
159
192
.. figure:: ./himmelblau_50_inner.png
160
193
:width:400px
@@ -176,24 +209,24 @@ can be easily approximated by the following union of contractors:
176
209
177
210
.. literalinclude:: src.py
178
211
:language: py
179
-
:start-after: [ctcinv-4-beg]
180
-
:end-before: [ctcinv-4-end]
212
+
:start-after: [ctcinv-5-beg]
213
+
:end-before: [ctcinv-5-end]
181
214
:dedent: 4
182
215
183
216
.. group-tab:: C++
184
217
185
218
.. literalinclude:: src.cpp
186
219
:language: c++
187
-
:start-after: [ctcinv-4-beg]
188
-
:end-before: [ctcinv-4-end]
220
+
:start-after: [ctcinv-5-beg]
221
+
:end-before: [ctcinv-5-end]
189
222
:dedent: 4
190
223
191
224
.. group-tab:: Matlab
192
225
193
226
.. literalinclude:: src.m
194
227
:language: matlab
195
-
:start-after: [ctcinv-4-beg]
196
-
:end-before: [ctcinv-4-end]
228
+
:start-after: [ctcinv-5-beg]
229
+
:end-before: [ctcinv-5-end]
197
230
:dedent: 0
198
231
199
232
.. figure:: ./himmelblau_50_150_250.png
@@ -323,24 +356,24 @@ When the constraint is a complement constraint :math:`\mathbf{f}(\mathbf{x})\not
323
356
324
357
.. literalinclude:: src.py
325
358
:language: py
326
-
:start-after: [ctcinv-5-beg]
327
-
:end-before: [ctcinv-5-end]
359
+
:start-after: [ctcinv-6-beg]
360
+
:end-before: [ctcinv-6-end]
328
361
:dedent: 4
329
362
330
363
.. group-tab:: C++
331
364
332
365
.. literalinclude:: src.cpp
333
366
:language: c++
334
-
:start-after: [ctcinv-5-beg]
335
-
:end-before: [ctcinv-5-end]
367
+
:start-after: [ctcinv-6-beg]
368
+
:end-before: [ctcinv-6-end]
336
369
:dedent: 4
337
370
338
371
.. group-tab:: Matlab
339
372
340
373
.. literalinclude:: src.m
341
374
:language: matlab
342
-
:start-after: [ctcinv-5-beg]
343
-
:end-before: [ctcinv-5-end]
375
+
:start-after: [ctcinv-6-beg]
376
+
:end-before: [ctcinv-6-end]
344
377
:dedent: 0
345
378
346
379
@@ -358,24 +391,24 @@ The underlying analytic function can be accessed through ``.fnc()`` (useful for
0 commit comments