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
|``Ax + b \in \mathbb{R}_+^n``|`VectorAffineFunction`|`Nonnegatives`|
310
327
|``Ax + b \in \mathbb{R}_-^n``|`VectorAffineFunction`|`Nonpositives`|
311
328
|``Ax + b = 0``|`VectorAffineFunction`|`Zeros`|
@@ -314,8 +331,6 @@ By convention, solvers are not expected to support nonzero constant terms in the
314
331
315
332
Constraints with `SingleVariable` in `LessThan`, `GreaterThan`, `EqualTo`, or `Interval` sets have a natural interpretation as variable bounds. As such, it is typically not natural to impose multiple lower or upper bounds on the same variable, and by convention we do not ask solver interfaces to support this. It is natural, however, to impose upper and lower bounds separately as two different constraints on a single variable. The difference between imposing bounds by using a single `Interval` constraint and by using separate `LessThan` and `GreaterThan` constraints is that the latter will allow the solver to return separate dual multipliers for the two bounds, while the former will allow the solver to return only a single dual for the interval constraint.
316
333
317
-
[Define ``\mathbb{R}_+, \mathbb{R}_-``]
318
-
319
334
#### Conic constraints
320
335
321
336
@@ -326,12 +341,14 @@ Constraints with `SingleVariable` in `LessThan`, `GreaterThan`, `EqualTo`, or `I
326
341
|``2yz \ge \lVert x \rVert_2^2, y,z \ge 0``|`VectorOfVariables`|`RotatedSecondOrderCone`|
[Define ``\mathcal{E}`` (exponential cone), ``\mathcal{S}_+`` (smat), ``\mathcal{S}'_+`` (svec). ``A(x)`` is an affine function of ``x`` that outputs a matrix.]
348
+
where ``\mathcal{E}`` is the exponential cone (see [`ExponentialCone`](@ref)),
349
+
``\mathcal{S}_+`` is the set of positive semidefinite symmetric matrices,
350
+
``A`` is an affine map that outputs symmetric matrices and
351
+
``B`` is an affine map that outputs square matrices.
335
352
336
353
#### Quadratic constraints
337
354
@@ -469,59 +486,92 @@ non-global tree search solvers like
469
486
470
487
## A complete example: solving a knapsack problem
471
488
472
-
[ needs formatting help, doc tests ]
473
-
489
+
We first need to select a solver supporting the given problem (see
490
+
[`supports`](@ref) and [`supports_constraint`](@ref)). In this example, we
491
+
want to solve a binary-constrained knapsack problem:
492
+
`max c'x: w'x <= C, x binary`. Suppose we choose GLPK:
0 commit comments