예제 #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())
예제 #2
0
 def loadDefault(self, keepAspectRatio=True):
     import basestyles, flexiblestyles, colours
     # 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,
                 'thickness': 1}))
     # basic style: display nodes
     self.styles.append(basestyles.NodeDisplayer())
     # display profit for each node
     self.styles.append(\
         flexiblestyles.NodeListAttributeAsRectanglesDisplayer({\
                 'attribute': 'scores',
                 'colours': ColourMap([ colours.rosybrown,
                                        colours.cornflowerblue ]),
                 }))
예제 #3
0
 def loadDefault(self, keepAspectRatio=True):
     import flexiblestyles
     # 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,
                 'thickness': 1}))
     # basic style: display nodes
     self.styles.append(
         basestyles.NodeDisplayer({
             'node size': 2,
             'hide unused nodes': False
         }))
     # display profit for each node
     self.styles.append(\
         flexiblestyles.NodeAttributeAsRectangleDisplayer({\
                 'attribute': 'profit'}))
예제 #4
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())
예제 #5
0
    def loadDefault(self, keepAspectRatio=True):
        import basestyles
        # True if aspect ratio should be kept, False otherwise
        self.keepAspectRatio = keepAspectRatio
        # all styles for this stylesheet
        self.styles = []
        # display a label for each node
#         self.inputDataStyles.append(basestyles.NodeLabelDisplayer())
        # display each node's demand
#         self.inputDataStyles.append(basestyles.NodeDemandDisplayer())
        # basic style for the solution: display routes
        self.styles.append(\
            basestyles.RouteDisplayer())
#             basestyles.RouteColourDisplayer(drawDepotArcs=True,
#                                         attribute='vehicle',
# #                                         colours= [ wx.Colour(0,0,0,255),
# #                                                    wx.Colour(255,0,0,255),
# #                                                    wx.Colour(0,255,0,255),
# #                                                    wx.Colour(0,0,255,255) ]
#                                                    )
#             )
#         self.solutionDataStyles.append(basestyles.RouteSplineDisplayer())
        # basic style: display nodes
        self.styles.append(basestyles.NodeDisplayer())