/**
 * @file grouping_customers.h
 * @author Jan Holáň, xholan11 (xholan11@vutbr.cz)
 * @brief translated with gcc version 12.2.1
 * @version 0.1
 * @date 2023-05-01
 * 
 * @copyright Copyright (c) 2023
 * 
 */

#ifndef _GROUPING_CUSTOMERS_H_
#define _GROUPING_CUSTOMERS_H_

#include <list>
#include <iostream>
#include "WarehousePickingOpt.h"

namespace grouping_customers
{
    /// @brief this function is starting the whole algorithm, visible from outside
    /// @param volume_customer_map
    /// @param warehouse
    /// @return
    list<Cart> algorithm_AVGDistances(SolverConfiguration &sc, CartConfiguration &cart_conf, multimap<int, Customer, greater<int>> &volume_customer_map, Warehouse &warehouse);

    /// @brief this method use a line interpolation through the points defining orders in warehouse of each customer, then the values a,b of line
    /// pattern y=ax+b are adjusted by multiplication by values given in parameters cor_a, cor_b
    /// @param sc solver configuration
    /// @param cart_conf cart configuration
    /// @param volume_customer_map customer map sort in descending order by volume
    /// @return created list of carts
    list<Cart> leastSquareMethod(SolverConfiguration &sc, CartConfiguration &cart_conf, multimap<int, Customer, greater<int>> &volume_customer_map);

    /// @brief
    /// @param sc
    /// @param cart_conf
    /// @param volume_customer_map
    /// @return
    list<Cart> kMeansClustering(SolverConfiguration &sc, CartConfiguration &cart_conf, multimap<int, Customer, greater<int>> &volume_customer_map);
}

#endif