-
Notifications
You must be signed in to change notification settings - Fork 0
/
f_heuristics.h
41 lines (30 loc) · 3.73 KB
/
f_heuristics.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef HEURISTICS_H
#define HEURISTICS_H
#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
#include <random>
#include <unordered_set>
#include <chrono>
int encontrarMenor(const std::vector<int> &vetorProdutos, const std::vector<int> &indicesUtilizados);
std::vector<std::vector<int>> gerarSolucaoGulosa(int n, int m, std::vector<std::vector<int>> &matrizPreparacao, std::vector<int> &vetorProdutos);
std::vector<int> temposProducao(std::vector<std::vector<int>> &solucao, std::vector<std::vector<int>> &matrizPreparacao, std::vector<int> &vetorProdutos);
std::vector<std::vector<int>> movimentoInsercao(std::vector<std::vector<int>> &solucao, std::vector<std::vector<int>> &matrizPreparacao, std::vector<int> &vetorProdutos, std::vector<int> &temposSolucao);
int calculoCustoNovoLinha(std::vector<std::vector<int>> &solucao, std::vector<std::vector<int>> &matrizPreparacao, std::vector<int> &temposSolucao, int linha, int indexProdAtual, int indexProdSubs);
std::vector<int> buscaMelhorCusto(std::vector<std::vector<int>> &solucao, std::vector<std::vector<int>> &matrizPreparacao, std::vector<int> &temposSolucao);
std::vector<std::vector<int>> novaSolucaoMesmaLinha(std::vector<std::vector<int>> &solucao, std::vector<std::vector<int>> &matrizPreparacao, std::vector<int> &temposSolucao);
std::vector<int> calculoCustoNovoEntreLinhas(std::vector<std::vector<int>> &solucao, std::vector<std::vector<int>> &matrizPreparacao, std::vector<int> &vetorProdutos, std::vector<int> &temposSolucao, int linhaAtual, int linhaSubs, int indexProdAtual, int indexProdSubs);
std::vector<int> buscaMelhorCustoEntreLinhas(std::vector<std::vector<int>> &solucao, std::vector<std::vector<int>> &matrizPreparacao, std::vector<int> &vetorProdutos, std::vector<int> &temposSolucao);
std::vector<std::vector<int>> novaSolucaoEntreLinhas(std::vector<std::vector<int>> &solucao, std::vector<std::vector<int>> &matrizPreparacao, std::vector<int> &vetorProdutos, std::vector<int> &temposSolucao);
std::vector<int> calculoCustoNovoReInsertion(std::vector<std::vector<int>> &solucao, std::vector<std::vector<int>> &matrizPreparacao, std::vector<int> &vetorProdutos, std::vector<int> &temposSolucao, int linhaAtual, int linhaSubs, int indexProdAtual, int indexProdSubs);
std::vector<int> buscaMelhorCustoReInsertion(std::vector<std::vector<int>> &solucao, std::vector<std::vector<int>> &matrizPreparacao, std::vector<int> &vetorProdutos, std::vector<int> &temposSolucao);
std::vector<std::vector<int>> novaSolucaoReInsertion(std::vector<std::vector<int>> &solucao, std::vector<std::vector<int>> &matrizPreparacao, std::vector<int> &vetorProdutos, std::vector<int> &temposSolucao);
std::vector<std::vector<int>> melhorarLinhas(std::vector<std::vector<int>> &solucao, std::vector<std::vector<int>> &matrizPreparacao, std::vector<int> &vetorProdutos, std::vector<int> &temposSolucao);
std::vector<std::vector<int>> melhorarLinhasRVND(std::vector<std::vector<int>> &solucao, std::vector<std::vector<int>> &matrizPreparacao, std::vector<int> &vetorProdutos, std::vector<int> &temposSolucao);
std::vector<int> listaCandidatosRestritos(std::vector<int> &vetorProdutos, std::vector<int> &sindicesProdutosUsados, float alfa);
std::vector<std::vector<int>> grasp(std::vector<std::vector<int>> &matrizPreparacao, std::vector<int> &vetorProdutos, int numeroLinhas, int numeroIteracoes, float alfa);
std::vector<std::vector<int>> perturbacaoHorizontal(std::vector<std::vector<int>> &solucao, int numeroLinhas);
std::vector<std::vector<int>> perturbacaoVertical(std::vector<std::vector<int>> &solucao, int numeroLinhas);
std::vector<std::vector<int>> ils(std::vector<std::vector<int>> &matrizPreparacao, std::vector<int> &vetorProdutos, int numeroLinhas, int numeroIteracoes);
#endif