test_class.file: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/routing/AirDistanceRouterTest.java
test_class.identifier: AirDistanceRouterTest
test_case.body: @Test
      void travel_time_should_be_distance_divided_by_speed() {
          AirDistanceRouter router = new AirDistanceRouter();
          Coordinates from = Coordinates.valueOf(0, 0);
          Coordinates to = Coordinates.valueOf(3, 4); // √(3² + 4²) = 5
          long travelTimeMillis = router.travelTimeMillis(from, to);
          assertThat(travelTimeMillis).isEqualTo((long) (5
                  * AirDistanceRouter.KILOMETERS_PER_DEGREE
                  / AirDistanceRouter.TRAVEL_SPEED_KPH
                  * AirDistanceRouter.MILLIS_IN_ONE_HOUR));
      }
test_case.class_method_signature: AirDistanceRouterTest.travel_time_should_be_distance_divided_by_speed()
test_case.full_signature: @Test void travel_time_should_be_distance_divided_by_speed()
test_case.identifier: travel_time_should_be_distance_divided_by_speed
test_case.invocations: valueOf valueOf travelTimeMillis isEqualTo assertThat
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void travel_time_should_be_distance_divided_by_speed()
focal_class.declarator: TRAVEL_SPEED_KPH = 60
focal_class.modifier: protected static final
focal_class.original_string: protected static final int TRAVEL_SPEED_KPH = 60;
focal_class.type: int
focal_class.var_name: TRAVEL_SPEED_KPH
focal_class.declarator: KILOMETERS_PER_DEGREE = 111
focal_class.modifier: protected static final
focal_class.original_string: protected static final double KILOMETERS_PER_DEGREE = 111;
focal_class.type: double
focal_class.var_name: KILOMETERS_PER_DEGREE
focal_class.declarator: MILLIS_IN_ONE_HOUR = TimeUnit.MILLISECONDS.convert(1, TimeUnit.HOURS)
focal_class.modifier: protected static final
focal_class.original_string: protected static final long MILLIS_IN_ONE_HOUR = TimeUnit.MILLISECONDS.convert(1, TimeUnit.HOURS);
focal_class.type: long
focal_class.var_name: MILLIS_IN_ONE_HOUR
focal_class.file: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/routing/AirDistanceRouter.java
focal_class.identifier: AirDistanceRouter
focal_class.interfaces: implements Router, DistanceCalculator, Region
focal_class.class_method_signature: AirDistanceRouter.travelTimeMillis(Coordinates from, Coordinates to)
focal_class.full_signature: @Override public long travelTimeMillis(Coordinates from, Coordinates to)
focal_class.identifier: travelTimeMillis
focal_class.modifiers: @Override public
focal_class.parameters: (Coordinates from, Coordinates to)
focal_class.return: long
focal_class.signature: long travelTimeMillis(Coordinates from, Coordinates to)
focal_class.class_method_signature: AirDistanceRouter.getPath(Coordinates from, Coordinates to)
focal_class.full_signature: @Override public List<Coordinates> getPath(Coordinates from, Coordinates to)
focal_class.identifier: getPath
focal_class.modifiers: @Override public
focal_class.parameters: (Coordinates from, Coordinates to)
focal_class.return: List<Coordinates>
focal_class.signature: List<Coordinates> getPath(Coordinates from, Coordinates to)
focal_class.class_method_signature: AirDistanceRouter.getBounds()
focal_class.full_signature: @Override public BoundingBox getBounds()
focal_class.identifier: getBounds
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: BoundingBox
focal_class.signature: BoundingBox getBounds()
focal_method.body: @Override
      public long travelTimeMillis(Coordinates from, Coordinates to) {
          BigDecimal latDiff = to.latitude().subtract(from.latitude());
          BigDecimal lngDiff = to.longitude().subtract(from.longitude());
          double distanceKilometers = Math.sqrt(latDiff.pow(2).add(lngDiff.pow(2)).doubleValue()) * KILOMETERS_PER_DEGREE;
          return (long) Math.floor(distanceKilometers / TRAVEL_SPEED_KPH * MILLIS_IN_ONE_HOUR);
      }
focal_method.class_method_signature: AirDistanceRouter.travelTimeMillis(Coordinates from, Coordinates to)
focal_method.full_signature: @Override public long travelTimeMillis(Coordinates from, Coordinates to)
focal_method.identifier: travelTimeMillis
focal_method.invocations: subtract latitude latitude subtract longitude longitude sqrt doubleValue add pow pow floor
focal_method.modifiers: @Override public
focal_method.parameters: (Coordinates from, Coordinates to)
focal_method.return: long
focal_method.signature: long travelTimeMillis(Coordinates from, Coordinates to)