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
示例#2
0
    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)
示例#3
0
    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)
示例#4
0
    def initialize(self, data_file):
        dataset = CDictDataset()
        dataset.load_data(data_file)

        self.dataset = dataset
        self.backtracker = BackTracker()
示例#5
0
    def initialize(self, data_file):
        dataset = CDictDataset()
        dataset.load_data(data_file)

        self.dataset = dataset
        self.rpb = RandomPathBuilding()