예제 #1
0
파일: Myopic.py 프로젝트: harsha2412/P-Med
 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()
예제 #2
0
파일: EM.py 프로젝트: harsha2412/P-Med
 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 = {}
예제 #3
0
파일: MIP.py 프로젝트: harsha2412/P-Med
	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
예제 #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
예제 #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 = {}