Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Highs.h
✓ #include <Highs.h>
Minimal example solving a linear program with HiGHS.
#include "Highs.h"
int main() {
Highs highs;
highs.setOptionValue("output_flag", false);
// Solve a simple LP: minimize x + y subject to x + y >= 1, x >= 0, y >= 0
const int num_col = 2;
const int num_row = 1;
std::vector<double> col_cost = {1.0, 1.0};
std::vector<double> col_lower = {0.0, 0.0};
std::vector<double> col_upper = {1e20, 1e20};
std::vector<double> row_lower = {1.0};
std::vector<double> row_upper = {1e20};
std::vector<int> a_start = {0, 1};
std::vector<int> a_index = {0, 0};
std::vector<double> a_value = {1.0, 1.0};
highs.passModel(num_col, num_row, col_cost.data(), col_lower.data(), col_upper.data(), row_lower.data(), row_upper.data(), a_start.data(), a_index.data(), a_value.data());
highs.run();
auto solution = highs.getSolution();
return 0;
}
Debug
Known issues
No known issues recorded.
Audit
Dependencies
No dependency data recorded yet.
Resources
No resource links recorded.