Skip to content

EnergySystemsModellingLab/highs-example-rust

Repository files navigation

Build and test GitHub

HiGHS example in Rust

This repository provides a minimal example of using the HiGHS solver from Rust, for which we use the highs crate. The program settings are read from a TOML file, which references CSV files containing variable definitions and constraints (see example).

Getting started

Installing the Rust toolchain

We recommend that developers use rustup to install the Rust toolchain. Follow the instructions on the rustup website.

Once you have done so, select the stable toolchain (used by this project) as your default with:

rustup default stable

Working with the project

To build the project, run:

cargo build

To run the code with the example input files, you can run:

cargo run example/settings.toml

Tests can be run with:

cargo test

More information is available in the official cargo book.

Copyright

Copyright © 2024 Imperial College London

About

A minimal example of using the HiGHS solver with Rust

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages