Skip to content

Commit

Permalink
Built site for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
hurak committed Jan 26, 2025
1 parent 0bf4ee1 commit e1d1162
Show file tree
Hide file tree
Showing 17 changed files with 19,967 additions and 9,021 deletions.
2 changes: 1 addition & 1 deletion .nojekyll
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1afc63ff
f63be0ef
136 changes: 68 additions & 68 deletions classes_reset.html

Large diffs are not rendered by default.

58 changes: 29 additions & 29 deletions classes_switched.html

Large diffs are not rendered by default.

1,680 changes: 840 additions & 840 deletions complementarity_simulations.html

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions des_automata.html
Original file line number Diff line number Diff line change
Expand Up @@ -2143,16 +2143,16 @@ <h3 class="anchored" data-anchor-id="mealy-machine">Mealy machine</h3>
<span id="cb3-11"><a href="#cb3-11" aria-hidden="true" tabindex="-1"></a><span class="pp">@show</span> <span class="fu">update!</span>(dtr), <span class="fu">output</span>(dtr)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
<div class="cell-output cell-output-stdout">
<pre><code>x_initial = rand(0:k, n) = [0, 1, 1, 2]
output(dtr) = [0, 1, 0, 1]
(update!(dtr), output(dtr)) = ([0, 0, 1, 1], [0, 0, 1, 0])
(update!(dtr), output(dtr)) = ([0, 0, 0, 1], [0, 0, 0, 1])
(update!(dtr), output(dtr)) = ([0, 0, 0, 0], [1, 0, 0, 0])
(update!(dtr), output(dtr)) = ([1, 0, 0, 0], [0, 1, 0, 0])
(update!(dtr), output(dtr)) = ([1, 1, 0, 0], [0, 0, 1, 0])</code></pre>
<pre><code>x_initial = rand(0:k, n) = [0, 4, 0, 4]
output(dtr) = [0, 1, 1, 1]
(update!(dtr), output(dtr)) = ([0, 0, 4, 0], [1, 0, 1, 1])
(update!(dtr), output(dtr)) = ([1, 0, 0, 4], [0, 1, 0, 1])
(update!(dtr), output(dtr)) = ([1, 1, 0, 0], [0, 0, 1, 0])
(update!(dtr), output(dtr)) = ([1, 1, 1, 0], [0, 0, 0, 1])
(update!(dtr), output(dtr)) = ([1, 1, 1, 1], [1, 0, 0, 0])</code></pre>
</div>
<div class="cell-output cell-output-display" data-execution_count="1">
<pre><code>([1, 1, 0, 0], [0, 0, 1, 0])</code></pre>
<pre><code>([1, 1, 1, 1], [1, 0, 0, 0])</code></pre>
</div>
</div>
<p>We can see that although initially the there can be more tokens, after a few iterations the algorithm achieves the goal of having just one token in the ring.</p>
Expand Down
154 changes: 77 additions & 77 deletions hybrid_equations.html

Large diffs are not rendered by default.

8,180 changes: 8,180 additions & 0 deletions max_plus_algebra 19.html

Large diffs are not rendered by default.

13,008 changes: 6,504 additions & 6,504 deletions max_plus_algebra.html

Large diffs are not rendered by default.

1,074 changes: 1,074 additions & 0 deletions max_plus_software 17.html

Large diffs are not rendered by default.

60 changes: 30 additions & 30 deletions mld_mld_and_pwa.html

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions mld_software.html
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ <h2 class="anchored" data-anchor-id="support-for-indicator-constraints-in-optimi
f(\bm x) &amp;\leq (1-\delta) M,\\
f(\bm x) &amp;\geq \epsilon + (m-\epsilon)\delta
\end{aligned}
</span> using a sufficiently large constant <span class="math inline">M</span> and a sufficiently small constant <span class="math inline">m</span>. But some solvers for mixed integer programming/optimization support the indicator constraints directly, without the need to come up with <span class="math inline">M</span> and <span class="math inline">m</span>. As a matter of fact, only one of the two implications, namely <span class="math display">
</span> using a sufficiently large constant <span class="math inline">M</span> and a sufficiently small constant <span class="math inline">m</span>. But some solvers for mixed integer programming/optimization support the indicator constraints directly, without the need to come up with <span class="math inline">M</span> and <span class="math inline">m</span>. As a matter of fact, the support is only provided for one of the two implications, namely <span class="math display">
[\delta = 1] \rightarrow [f(\bm x) \leq 0].
</span></p>
<p>Gurobi does provide such <a href="https://docs.gurobi.com/projects/optimizer/en/current/concepts/modeling/constraints.html#simple-constraints">support for indicator constraints</a>, the increasingly popular free&amp;open-source <a href="https://highs.dev">HiGHS</a> does not, …</p>
Expand All @@ -737,9 +737,10 @@ <h2 class="anchored" data-anchor-id="support-for-indicator-constraints-in-optimi
</div>
<p>With Python API of Gurobi, the indicator constraints can be added using <a href="https://docs.gurobi.com/projects/optimizer/en/current/reference/python/model.html#Model.addGenConstrIndicator">addGenContstrIndicator</a> function. One possible syntax is</p>
<pre><code>model.addConstr((delta == 1) &gt;&gt; (x + y - 1.0 &lt;= 0.0))</code></pre>
<p>The other direction of implication is not supported by optimization solvers (at least not that we know of). Therefore it has no support in optimization modellers such as JuMP either. In order to handle it, besides resorting to the Big-M method, we can also use the equivalent formulation <span class="math display">
<p>The other direction of implication is not supported by optimization solvers. Therefore it has no support in optimization modellers such as JuMP either. In order to handle it, besides resorting to the Big-M method, we can also use the equivalent formulation <span class="math display">
[\delta = 0] \rightarrow [f(\bm x) \geq \epsilon],
</span> where some small <span class="math inline">\epsilon \geq 0</span> had to be added to turn the strict inequality into a non-strict one.</p>
<p>Note, however, that it is not universally recommendable to rely on the support of the mixed integer solver for the indicator constraints. The reason is that sometimes the solvers may decide to reformulate the indicator constraints using the Big-M method by themselves, in which case we have no direct control over the choice of <span class="math inline">M</span>.</p>


</section>
Expand Down
140 changes: 70 additions & 70 deletions mpc_mld_explicit.html

Large diffs are not rendered by default.

Loading

0 comments on commit e1d1162

Please sign in to comment.