Пример #1
0
 public BasicHeu(GAPinstance gap)
 {
     GAP            = gap;
     n              = GAP.numCli;
     m              = GAP.numServ;
     capacitiesLeft = (int[])GAP.cap.Clone();
 }
Пример #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);
        }
Пример #3
0
 public int TabuSearch(GAPinstance instance)
 {
     basicHeu = new BasicHeu(instance);
     return(basicHeu.TabuSearch());
 }
Пример #4
0
 public int SimulatedAnnealing(GAPinstance instance)
 {
     basicHeu = new BasicHeu(instance);
     return(basicHeu.SimulatedAnnealing());
 }
Пример #5
0
 public int Opt10(GAPinstance instance)
 {
     basicHeu = new BasicHeu(instance);
     basicHeu.ConstructiveSolution();
     return(basicHeu.Opt10(GAP.cost));
 }
Пример #6
0
 public int ConstructSolution(GAPinstance instance)
 {
     basicHeu = new BasicHeu(instance);
     return(basicHeu.ConstructiveSolution());
 }