Exemplo n.º 1
0
 public BasicHeu(GAPinstance gap)
 {
     GAP            = gap;
     n              = GAP.numCli;
     m              = GAP.numServ;
     capacitiesLeft = (int[])GAP.cap.Clone();
 }
Exemplo n.º 2
0
        public GAPinstance ReadGAPInstance(string path)
        {
            StreamReader fin;

            try
            {
                fin = new StreamReader(path);
                string jstring = fin.ReadToEnd();
                System.Diagnostics.Debug.WriteLine(jstring);
                GAP = JsonConvert.DeserializeObject <GAPinstance>(jstring);
                fin.Close();
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine("Error " + ex.Message);
            }
            return(GAP);
        }
Exemplo n.º 3
0
 public int TabuSearch(GAPinstance instance)
 {
     basicHeu = new BasicHeu(instance);
     return(basicHeu.TabuSearch());
 }
Exemplo n.º 4
0
 public int SimulatedAnnealing(GAPinstance instance)
 {
     basicHeu = new BasicHeu(instance);
     return(basicHeu.SimulatedAnnealing());
 }
Exemplo n.º 5
0
 public int Opt10(GAPinstance instance)
 {
     basicHeu = new BasicHeu(instance);
     basicHeu.ConstructiveSolution();
     return(basicHeu.Opt10(GAP.cost));
 }
Exemplo n.º 6
0
 public int ConstructSolution(GAPinstance instance)
 {
     basicHeu = new BasicHeu(instance);
     return(basicHeu.ConstructiveSolution());
 }