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
|`"ScalarAffineFunction"`| The function `a'x + b`, where `a` is a sparse vector specified by a list of `ScalarAffineTerm`s in `terms` and `b` is the scalar in `constant`. Duplicate variables in `terms` are accepted, and the corresponding coefficients are summed together. | {"head": "ScalarAffineFunction", "constant": 1.0, "terms": [{"coefficient": 2.5, "variable": "x"}]} |
174
174
|`"ScalarQuadraticFunction"`| The function `0.5x'Qx + a'x + b`, where `a` is a sparse vector of `ScalarAffineTerm`s in `affine_terms`, `b` is the scalar `constant`, and `Q` is a symmetric matrix specified by a list of `ScalarQuadraticTerm`s in `quadratic_terms`. Duplicate indices in `affine_terms` and `quadratic` are accepted, and the corresponding coefficients are summed together. Mirrored indices in `quadratic_terms` (i.e., `(i,j)` and `(j, i)`) are considered duplicates; only one need to be specified. | {"head": "ScalarAffineFunction", "constant": 1.0, "affine_terms": [{"coefficient": 2.5, "variable": "x"}], "quadratic_terms": [{"coefficient": 2.0, "variable_1": "x", "variable_2": "y"}]} |
175
-
|`"Nonlinear"`| An expression graph representing a scalar function. ||
175
+
|`"ScalarNonlinearFunction"`| An expression graph representing a scalar nonlinear function. ||
176
176
177
177
178
-
For more information on `"Nonlinear"` functions, see
178
+
For more information on `"ScalarNonlinearFunction"` functions, see
179
179
[Nonlinear functions](@ref).
180
180
181
181
#### Vector Functions
@@ -239,7 +239,8 @@ expression graphs is stored in Polish prefix notation. For example, the
239
239
nonlinear expression `sin²(x)` is expressed as `^(sin(x), 2)`.
240
240
241
241
The expression graph is stored as an object with three required fields:
242
-
`"head"`, which must be `"Nonlinear"`, as well as `"root"` and `"node_list"`.
242
+
`"head"`, which must be `"ScalarNonlinearFunction"`, as well as `"root"` and
243
+
`"node_list"`.
243
244
244
245
`"root"` contains an object defining the root node of the expression graph. All
245
246
other nodes are stored as a flattened list in the `"node_list"` field. We
@@ -357,7 +358,7 @@ In Polish notation, the expression graph is:
357
358
In MathOptFormat, this expression graph can be encoded as follows:
0 commit comments