def load_data(path): from src.datasets.CDictDataset import CDictDataset d = CDictDataset() # d.load_data('input/3_airports_input.csv') # d.load_data('../input/3_airports_backtrace.csv') d.load_data(path) return d
def test_cities(self): from src.datasets.CDictDataset import CDictDataset d = CDictDataset() d.load_data('../input/3_airports_backtrace.csv') self.assertTrue("PRG" in d.cities) self.assertTrue("TXL" in d.cities) self.assertTrue("TXL" in d.cities)
def test_num_flights(self): from src.datasets.CDictDataset import CDictDataset d = CDictDataset() d.load_data('../input/3_airports_backtrace.csv') count = 0 for ap in d.dataset: for day in d.dataset[ap]: for flight in d.dataset[ap][day]: count += 1 self.assertEquals(count, 9)
def initialize(self, data_file): dataset = CDictDataset() dataset.load_data(data_file) self.dataset = dataset self.backtracker = BackTracker()
def initialize(self, data_file): dataset = CDictDataset() dataset.load_data(data_file) self.dataset = dataset self.rpb = RandomPathBuilding()