#ifndef OPERATIONS_H
#define OPERATIONS_H

#include "Instance.h"  // Include the necessary headers
#include "Solution.h"  // Include the necessary headers
#include "Utils.h"

void sort_abs_cust(std::vector<int>& A, const Instance& instance, char order = '\0');

std::tuple<Solution, std::vector<float>> ruin_recreate(Solution solution, int m, float beta, int n, float T, float c_bar = 10.0, bool insertInNewToursOnly = true);

std::vector<std::vector<int>> heuristic_deconstruction_selection(Solution& solution, float c_bar, int m);

std::tuple<Solution, std::vector<float>> remove_recreate_allImp(Solution solution, std::vector<std::vector<int>>& A, float beta, int n, float T, bool insertInNewToursOnly = true);

std::tuple<Solution, std::vector<float>> remove_recreate_singleImp(Solution solution, std::vector<std::vector<int>>& A, float beta, int n, bool accept_last_only, bool insertInNewToursOnly = true);

std::tuple<Solution, std::vector<float>> remove_recreate_allImp_multi(Solution solution, std::vector<std::vector<int>>& A, float beta, int n, float T, bool insertInNewToursOnly = true, int num_processes = 1);

std::vector<std::pair<Solution, std::vector<float>>> remove_recreate_allImp_batch(
    std::vector<Solution> solutions,
    std::vector<std::vector<std::vector<int>>> A_batch,
    float beta, int n, float T, bool insertInNewToursOnly = true, int num_processes = 1);

#endif // OPERATIONS_H