File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11//! Provides functionality for optimisation constraints.
2- use super :: variable_definition:: VariableDefinition ;
2+ use crate :: variable_definition:: VariableDefinition ;
33use polars:: prelude:: * ;
44use std:: path:: Path ;
55
Original file line number Diff line number Diff line change 11//! Provides the main entry point to the highs_example_rust program.
22
3- mod highs_example_rust;
3+ mod constraint;
4+ mod optimisation;
5+ mod settings;
6+ mod solver;
7+ mod variable_definition;
8+
9+ #[ cfg( test) ]
10+ mod test_common;
411
512use std:: env;
613use std:: path:: Path ;
@@ -12,5 +19,5 @@ fn main() {
1219 panic ! ( "Must provide path to model configuration TOML file." ) ;
1320 }
1421
15- highs_example_rust :: run ( Path :: new ( & args[ 1 ] ) )
22+ optimisation :: run ( Path :: new ( & args[ 1 ] ) )
1623}
Original file line number Diff line number Diff line change 11//! The main crate for highs_example_rust. This contains all of MUSE's functionality.
2- pub mod constraint;
3- mod settings;
4- mod solver;
5- pub mod variable_definition;
6-
7- #[ cfg( test) ]
8- pub mod test_common;
9-
10- use settings:: read_settings;
11- use solver:: { solve_highs, Sense } ;
2+ use crate :: settings:: read_settings;
3+ use crate :: solver:: { solve_highs, Sense } ;
124use std:: path:: Path ;
135
146/// Run an optimisation.
Original file line number Diff line number Diff line change 11//! Data structures representing settings files and a function for reading them.
2- use super :: constraint:: Constraint ;
3- use super :: variable_definition:: VariableDefinition ;
2+ use crate :: constraint:: Constraint ;
3+ use crate :: variable_definition:: VariableDefinition ;
44use std:: path:: Path ;
55
66use serde:: Deserialize ;
Original file line number Diff line number Diff line change 11//! Provides data structures and functions for performing optimisation.
2- use super :: constraint:: Constraint ;
3- use super :: variable_definition:: VariableDefinition ;
2+ use crate :: constraint:: Constraint ;
3+ use crate :: variable_definition:: VariableDefinition ;
44pub use highs:: Sense ;
55use highs:: { HighsModelStatus , RowProblem } ;
66
Original file line number Diff line number Diff line change 11//! Common functionality used by tests.
2- use super :: constraint:: Constraint ;
3- use super :: variable_definition:: VariableDefinition ;
2+ use crate :: constraint:: Constraint ;
3+ use crate :: variable_definition:: VariableDefinition ;
44use std:: f64:: INFINITY ;
55use std:: path:: { Path , PathBuf } ;
66
@@ -11,8 +11,6 @@ pub fn get_example_path() -> PathBuf {
1111 . unwrap ( )
1212 . parent ( )
1313 . unwrap ( )
14- . parent ( )
15- . unwrap ( )
1614 . join ( "example" )
1715}
1816
Original file line number Diff line number Diff line change 11//! Provides variable definition data structures for optimisation.
2- use csv;
32use serde:: Deserialize ;
43use std:: path:: Path ;
54
You can’t perform that action at this time.
0 commit comments