@@ -69,7 +69,7 @@ import SCS
69
69
# measured
70
70
# 2. dual feasibility: controls how feasibility of the dual solution is measured
71
71
# 3. integrality: controls how feasibility of the binary and integer variables
72
- # are measured
72
+ # is measured
73
73
# 4. optimality: controls how close the primal and dual solutions must be.
74
74
#
75
75
# Solvers may use absolute tolerances, relative tolerances, or some mixture of
@@ -456,7 +456,10 @@ model = Model()
456
456
@constraint (model, 1.78 * x_capacity_W <= 200e6 )
457
457
458
458
# 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.
460
463
461
464
# One fix is the convert our capacity variable from Watts to Megawatts. This
462
465
# yields:
@@ -473,7 +476,8 @@ model = Model()
473
476
@constraint (model, 1.78 * x_capacity_MW <= 200 )
474
477
475
478
# 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.
477
481
478
482
# As a general rule, to fix problem scaling you must simultaneously scale both
479
483
# variables and constraints. It is usually not sufficient to scale variables or
0 commit comments