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
The syntax `x >= y` is ambiguous for matrices because we cannot tell if
182
-
you intend a positive semidefinite constraint or an elementwise
183
-
inequality.
184
181
185
-
To create a positive semidefinite constraint, pass `PSDCone()` or
186
-
`HermitianPSDCone()`:
182
+
The syntax `x >= y` is ambiguous for matrices because JuMP cannot determine if you intend a positive semidefinite constraint or an elementwise inequality.
187
183
184
+
To create a positive semidefinite constraint, pass `PSDCone()` or `HermitianPSDCone()`:
188
185
```julia
189
186
@constraint(model, x >= y, PSDCone())
190
187
```
191
-
192
-
To create an element-wise inequality, pass `Nonnegatives()`, or use
193
-
broadcasting:
194
-
188
+
To create an elementwise inequality, pass `Nonnegatives()` or use broadcasting:
Copy file name to clipboardExpand all lines: docs/src/manual/variables.md
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1148,9 +1148,14 @@ julia> type = :PSD
1148
1148
:PSD
1149
1149
1150
1150
julia> @variable(model, x[1:2, 1:2], type)
1151
-
ERROR: At none:1: `@variable(model, x[1:2, 1:2], type)`: Unrecognized positional arguments: (:PSD,). (You may have passed it as a positional argument, or as a keyword value to `variable_type`.)
1151
+
ERROR: At none:1: `@variable(model, x[1:2, 1:2], type)`:
1152
+
1153
+
Unrecognized positional arguments: (:PSD,).
1154
+
1155
+
You may have passed an unrecognized type or a keyword value to `variable_type`.
1152
1156
1153
1157
If you're trying to create a JuMP extension, you need to implement `build_variable`. Read the docstring for more details.
1158
+
1154
1159
Stacktrace:
1155
1160
[...]
1156
1161
```
@@ -1212,9 +1217,14 @@ julia> type = :Symmetric
1212
1217
:Symmetric
1213
1218
1214
1219
julia> @variable(model, x[1:2, 1:2], type)
1215
-
ERROR: At none:1: `@variable(model, x[1:2, 1:2], type)`: Unrecognized positional arguments: (:Symmetric,). (You may have passed it as a positional argument, or as a keyword value to `variable_type`.)
1220
+
ERROR: At none:1: `@variable(model, x[1:2, 1:2], type)`:
1221
+
1222
+
Unrecognized positional arguments: (:Symmetric,).
1223
+
1224
+
You may have passed an unrecognized type or a keyword value to `variable_type`.
1216
1225
1217
1226
If you're trying to create a JuMP extension, you need to implement `build_variable`. Read the docstring for more details.
0 commit comments