Skip to content

Commit fa215aa

Browse files
authored
Merge pull request ERGO-Code#2265 from ERGO-Code/document-simplex-scale-strategy
Updated documentation of simplex scaling factor in `docs/src/options/definitions.md` and `src/lp_data/HighsOptions.h`
2 parents 234e293 + d312b6c commit fa215aa

File tree

6 files changed

+16
-54
lines changed

6 files changed

+16
-54
lines changed

FEATURES.md

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,8 @@
11
## Build changes
22

3-
Added code coverage report
4-
5-
Replaced command line parsing library with CLI11. Removed C++17 reference with cxxopts, which is no longer in HiGHS
6-
73
## Code changes
84

9-
Any LP offset is communicated to the IPM solver, and used in logging and primal/dual objective calculations.
10-
11-
If there is a valid basis when Highs::run() is called, presolve isn't skipped unless the solver option is "simplex" or "choose" (when simplex will always be chosen if there is an advanced basis).
12-
13-
Added basis solve methods to highspy
14-
15-
Added methods to get primal/dual ray and dual unboundedness direction to highspy
16-
17-
When a presolved LP has model status kUnknown, rather than returning this to the user, it performs postsolve and then uses the basis to solve the original LP
18-
19-
Fixed bug in presolve when pointers stored in HighsMatrixSlice get invalidated when the coefficient matrix is reallocated (e.g. when non-zeros are added in HPresolve::addToMatrix)
20-
21-
Primal and dual residual tolerances - applied following IPM or PDLP solution - now documented as options
22-
23-
Highs::getCols (Highs::getRows) now runs in linear time if the internal constraint matrix is stored column-wise (row-wise). Added ensureColwise/Rowwise to the Highs class, the C API and highspy so that users can set the internal constraint matrix storage orientation
24-
25-
When columns and rows are deleted from the incumbent LP after a basic solution has been found, HiGHS no longer invalidates the basis. Now it maintains the basic and nonbasic status of the remaining variables and constraints. When the model is re-solved, this information is used to construct a starting basis.
26-
27-
Fixed bugs in presolve
28-
29-
When running from the command line, changes to default option values are reported
30-
31-
Added callback to allow users to supply integer feasible solutions to the MIP solver during execution
32-
33-
Bug fix for primal heuristics in the MIP solver
34-
35-
Model status is set appropriately when a solver's claimed optimality doesn't satify the general HiGHS primal/dual feasibilily tolerances. Affects IPM without crossover and PDLP
36-
37-
Command line parsing now done with pure C++11 code
38-
39-
Added command line flags to read basis from and write basis to a file
40-
41-
Bug fixes in records of primal/dual rays
42-
43-
MPS read utility improved. Error logging is now less verbose; inability to handle USERCUTS section is properly logged
44-
45-
Implemented lifting for probing as described by Achterberg et al in _Presolve Reductions in Mixed Integer Programming._ INFORMS Journal on Computing 32(2):473-506 (2019). Not used by default, but option mip_lifting_for_probing allows it to be used with two levels of modification
5+
Fixed incorrect assertion in `HighsMipSolver::solutionFeasible()` (fixing #2204)
466

47-
Propagated updates from cuPDLP-C
7+
getColIntegrality now returns `HighsVarType::kContinuous` when `model_.lp_.integrality_` is empty (fixing #2261)
488

49-
Added GPU support for cuPDLP-C

check/TestCAPI.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -743,8 +743,8 @@ void fullApiOptions() {
743743
assert(return_status == kHighsStatusOk);
744744
assert(check_simplex_scale_strategy == simplex_scale_strategy);
745745
assert(min_simplex_scale_strategy == 0);
746-
assert(max_simplex_scale_strategy == 5);
747-
assert(default_simplex_scale_strategy == 1);
746+
assert(max_simplex_scale_strategy == 4);
747+
assert(default_simplex_scale_strategy == 2);
748748

749749
// There are some functions to check what type of option value you should
750750
// provide.

docs/src/options/definitions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
- Default: 1
129129

130130
## simplex\_scale\_strategy
131-
- Simplex scaling strategy: off / choose / equilibration / forced equilibration / max value 0 / max value 1 (0/1/2/3/4/5)
131+
- Simplex scaling strategy: off / choose / equilibration (default) / forced equilibration / max value (0/1/2/3/4)
132132
- Type: integer
133133
- Range: {0, 5}
134134
- Default: 1

src/lp_data/HConst.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ enum SimplexScaleStrategy {
5050
kSimplexScaleStrategyChoose, // 1
5151
kSimplexScaleStrategyEquilibration, // 2
5252
kSimplexScaleStrategyForcedEquilibration, // 3
53-
kSimplexScaleStrategyMaxValue015, // 4
54-
kSimplexScaleStrategyMaxValue0157, // 5
55-
kSimplexScaleStrategyMax = kSimplexScaleStrategyMaxValue0157
53+
kSimplexScaleStrategyMaxValue, // 4
54+
kSimplexScaleStrategyMaxValue015 = kSimplexScaleStrategyMaxValue,
55+
kSimplexScaleStrategyMaxValue0157 = kSimplexScaleStrategyMaxValue,
56+
kSimplexScaleStrategyMax = kSimplexScaleStrategyMaxValue
5657
};
5758

5859
enum HighsDebugLevel {

src/lp_data/HighsLpUtils.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,8 +1265,9 @@ bool maxValueScaleMatrix(const HighsOptions& options, HighsLp& lp,
12651265
vector<HighsInt>& Aindex = lp.a_matrix_.index_;
12661266
vector<double>& Avalue = lp.a_matrix_.value_;
12671267

1268-
assert(options.simplex_scale_strategy == kSimplexScaleStrategyMaxValue015 ||
1269-
options.simplex_scale_strategy == kSimplexScaleStrategyMaxValue0157);
1268+
assert(options.simplex_scale_strategy == kSimplexScaleStrategyMaxValue);
1269+
assert(kSimplexScaleStrategyMaxValue015 == kSimplexScaleStrategyMaxValue);
1270+
assert(kSimplexScaleStrategyMaxValue0157 == kSimplexScaleStrategyMaxValue);
12701271

12711272
// The 015(7) values refer to bit settings in FICO's scaling options.
12721273
// Specifically

src/lp_data/HighsOptions.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -788,10 +788,11 @@ class HighsOptions : public HighsOptionsStruct {
788788

789789
record_int = new OptionRecordInt(
790790
"simplex_scale_strategy",
791-
"Simplex scaling strategy: off / choose / equilibration / forced "
792-
"equilibration / max value 0 / max value 1 (0/1/2/3/4/5)",
791+
"Simplex scaling strategy: off / choose / equilibration (default) / "
792+
"forced "
793+
"equilibration / max value (0/1/2/3/4)",
793794
advanced, &simplex_scale_strategy, kSimplexScaleStrategyMin,
794-
kSimplexScaleStrategyChoose, kSimplexScaleStrategyMax);
795+
kSimplexScaleStrategyEquilibration, kSimplexScaleStrategyMax);
795796
records.push_back(record_int);
796797

797798
record_int = new OptionRecordInt(

0 commit comments

Comments
 (0)