Skip to content

Commit 735f201

Browse files
authored
[docs] update tolerances.jl tutorial (#4025)
1 parent 7e3e605 commit 735f201

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

docs/src/tutorials/getting_started/tolerances.jl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ import SCS
6969
# measured
7070
# 2. dual feasibility: controls how feasibility of the dual solution is measured
7171
# 3. integrality: controls how feasibility of the binary and integer variables
72-
# are measured
72+
# is measured
7373
# 4. optimality: controls how close the primal and dual solutions must be.
7474
#
7575
# Solvers may use absolute tolerances, relative tolerances, or some mixture of
@@ -456,7 +456,10 @@ model = Model()
456456
@constraint(model, 1.78 * x_capacity_W <= 200e6)
457457

458458
# This constraint violates the recommendations because there are values greater
459-
# than $10^6$, and the ratio of the coefficients in the constraint is $10^8$.
459+
# than $10^6$, and the ratio of the coefficients in the constraint is $10^8$. In
460+
# real terms, an absolute feasibility tolerance of `1e-8` means that the
461+
# capacity cost must be not exceed 1 millionth of a cent more than 200 million
462+
# dollars. No financial system measures costs to that level of accuracy.
460463

461464
# One fix is the convert our capacity variable from Watts to Megawatts. This
462465
# yields:
@@ -473,7 +476,8 @@ model = Model()
473476
@constraint(model, 1.78 * x_capacity_MW <= 200)
474477

475478
# This problem is equivalent to the original problem, but it has much better
476-
# problem scaling.
479+
# problem scaling. In real terms, our new constraint means that the capacity
480+
# cost must not exceed 200 million dollars by more than 1 cent.
477481

478482
# As a general rule, to fix problem scaling you must simultaneously scale both
479483
# variables and constraints. It is usually not sufficient to scale variables or

0 commit comments

Comments
 (0)