Пример #1
0
 def __init__(self, pmgrid):
     self.pmgrid = pmgrid
     wName = 'synthetic ' + str(self.pmgrid.gridSize) + '_pop' + str(
         self.pmgrid.population)
     #self.uniform = UniformDistribution.UniformDistribution(pmgrid)
     self.center = Center.Centered(pmgrid)
     self.mcenter = MultiCenters.MultiCenters(pmgrid)
     self.region = {}
     self.destDAO = DestinationDAO.DestinationDAO(wName)
Пример #2
0
 def __init__(self, k, distType):
     self.k = k
     self.currentSources = {}
     self.tempSources = {}
     self.destinations = {}
     self.sourceIdToDesinationIdMap = {}
     self.currentDestinationToSourceMapping = {}
     self.distanceMap = {}
     self.sourceDao = SourceDAO.SourceDAO(k, distType, 'Myopic')
     self.distType = distType
     self.destinationDao = DestinationDAO.DestinationDAO(distType)
     self.util = util.Utilities()
Пример #3
0
 def __init__(self, k, distType):
     self.k = k
     self.distType = distType
     self.destinations = {}
     self.destinationData = []
     self.destinationIds = {}
     self.sourceIdToDesinationIdMap = {}
     self.sourceDao = SourceDAO.SourceDAO(k, distType, 'EM')
     self.destinationDao = DestinationDAO.DestinationDAO(distType)
     self.util = util.Utilities()
     self.totalDemandInTheRegion = 0
     self.parts = {}
     self.currentDestinationToSourceMapping = {}
     self.partToDestinationMap = {}
     self.currentSources = {}
Пример #4
0
	def __init__(self, k, distType):
		self.p = k
		self.destinations = {}
		#self.mipExample() # example works!!
		self.dij = []
		self.destinations = {}
		self.distanceMap = {}
		self.indexToId = {}
		self.destinationDao = DestinationDAO.DestinationDAO(distType)
		self.demandWeights = []
		self.util = util.Utilities()
		self.distType = distType
		self.currentDestinationToSourceMapping = {}
		self.currentSources = {}
		self.sourceDao = SourceDAO.SourceDAO(k, distType, 'GRIA')
		self.n = 0
Пример #5
0
 def __init__(self, k, distType):
     self.k = k
     self.distType = distType
     self.maxIterations = 500
     self.iterations = 0
     self.currentSources = {}
     self.newSources = {}
     self.minSources = {}
     self.destinations = {}
     self.sourceIdToDesinationIdMap = {}
     self.distanceMap = {}
     self.sourceDao = SourceDAO.SourceDAO(k, distType, 'TB')
     self.destinationDao = DestinationDAO.DestinationDAO(distType)
     self.util = util.Utilities()
     self.tabooList = {}
     #self.weightMap = {}
     self.currentDestinationToSourceMapping = {
     }  # destination to source (id only)
     self.maxPopulation = 1
     self.current_r_value = 0.0
Пример #6
0
 def __init__(self, k, distType):
     self.k = k
     self.distType = distType
     self.maxIterations = 100
     #self.n = n
     self.currentSources = {}
     self.newSources = {}
     self.minSources = {}
     self.destinations = {}
     self.sourceIdToDesinationIdMap = {}
     self.distanceMap = {}
     self.sourceDao = SourceDAO.SourceDAO(k, distType, 'Maranzana')
     self.destinationDao = DestinationDAO.DestinationDAO(distType)
     self.util = util.Utilities()
     self.weightMap = {}
     self.currentDestinationToSourceMapping = {
     }  # destination to source (id only)
     self.maxPopulation = 1
     self.iterations = 0
     self.totalDemandInTheRegion = 0
     self.parts = {}
     self.partToDestinationMap = {}