| 48 pub mod measures { |
48 pub mod measures { |
| 49 pub use measures::*; |
49 pub use measures::*; |
| 50 } |
50 } |
| 51 |
51 |
| 52 use run::{AlgorithmConfig, DefaultAlgorithm, Named, PlotLevel, RunnableExperiment}; |
52 use run::{AlgorithmConfig, DefaultAlgorithm, Named, PlotLevel, RunnableExperiment}; |
| |
53 use subproblem::InnerMethod; |
| 53 use types::{ClapFloat, Float}; |
54 use types::{ClapFloat, Float}; |
| 54 use DefaultAlgorithm::*; |
55 use DefaultAlgorithm::*; |
| 55 |
56 |
| 56 /// Trait for customising the experiments available from the command line |
57 /// Trait for customising the experiments available from the command line |
| 57 pub trait ExperimentSetup: |
58 pub trait ExperimentSetup: |
| 221 fitness_merging: Option<bool>, |
222 fitness_merging: Option<bool>, |
| 222 |
223 |
| 223 #[arg(long, value_names = &["ε", "θ", "p"])] |
224 #[arg(long, value_names = &["ε", "θ", "p"])] |
| 224 /// Set the tolerance to ε_k = ε/(1+θk)^p |
225 /// Set the tolerance to ε_k = ε/(1+θk)^p |
| 225 tolerance: Option<Vec<F>>, |
226 tolerance: Option<Vec<F>>, |
| |
227 |
| |
228 #[arg(long)] |
| |
229 /// Method for solving inner optimisation problems |
| |
230 inner_method: Option<InnerMethod>, |
| |
231 |
| |
232 #[arg(long)] |
| |
233 /// Step length parameter for inner problem |
| |
234 inner_τ0: Option<F>, |
| |
235 |
| |
236 #[arg(long, value_names = &["τ0", "σ0"])] |
| |
237 /// Dual step length parameter for inner problem |
| |
238 inner_pdps_τσ0: Option<Vec<F>>, |
| |
239 |
| |
240 #[arg(long, value_names = &["τ", "growth"])] |
| |
241 /// Inner proximal point method step length and its growth |
| |
242 inner_pp_τ: Option<Vec<F>>, |
| |
243 |
| |
244 #[arg(long)] |
| |
245 /// Inner tolerance multiplier |
| |
246 inner_tol: Option<F>, |
| 226 } |
247 } |
| 227 |
248 |
| 228 /// A generic entry point for binaries based on this library |
249 /// A generic entry point for binaries based on this library |
| 229 pub fn common_main<E: ExperimentSetup>() -> DynResult<()> { |
250 pub fn common_main<E: ExperimentSetup>() -> DynResult<()> { |
| 230 let full_cli = FusedCommandLineArgs::<E>::parse(); |
251 let full_cli = FusedCommandLineArgs::<E>::parse(); |