void TwoObjectivesInstance::sumVilles(Solution &s)
{
    int a, b;
    double total1 = 0;
    double total2 = 0;
    for(int i = 0; i < m_File1Dimension; i++)
    {
        a = s.GetItineraire()[i-1];
        b = s.GetItineraire()[i];

        // Toutes les itérations sauf la première et la dernière
        if( (i!=0) && (i !=(m_File1Dimension-1)) )
        {
            //cout << " Ville N°" << a << " => " << "Ville N°" << b << " (" << this->m_File1Matrix[a-1][b-1] << " km," << this->m_File2Matrix[a-1][b-1] << " €)" << endl;
            total1 += (double) this->m_File1Matrix[a-1][b-1];
            total2 += (double) this->m_File2Matrix[a-1][b-1];
        }

        // Dernière itération, on ferme la boucle. On va de la dernière ville jusqu'à la ville de départ
        if(i == (m_File1Dimension-1))
        {
            //cout << " Ville N°" << a << " => " << "Ville N°" << itineraire[0] << " (" << this->m_File1Matrix[a-1][0] << " km," << this->m_File2Matrix[a-1][0] << " €)" << endl;
            total1 += (double) this->m_File1Matrix[a-1][0];
            total2 += (double) this->m_File2Matrix[a-1][0];
        }
    }
    s.Setdistance(total1);
    s.Setcost(total2);
}
vector<Solution> TwoObjectivesInstance::GenerateVoisinage(Solution s)
{
/* A partir de l'itinéraire d'une solution, va former tous les itinéraires possibles en inversant 2 villes */
    vector<Solution> voisinage;
    for(unsigned int i = 0; i < s.GetItineraire().size()-1; ++i)
    {
        for(unsigned int j = i+1; j < s.GetItineraire().size(); ++j)
        {
            Solution p;
            p.SetItineraire(twoOpt(s.GetItineraire(), i, j));
            sumVilles(p); //Pour obtenir la distance et le coût de la solution p
            voisinage.push_back(p);
        }
    }
    return voisinage;
}