Ejemplo n.º 1
0
 public BasicHeu(GAPInstance gap)
 {
     GAP = gap;
     n   = GAP.numcli;
     m   = GAP.numserv;
     this.capacitiesLeft = (int[])GAP.cap.Clone();
     //writeOnLog("Numero di client: " + n);
     //writeOnLog("Numero di server: " + m);
 }
Ejemplo n.º 2
0
        public static GAPInstance deserializeGAP(string path)
        {
            StreamReader fin;
            String       jstring;
            GAPInstance  ist;

            try
            {
                fin     = new StreamReader(path);
                jstring = fin.ReadToEnd();
                ist     = JsonConvert.DeserializeObject <GAPInstance>(jstring);
            }
            catch (Exception ex)
            {
                Console.WriteLine("Exception: " + ex.ToString());
                ist = new GAPInstance();
            }

            return(ist);
        }