#include "smooth_sequence.h"
#include <iostream>
#include <utility>
#include <functional>
#include <cmath>
#include "utils/lambert_w.h"
#include "utils/bidding_functions.h"
#include "property_check.h"
#include <fstream>
#include <chrono>
#include "pareto.h"
#include "utils/powell.h"

using namespace std;
using Vec = vector<double>;

string path_prefix = "../outputs/";



int main(int argc, char *argv[]) {
    // cout.precision(6);
    // f->backend()->run_command("unset warnings");
    // auto start = chrono::high_resolution_clock::now();

    double R = 4;
    double C = atof(argv[1]);
    uniform_separated_parameters(C); // 1.69

    /* write_separated_pareto(1.0001, 3, 0.02, 3, 10000, 1e-10, 1e-6, 1e-8); */

    /* std::cout << "Rob : " << exp(1 + 1e-4) << "\n";
    std::cout << separated_consistency(3, 2, 60, 1e-12, 1e-12, 1e-8).second << "\n"; */    

    /* Plot plot1 = deterministic_pareto(4,0.001);
    plot1.write_in_file(path_prefix + "deterministic_pareto.txt"); */

    /* Plot plot2 = uniform_separated_pareto(0.001);
    plot2.write_in_file(path_prefix + "uniform_separated_pareto.txt");

    Plot plot3 = stochastic_lower_bound(8, 0.001);
    plot3.write_in_file(path_prefix + "stochastic_lower_bound.txt");

    Plot plot4 = contiguous_pareto(8,0.001);
    plot4.write_in_file(path_prefix + "contiguous_pareto.txt"); */

    // auto end = chrono::high_resolution_clock::now();
    // auto duration = chrono::duration_cast<chrono::milliseconds>(end - start);

    // cout << "Time taken: " << duration.count() << " milliseconds" << endl;

    
    return 0;
}





/* [ -3.01284432327 - -2.00870714404 ]
[ -2.00849075125 - -1.00435357202 ]
[ -1.00413717923 - 0 ]
[ 0.00143361748633 - 1.00095413674 ]
[ 1.01064743484 - 1.98755851774 ]
[ 1.98755851774 - 2.97348297007 ]
[ 2.97348297007 - 3.95940742239 ] 

10-4 -> 2.68..

 
[ -3.00051681142 - -2.00050397438 ]
[ -2.00026482423 - -1.00025198719 ]
[ -1.00001283704 - 0 ]
[ 7.47167450754e-05 - 1.00037009196 ]
[ 1.00229092009 - 1.97977482729 ]
[ 1.97977482729 - 2.96569927961 ]
[ 2.96569927961 - 3.95162373194 ]

10-7 -> 2.693
*/
