Exemple #1
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()
Exemple #2
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 = {}
Exemple #3
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
Exemple #4
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
Exemple #5
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 = {}