def loadDefault(self, keepAspectRatio=True): import basestyles # True if aspect ratio should be kept, False otherwise self.keepAspectRatio = keepAspectRatio # grid with one cell per day self.grid = True self.gridRouteAttribute = 'day' # initialize styles self.styles = [] # display colourful routes self.styles.append(\ basestyles.RouteColourDisplayer({\ 'draw depot arcs': True, 'attribute': 'vehicle', 'thickness': 2, 'colours': ColourMap([ Colour(255,0,0,255), Colour(0,255,0,255), Colour(0,0,255,255), Colour(0,255,255,255), Colour(255,0,255,255), Colour(255,255,0,255), Colour(0,0,0,255) ]) }) ) # basic style: display nodes self.styles.append(basestyles.NodeDisplayer({'node size': 1}))
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.RouteColourDisplayer(\ {'draw depot arcs':True, 'attribute': 'index', 'thickness': 1} ) ) # basic style: display nodes self.styles.append(basestyles.NodeDisplayer({'node size': 2}))
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.RouteColourDisplayer({'draw depot arcs': True})) # basic style: display nodes self.styles.append(basestyles.NodeDisplayer(\ parameters={ 'node size': 3, 'hide unused nodes': True, }))
def loadDefault(self, keepAspectRatio=False): import basestyles, extrastyles # True if aspect ratio should be kept, False otherwise self.keepAspectRatio = keepAspectRatio # initialize styles self.styles = [] # display routes as splines self.styles.append(extrastyles.RouteSplineDisplayer( {'arc colour': colours.funkybrown})) # basic style: display nodes self.styles.append(basestyles.NodeDisplayer({\ 'depot colour': colours.funkypink, 'depot contour': colours.funkypink, 'node colour': colours.funkygreen, 'node contour': colours.funkygreen}))
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())
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 ]), }))
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'}))
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())
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())