Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 1 addition & 16 deletions examples/numerical-scaling.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -300,22 +300,7 @@
"cell_type": "markdown",
"id": "15",
"metadata": {},
"source": [
"## Notes and caveats\n",
"\n",
"- **Scaling never changes the answer.** It is a pure change of units. Solutions,\n",
" duals and the objective are always reported in your original units.\n",
"- **Discrete columns stay discrete.** For binary and integer variables the\n",
" scaling factor is stored and round-tripped, but the solver column is left as an\n",
" ordinary integer column — scaling a discrete variable would break integrality.\n",
"- **Choosing factors.** Aim to bring each variable's magnitude and each row's\n",
" coefficients near 1. A good rule of thumb is to divide by the typical absolute\n",
" value you expect. There is no single correct choice; different solvers and\n",
" algorithms react differently (barrier methods care least; simplex and crossover\n",
" benefit most).\n",
"- **This is manual scaling.** You provide the factors. An automatic strategy that\n",
" picks them for you is a natural follow-up built on top of this mechanism."
]
"source": "## Notes and caveats\n\n- **Scaling never changes the answer.** It is a pure change of units. Solutions,\n duals and the objective are always reported in your original units.\n- **Scaling shifts what solver tolerances mean.** A solver applies its\n feasibility and optimality tolerances to the numbers it sees — the scaled\n problem — not to your original units. A fixed tolerance therefore maps to a\n different absolute tolerance per row and column once you scale. That is usually\n the point (it spreads the tolerances more evenly across the model), but it\n means a scaled and an unscaled run agree only up to solver tolerance, not\n bit-for-bit. Rescale if a solver reports numerical trouble, and re-check the\n tolerances if you rely on tight ones.\n- **Discrete columns stay discrete.** For binary and integer variables the\n scaling factor is stored and round-tripped, but the solver column is left as an\n ordinary integer column — scaling a discrete variable would break integrality.\n- **Choosing factors.** Aim to bring each variable's magnitude and each row's\n coefficients near 1. A good rule of thumb is to divide by the typical absolute\n value you expect. There is no single correct choice; different solvers and\n algorithms react differently (barrier methods care least; simplex and crossover\n benefit most).\n- **This is manual scaling.** You provide the factors. An automatic strategy that\n picks them for you is a natural follow-up built on top of this mechanism."
}
],
"metadata": {
Expand Down