def test_creation(self): algorithm = jit.InsertionAlgorithm( iterator_cls=jit.InsertionIterator, job=self.job, fleet=self.fleet, ) self.assertEqual(algorithm.iterator_cls, jit.InsertionIterator) self.assertEqual(algorithm.job, self.job) self.assertEqual(algorithm.fleet, self.fleet)
def setUpClass(cls) -> None: cls.job = jit.Job(generate_trips(10), objective_cls=jit.DialARideObjective) cls.fleet = jit.Fleet(generate_vehicles(10)) algorithm = jit.InsertionAlgorithm( job=cls.job, fleet=cls.fleet, ) cls.initial = algorithm.optimize()
def test_optimize(self): algorithm = jit.InsertionAlgorithm( job=self.job, fleet=self.fleet, ) result = algorithm.optimize() # TODO: Properly validate behaviour of the provided "Result" object. self.assertIsNotNone(result) self.assertIsInstance(result, jit.Result)