Skip to content

Commit

Permalink
merge latest
Browse files Browse the repository at this point in the history
  • Loading branch information
galabovaa committed Sep 17, 2024
2 parents a83b766 + d95502b commit 354677c
Show file tree
Hide file tree
Showing 102 changed files with 21,875 additions and 17,075 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: DoozyX/clang-format-lint-action@v0.14
- uses: DoozyX/clang-format-lint-action@v0.18
with:
source: 'app/ src/Highs.h ./src/lp_data ./src/mip ./src/model ./src/simplex ./src/presolve ./src/simplex ./src/util ./src/test'
#./src/test ./interfaces'
extensions: 'h,cpp,c'
clangFormatVersion: 14
clangFormatVersion: 18
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Contact [Julian](https://github.com/jajhall) (General issues and solvers), [Ivet

## Improve the documentation

The top level [documentation](https://ergo-code.github.io/HiGHS/) is created using [Docsy](https://www.docsy.dev/), with the files held on the [HiGHS repository](https://github.com/ERGO-Code/HiGHS/tree/docsy). If your change is small (like fixing typos, or one or two sentence corrections), the easiest way to do this is to fork the branch and create a pull request. (See *Contribute code to HiGHS* below for more on this.) If your change is larger, or touches multiple files, please raise an issue describing what you want to do.
The top level [documentation](https://ergo-code.github.io/HiGHS/) is created using [Docsy](https://www.docsy.dev/), with the files held on the [HiGHS repository](https://github.com/ERGO-Code/HiGHS/tree/master/docs). If your change is small (like fixing typos, or one or two sentence corrections), the easiest way to do this is to fork the branch and create a pull request. (See *Contribute code to HiGHS* below for more on this.) If your change is larger, or touches multiple files, please raise an issue describing what you want to do.

## Raise an issue

Expand Down
32 changes: 19 additions & 13 deletions FEATURES.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
## Build changes

The python wrapper highspy is now available for aarch64 on manylinux
This allows highs to be run through Python on AWS arm64
## Code changes

Added `int64_t mip_total_lp_iterations` to `HighsCallbackDataOut` and modified accessor function

`Highs::writeSolution` and `Highs::writeBasis` now being done via `HighsIO` logging, so can be redirected to logging callback.

Introduced `const double kHighsUndefined` as value of undefined values in a user solution. It's equal to `kHighsInf`

Added `Highs::setSolution(const HighsInt num_entries, const HighsInt* index, const double* value);` to allow a sparse primal solution to be defined. When a MIP is solved to do this, the value of (new) option `mip_max_start_nodes` is used for `mip_max_nodes` to avoid excessive cost

Added options `write_presolved_model_to_file` and `write_presolved_model_file` so that presolved model can be written via a command line option

Added `Highs::feasibilityRelaxation` to solve the problem of minimizing a (possibly weighted) sum of (allowable) infeasibilities in an LP/MIP.

Added Python utility `examples/plot_highs_log.py` (due to @Thell) to visualise progress of the MIP solver.

Added minimal documentation of solvers and how simplex variants can be run

Methods receiving matrix data where only small values are explicit zeros (so removed internally) are now silent and return HighsStatus::kOk (since internal matrix is exact)

Bug fix for fortran on macOS

## Code changes

The accessor function Highs_getCallbackDataOutItem in the C API means
that `pdlp_iteration_count` can be moved back to where it was inserted
into the `HighsCallbackDataOut` struct in v1.7.0, which broke the C
API. This fixes #1812

Some duplicate code has been eliminated from the MIP solver, and
modifications made to eliminate compiler warnings

Declaration of the (deprecated) method `char* highsCompilationDate()`
has been corrected

Fixed bug when describing integrality status during the human-readable solution write

18 changes: 18 additions & 0 deletions app/RunHighs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,24 @@ int main(int argc, char** argv) {
return (int)read_solution_status;
}
}
if (options.write_presolved_model_to_file) {
// Run presolve and write the presolved model to a file
HighsStatus status = highs.presolve();
if (status == HighsStatus::kError) return int(status);
HighsPresolveStatus model_presolve_status = highs.getModelPresolveStatus();
const bool ok_to_write =
model_presolve_status == HighsPresolveStatus::kNotReduced ||
model_presolve_status == HighsPresolveStatus::kReduced ||
model_presolve_status == HighsPresolveStatus::kReducedToEmpty ||
model_presolve_status == HighsPresolveStatus::kTimeout;
if (!ok_to_write) {
highsLogUser(log_options, HighsLogType::kInfo,
"No presolved model to write to file\n");
return int(status);
}
status = highs.writePresolvedModel(options.write_presolved_model_file);
return int(status);
}
// Solve the model
HighsStatus run_status = highs.run();
if (run_status == HighsStatus::kError) return int(run_status);
Expand Down
Loading

0 comments on commit 354677c

Please sign in to comment.