use std::env;
use std::path::PathBuf;
use optirustic::core::OError;
use optirustic::utils::{DasDarren1998, NumberOfPartitions, TwoLayerPartitions};
fn main() -> Result<(), OError> {
        let number_of_objectives = 3;
    let layers = TwoLayerPartitions {
                boundary_layer: 5,
                inner_layer: 4,
        scaling: None,
    };
    let partitions = NumberOfPartitions::TwoLayers(layers);
    let m = DasDarren1998::new(number_of_objectives, &partitions)?;
        println!("Total points = {:?}", m.number_of_points());
    let weights = m.get_weights();
    println!("Weights = {:?}", weights);
        let out_path = PathBuf::from(&env::current_dir().unwrap())
        .join("examples")
        .join("results")
        .join("ref_points_2layers_3obj_5gaps.json");
    DasDarren1998::serialise(&weights, &out_path)?;
    
    Ok(())
}