Skip to content

Commit d082f57

Browse files
align
1 parent 98cf8db commit d082f57

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

docs/src/tutorials/constraints.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ in `OptimizationFunction` to indicate if it's an equality or inequality constrai
66

77
Let's define the rosenbrock function as our objective function and consider the below inequalities as our constraints.
88

9-
$$
9+
```math
10+
\begin{aligned}
1011
11-
x_1^2 + x_2^2 \leq 0.8
12+
x_1^2 + x_2^2 \leq 0.8 \\
1213
1314
0.0 \leq x_1 * x_2 \leq 5.0
14-
$$
15+
\end{aligned}
16+
```
1517

1618
```@example constraints
1719
using Optimization, OptimizationMOI, OptimizationOptimJL, ForwardDiff, ModelingToolkit
@@ -61,12 +63,14 @@ We can also use ModelingToolkit as our AD backend and generate symbolic derivati
6163
Let's modify the bounds to use the function as an equality constraint. The constraint now becomes -
6264

6365

64-
$$
66+
```
67+
\begin{align}
6568
66-
x_1^2 + x_2^2 = 1.0
69+
x_1^2 + x_2^2 = 1.0 \\
6770
6871
\leq x_1 * x_2 = 0.5
69-
$$
72+
\end{align}
73+
```
7074

7175
```@example constraints
7276
optprob = OptimizationFunction(rosenbrock, Optimization.AutoModelingToolkit(), cons = cons)

0 commit comments

Comments
 (0)