예제 #1
0
 def setUp(self):
     grib = mock_grib(2, 180, 0.1)
     self.track = [(5, 38), (5.2, 38.2)]
     island_route = mock_point_validity(self.track)
     self.routing_obj = weatherrouting.Routing(
         LinearBestIsoRouter,
         polar_obj,
         self.track,
         grib,
         datetime.datetime.fromisoformat('2021-04-02T12:00:00'),
         pointValidity=island_route.point_validity,
     )
예제 #2
0
 def setUp(self):
     grib = mock_grib(10, 270, 0.5)
     self.track = [(5, 38), (5.5, 38.5)]
     island_route = mock_point_validity(self.track, factor=3)
     self.routing_obj = weatherrouting.Routing(
         LinearBestIsoRouter,
         polar_obj,
         self.track,
         grib,
         datetime.datetime.fromisoformat('2021-04-02T12:00:00'),
         lineValidity=island_route.line_validity,
     )
 def setUp(self):
     grib = mock_grib(2, 180, 0.1)
     self.track = [(5, 38), (5.2, 38.2)]
     island_route = mock_point_validity(self.track, factor=5)
     self.routing_obj = weatherrouting.Routing(
         ShortestPathRouter,
         None,
         self.track,
         grib,
         datetime.datetime.fromisoformat('2021-04-02T12:00:00'),
         pointValidity=island_route.point_validity,
     )
예제 #4
0
    def createRouting(self, algorithm, boatModel, track, startDatetime,
                      startPosition):
        polar = weatherrouting.Polar(
            os.path.abspath(os.path.dirname(__file__)) + '/../data/boats/' +
            boatModel + '/polar.pol')

        routing = weatherrouting.Routing(algorithm,
                                         polar,
                                         track,
                                         self.gribManager,
                                         utils.pointValidity,
                                         startDatetime=startDatetime,
                                         startPosition=startPosition)
        return routing
 def setUp(self):
     grib = mock_grib(10,
                      270,
                      0.5,
                      out_of_scope=datetime.datetime.fromisoformat(
                          '2021-04-02T15:00:00'))
     self.track = [(5, 38), (5.5, 38.5)]
     island_route = mock_point_validity(self.track, factor=3)
     self.routing_obj = weatherrouting.Routing(
         ShortestPathRouter,
         None,
         self.track,
         grib,
         datetime.datetime.fromisoformat('2021-04-02T12:00:00'),
         lineValidity=island_route.line_validity,
     )