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: README.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -26,8 +26,8 @@ ospf introduces a concept called "intermediate expression" to facilitate DDD-bas
26
26
The initial purpose of designing intermediate expressions was to reduce redundancy in mathematical models. Therefore, the most basic arithmetic intermediate expressions are constructed using a polynomial, allowing users to replace all identical polynomials with this intermediate expression anywhere in the model.
27
27
28
28
$$
29
-
ExprSymbol = \sum_{i} x_{i} \\ \; \\
30
-
min \quad ExprSymbol \\ \; \\
29
+
ExprSymbol = \sum_{i} x_{i} \\\\\\ \\\; \\\\\\
30
+
min \quad ExprSymbol \\\\\\ \\\; \\\\\\
31
31
s.t. \quad ExprSymbol \leq 1
32
32
$$
33
33
@@ -42,19 +42,19 @@ This engineering practice is similar to <strong><em>Object-Oriented Design</em><
42
42
Building upon the concept of arithmetic intermediate expressions, ospf can also encapsulate non-arithmetic expressions such as logical operations into intermediate expressions.
When ospf translates the model into interfaces for specific solvers, it automatically adds the intermediate variables and constraints required for each intermediate expressions. This translation process is transparent to the users, so the users don't need to know how the intermediate expressions are implemented through which intermediate variables and constraints. For example, the expression $FuncSymbol = \bigvee_{i} x_{i}$ will be translated as follows:
50
50
51
51
$$
52
-
s.t. \quad y = 1, \; \\ \; \\
52
+
s.t. \quad y = 1 \\\\\\ \\\; \\\\\\
53
53
\begin{cases}
54
-
y \geq \frac{x_{i}}{\sup_{\leq}(x_{i})}, & \sup_{\leq}(x_{i}) > 1 \\ \;
54
+
y \geq \frac{x_{i}}{\sup_{\leq}(x_{i})}, & \sup_{\leq}(x_{i}) > 1 \\\\\\
55
55
y \geq x_{i}, & else
56
-
\end{cases} \\ \; \\
57
-
y \leq \sum_{i} x_{i}, \; \forall i \\ \; \\
56
+
\end{cases} \\\\\\ \\\; \\\\\\
57
+
y \leq \sum_{i} x_{i}, \; \forall i \\\\\\ \\\; \\\\\\
0 commit comments