Skip to content

Commit c6a6a73

Browse files
committed
Remove blank
1 parent ceb4022 commit c6a6a73

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/src/apimanual.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -526,14 +526,14 @@ MOI defines a very general interface, with multiple possible ways to describe th
526526
- `@constraint(m, 2x + y == 10)` becomes `ScalarAffineFunction`-in-`EqualTo`;
527527
- `@constraint(m, 0 <= 2x + y <= 10)` becomes `ScalarAffineFunction`-in-`Interval`;
528528
- `@constraint(m, 2x + y in ArbitrarySet())` becomes `ScalarAffineFunction`-in-`ArbitrarySet`.
529-
529+
530530
Variable bounds are handled in a similar fashion:
531531
- `@variable(m, x <= 1)` becomes `SingleVariable`-in-`LessThan`;
532532
- `@variable(m, x >= 1)` becomes `SingleVariable`-in-`GreaterThan`.
533533

534534
One notable difference is that a variable with an upper and lower bound is translated into two constraints, rather than an interval. i.e.:
535535
- `@variable(m, 0 <= x <= 1)` becomes `SingleVariable`-in-`LessThan` *and* `SingleVariable`-in-`GreaterThan`.
536-
536+
537537
Therefore, if a solver wrapper does not support `ScalarAffineFunction`-in-`LessThan` constraints, users will not be able to write: `@constraint(m, 2x + y <= 10)` in JuMP. With this in mind, developers should support all the constraint types that they want to be usable from JuMP. That said, from the perspective of JuMP, solvers can safely choose to not support the following constraints:
538538

539539
- `ScalarAffineFunction` in `GreaterThan`, `LessThan`, or `EqualTo` with a nonzero constant in the function. Constants in the affine function should instead be moved into the parameters of the corresponding sets.
@@ -559,8 +559,8 @@ Solver wrappers should document how the low-level solver statuses map to the MOI
559559

560560
### canXXX
561561

562-
For most operations, MOI provides a function `canXXX` that can be used to check if the operation `XXX` is allowed.
563-
For example, `addconstraint!(model::ModelLike, func::F, set::S)` has the corresponding function `canaddconstraint(model, ::Type{F}, ::Type{S})::Bool`.
562+
For most operations, MOI provides a function `canXXX` that can be used to check if the operation `XXX` is allowed.
563+
For example, `addconstraint!(model::ModelLike, func::F, set::S)` has the corresponding function `canaddconstraint(model, ::Type{F}, ::Type{S})::Bool`.
564564
If `canaddconstraint` returns `false`, then calling `addconstraint!` must throw an error (likewise with all `XXX` and `canXXX` pairs). Note that even if `canaddconstraint` returns `true`, `addconstraint!` may still throw an error if, for example, the constraint function does not meet some sparsity conditions, one of the coefficients is `NaN`, or an invalid variable index is provided. This is because (in most cases) the `canXXX` method receives type information instead of the actual arguments.
565565

566566
### Package Naming

0 commit comments

Comments
 (0)