-
Notifications
You must be signed in to change notification settings - Fork 3
Allow passing custom options to HiGHS via model.toml
#1276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
alexdewar
wants to merge
8
commits into
main
Choose a base branch
from
highs-settings-in-model.toml
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c0ac6b2
ModelParameters: Remove some unnecessarily derived traits
alexdewar ca2d250
Add `must_use` attribute to `DispatchRun`
alexdewar dcc9e50
Allow `ModelError` to contain arbitrary errors other than just incohe…
alexdewar 6b740d0
Allow users to set custom HiGHS options for dispatch and appraisal
alexdewar e4fbde2
Document `highs` property for `model.toml` in schema and with extra doc
alexdewar 3df49f3
Update release notes
alexdewar b891381
Implement `Error::source()` for `ModelError`
alexdewar a29c7f6
Fix: Enable `please_give_me_broken_results` for example use of HiGHS …
alexdewar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # Applying custom HiGHS options | ||
|
|
||
| As part of development, you may wish to directly set custom options for the HiGHS solver. Note that | ||
| while some of these options will not affect results of simulations (e.g. to enable console logging | ||
| for HiGHS), as we cannot guarantee this for all options, in order to use this feature, you have to | ||
| set `please_give_me_broken_results = true` in your [`model.toml` file][model.toml]. | ||
|
|
||
| You can change any of the options exposed by the HiGHS solver; for more information, see [the HiGHS | ||
| documentation][highs-opts]. | ||
|
|
||
| You can set options to be applied to all optimisations, just dispatch or just appraisal. | ||
|
|
||
| Here is an example: | ||
|
|
||
| ```toml | ||
| please_give_me_broken_results = true | ||
| milestone_years = [2020, 2030, 2040] | ||
|
|
||
| # These options are applied to all optimisations | ||
| [highs.global_options] | ||
| # These two options are required to be enabled to log to console | ||
| log_to_console = true | ||
|
Comment on lines
+3
to
+22
|
||
| output_flag = true | ||
|
|
||
| # These ones are just applied to dispatch | ||
| [highs.dispatch_options] | ||
| # Increase to higher than default | ||
| primal_feasibility_tolerance = 10e-6 | ||
|
|
||
| # These ones are just applied to appraisal | ||
| [highs.appraisal_options] | ||
| optimality_tolerance = 10e-6 | ||
| ``` | ||
|
|
||
| [model.toml]: https://energysystemsmodellinglab.github.io/MUSE2/file_formats/input_files.html#model-parameters-modeltoml | ||
| [highs-opts]: https://ergo-code.github.io/HiGHS/stable/options/definitions/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.