Beispiel #1
0
 def loadDefault(self, keepAspectRatio=True):
     import basestyles
     # True if aspect ratio should be kept, False otherwise
     self.keepAspectRatio = keepAspectRatio
     # initialize styles
     self.styles = []
     # display each route
     self.styles.append(\
         basestyles.RouteDisplayer({'draw depot arcs': True}))
     # basic style: display nodes
     self.styles.append(basestyles.NodeDisplayer({'node size': 3}))
     # display a label for each node
     self.styles.append(basestyles.NodeLabelDisplayer())
     # display each node's demand
     self.styles.append(basestyles.NodeDemandDisplayer())
Beispiel #2
0
    def loadDefault(self, keepAspectRatio=True):
        import basestyles, ctp, backgroundbitmap
        # True if aspect ratio should be kept, False otherwise
        self.keepAspectRatio = keepAspectRatio
        # initialize styles
        self.styles = []
        #         # test: background picture
        #         self.styles.append(backgroundbitmap.BackgroundBitmapDisplayer(\
        #                 fName='data/ctp/map.png'))

        # display each route
        self.styles.append(\
            basestyles.RouteDisplayer({'draw depot arcs': True,
                                       'thickness': 2,
                                       'arc colour': colours.funkybrown}))

        #         import googlemaps
        #         # google map
        #         self.styles.append(googlemaps.GoogleBetterMapDisplayer())
        #         # google routes
        #         self.styles.append(googlemaps.GoogleMapsRoutes())

        # display coverage information
        self.styles.append(\
            ctp.CTPCoverageDisplayer({'thickness': 2}))
        # basic style: display nodes
        self.styles.append(
            basestyles.NodeDisplayer({
                'node size': 3,
                'hide unused nodes': False
            }))
        # display a label for each node
        self.styles.append(
            basestyles.NodeLabelDisplayer({'hide unused nodes': False}))
        # display each node's demand and capacity
        self.styles.append(ctp.NodeDemandAndCapacityDisplayer())