def __init__(self, radius):
     self.radius = radius
     self.cache_file_name = os.path.join(SimulationState().get_cache_directory(), "jobs_%s.pkl" % radius)
     self.cache_distances_file_name = os.path.join(
         SimulationState().get_cache_directory(), "distances_%s.pkl" % radius
     )
     Variable.__init__(self)
示例#2
0
 def __init__(self, number):
     self.lag_year = int(number)
     self.commercial_sqft_lag = self.commercial_sqft + "_lag" + str(
         self.lag_year)
     Variable.__init__(
         self
     )  # init commercial_sqft_lag first before call this, to use in dependencies
示例#3
0
 def __init__(self, number):
     self.lag_year = int(number)
     self.residential_units_lag = self.residential_units + "_lag" + str(self.lag_year)
     self.commercial_sqft_lag = self.commercial_sqft + "_lag" + str(self.lag_year)
     self.industrial_sqft_lag = self.industrial_sqft + "_lag" + str(self.lag_year)
     self.governmental_sqft_lag = self.governmental_sqft + "_lag" + str(self.lag_year)
     Variable.__init__(self) # init self.xxx above first before call this, to use in dependencies
 def __init__(self, number):
     self.tnumber = number
     self.logsum_hbw_am_income = "logsum_hbw_am_income_" + str(
         int(self.tnumber))
     self.trips_hbw_am_income = "trips_hbw_am_income_" + str(
         int(self.tnumber))
     Variable.__init__(self)
示例#5
0
 def __init__(self, postfix):
     if postfix == 'cd':  # one special case
         lct = 'cdev'
     else:
         lct = postfix
     self.lct_type = lct
     #self.land_cover_type_within_footprint = "land_cover_type_%s_within_footprint" % lct
     Variable.__init__(self)
示例#6
0
 def __init__(self, postfix):
     if postfix == 'cd':     # one special case
         lct = 'cdev'
     else:
         lct = postfix
     self.lct_type = lct
     #self.land_cover_type_within_footprint = "land_cover_type_%s_within_footprint" % lct
     Variable.__init__(self)
示例#7
0
    def __init__(self):
        
        # This is mysterious and terrible.  But the avg weighted income is just too low!
        self.initial_factor = 1.0
        
        self.year_over_year_factor = 1.01

        Variable.__init__(self)
示例#8
0
 def __init__(self, category):
     if category < 6:
         self.filter = '(school.public == 1) * psrc_parcel.school.is_in_category_%s' % category
     else:
         cats = list(str(category))
         self.filter = 'psrc_parcel.school.is_in_category_%s' % cats[0]
         for cat in cats[1:len(cats)]:
             self.filter = '%s + psrc_parcel.school.is_in_category_%s' % (self.filter, cat)
     Variable.__init__(self)
 def __init__(self, category):
     if category < 6:
         self.filter = "psrc_parcel.school.is_in_category_%s" % category
     else:
         cats = list(str(category))
         self.filter = "psrc_parcel.school.is_in_category_%s" % cats[0]
         for cat in cats[1 : len(cats)]:
             self.filter = "%s + psrc_parcel.school.is_in_category_%s" % (self.filter, cat)
     Variable.__init__(self)
示例#10
0
 def __init__(self, package_name, attribute_name, lag_offset, dataset_name, index_name):
     self.package_name = package_name
     self.attribute_name = attribute_name
     self.simulation_state = SimulationState()
     self.attribute_cache = AttributeCache()
     self.lag_offset = lag_offset
     self.dataset_name = dataset_name
     self.index_name = index_name
     self.lag_index_name = "%s_lag%d" % (index_name, lag_offset)
     Variable.__init__(self)
 def __init__(self, ncars, attrname):
     """init method for zonal accessibility variables.  ncars is the number of cars per household,
     and attrname is the attribute (number_of_jobs or population) in the zones we range over to
     compute the accessibility.  For example, for home_access_to_employment_2, ncars is 2, and
     attrname is 'number_of_jobs'.  For work_access_to_population_2, ncars is again 2, and
     attrname is 'population'.   """
     self.num_cars = ncars
     self.attribute_name = attrname
     self.logsum_n = "logsum" + str(self.num_cars)
     Variable.__init__(self)
 def __init__(self,
              variable_name,
              year,
              dataset_name=None,
              package_name=None):
     self._variable_name = variable_name
     self._year = year
     self._package_name = package_name
     self._dataset_name = dataset_name
     Variable.__init__(self)
 def __init__(self, ncars, attrname):
     """init method for zonal accessibility variables.  ncars is the number of cars per household,
     and attrname is the attribute (number_of_jobs or population) in the zones we range over to
     compute the accessibility.  For example, for home_access_to_employment_2, ncars is 2, and
     attrname is 'number_of_jobs'.  For work_access_to_population_2, ncars is again 2, and
     attrname is 'population'.   """
     self.num_cars = ncars
     self.attribute_name = attrname
     self.logsum_n = "logsum" + str(self.num_cars)
     Variable.__init__(self)
示例#14
0
 def __init__(self, package_name, attribute_name, lag_offset, dataset_name,
              index_name):
     self.package_name = package_name
     self.attribute_name = attribute_name
     self.simulation_state = SimulationState()
     self.attribute_cache = AttributeCache()
     self.lag_offset = lag_offset
     self.dataset_name = dataset_name
     self.index_name = index_name
     self.lag_index_name = "%s_lag%d" % (index_name, lag_offset)
     Variable.__init__(self)
示例#15
0
 def __init__(self, target, name):
     if target.strip().lower() == "origin":
         self.join_attribute = "from_zone_id"
     elif target.strip().lower() == "destination":
         self.join_attribute = "to_zone_id"
     else:
         logger.log_warning("the first wild card is incorrectly specified; should be either 'origin' or 'destination'.")
         logger.log_warning("Default to 'destination'.")
         self.join_attribute = "to_zone_id"
         
     self.var_name = name
     Variable.__init__(self)
示例#16
0
 def __init__(self, number):
     self.lag_year = int(number)
     self.residential_units_lag = self.residential_units + "_lag" + str(
         self.lag_year)
     self.commercial_sqft_lag = self.commercial_sqft + "_lag" + str(
         self.lag_year)
     self.industrial_sqft_lag = self.industrial_sqft + "_lag" + str(
         self.lag_year)
     self.governmental_sqft_lag = self.governmental_sqft + "_lag" + str(
         self.lag_year)
     Variable.__init__(
         self
     )  # init self.xxx above first before call this, to use in dependencies
示例#17
0
    def __init__(self, target, name):
        if target.strip().lower() == "origin":
            self.join_attribute = "from_zone_id"
        elif target.strip().lower() == "destination":
            self.join_attribute = "to_zone_id"
        else:
            logger.log_warning(
                "the first wild card is incorrectly specified; should be either 'origin' or 'destination'."
            )
            logger.log_warning("Default to 'destination'.")
            self.join_attribute = "to_zone_id"

        self.var_name = name
        Variable.__init__(self)
 def __init__(self, variable_name):
     self.variable_name = variable_name
     Variable.__init__(self)
 def __init__(self, number):
     self.tnumber = number
     self.is_in_sector = "is_in_employment_sector_" + str(self.tnumber)
     Variable.__init__(self)
示例#20
0
 def __init__(self, number):
     Variable.__init__(self)
     self.tnumber = number
 def __init__(self, type_name):
     self.type_name = type_name
     Variable.__init__(self)
示例#22
0
 def __init__(self, workern):
     self.n = workern
     Variable.__init__(self)
 def __init__(self, number):
     self.tnumber = number
     self.job_is_in_employment_sector = "is_in_employment_sector_" + str(int(self.tnumber)) + "_non_home_based"
     Variable.__init__(self)
 def __init__(self, number):
     Variable.__init__(self)
     self.has_persons = "has_%s_persons" % number
 def __init__(self, constraint_type, generic_land_use_type):
     Variable.__init__(self)
     self.constraint_type = constraint_type
     self.generic_land_use_type = generic_land_use_type
示例#26
0
 def __init__(self,arg1,arg2):
     # just discard the additional arguments for DDD and SSS
     Variable.__init__(self)
 def __init__(self, city):
     self.is_in_city = "is_in_city_%s" % city
     self.hh_income = "income"
     
     Variable.__init__(self)
 def __init__(self, number):
     self.tnumber = number
     self.variable_name = "travel_time_hbw_am_drive_alone_to_" + str(int(number))
     Variable.__init__(self)
 def __init__(self, number):
     self.tnumber = number
     self.number_of_jobs_of_sector = "number_of_jobs_of_sector_" + str(
         int(self.tnumber))
     Variable.__init__(self)
 def __init__(self, building_type):
     self.building_type = building_type
     Variable.__init__(self)
 def __init__(self, number, var_name, condition):
     self.var_name = "worker" + str(number) + "_" + var_name
     self.condition = condition
     Variable.__init__(self)
示例#32
0
 def __init__(self, number, name):
     self.worker = "worker" + str(number)
     self.var_name = name
     Variable.__init__(self)
 def __init__(self, matrices):
     self.matrices = ["psrc.travel_data.%s" % m for m in matrices]
     Variable.__init__(self)
示例#34
0
 def __init__(self, type):
     self.type = type
     Variable.__init__(self)
示例#35
0
 def __init__(self, number):
     self.income_type = number
     Variable.__init__(self)
示例#36
0
 def __init__(self, type):
     self.total_value = "total_%s_value" % type
     Variable.__init__(self)
 def __init__(self, number):
     self.tnumber = number
     self.hh_has_some_cars = "has_%d_cars" % (self.tnumber)
     Variable.__init__(self)
 def __init__(self, number1, number2):
     self.condition1 = "has_eg_%s_households" % number1
     self.condition2 = "is_in_county_%s" % number2
     Variable.__init__(self)
示例#39
0
 def __init__(self, radius):
     self.radius = radius
     Variable.__init__(self)
示例#40
0
 def __init__(self, type_name):
     self.type_name = type_name
     self.is_development_type = "is_development_type_" + self.type_name
     Variable.__init__(self)
 def __init__(self, type):
     self.number_of_jobs = "number_of_%s_jobs" % type
     self.possible_jobs = "total_number_of_possible_%s_jobs_from_buildings" % type
     self.variable_name = "vacant_%s_job_space_from_buildings" % type
     Variable.__init__(self)
示例#42
0
 def __init__(self, group):
     self.group = group
     Variable.__init__(self)
示例#43
0
 def __init__(self, number):
     self.tnumber = number
     self.variable_name = "de_population_" + str(int(number))
     Variable.__init__(self)
 def __init__(self, number1, number2):
     self.worker = "worker" + str(number1)
     self.county = "is_work_place_in_county_" + str(number2)
     Variable.__init__(self)
    def __init__(self, city):
        self.is_in_city = "is_in_city_%s" % city
        self.hh_income = "income"

        Variable.__init__(self)
 def __init__(self, sector_id):
     self.sector_id = sector_id
     Variable.__init__(self)
示例#47
0
 def __init__(self, sector_id, radius):
     self.sector_id = sector_id
     self.radius = radius
     Variable.__init__(self)
示例#48
0
 def __init__(self, covertype_symbol):
     Variable.__init__(self)
     self.covertype_symbol = covertype_symbol
示例#49
0
 def __init__(self, type_name):
     self.type_name = type_name
     self.number_of_development_type_wwd = \
         "number_of_development_type_"+self.type_name+"_within_walking_distance"
     Variable.__init__(self)
示例#50
0
 def __init__(self, variable_name):
     self.variable_name = variable_name
     Variable.__init__(self)
 def __init__(self, number):
     self.tnumber = number
     self.ln_home_access_to_population_income = \
             "ln_home_access_to_population_income_%d" % int(self.tnumber)
     Variable.__init__(self)
 def __init__(self, number):
     Variable.__init__(self)
     self.tnumber = number
示例#53
0
 def __init__(self, number):
     self.tnumber = number
     self.twauht_work_am_income = \
             "trip_weighted_average_utility_hbw_to_work_am_income_%d" % int(self.tnumber)
     Variable.__init__(self)
示例#54
0
 def __init__(self, points):
     self.points = points
     Variable.__init__(self)
示例#55
0
 def __init__(self, number):
     self.tnumber = number
     self.has_cars = "has_%s_cars" % self.tnumber
     Variable.__init__(self)
示例#56
0
 def __init__(self, land_use_name):
     self.land_use_name = land_use_name
     Variable.__init__(self)
 def __init__(self, number):
     self.tnumber = number
     self.is_in_sector = "is_in_employment_sector_" + str(self.tnumber)
     Variable.__init__(self)
示例#58
0
 def __init__(self, number1, number2):
     self.condition1 = "has_eg_%s_surveyed_households" % number1
     self.condition2 = "is_in_county_%s" % number2
     Variable.__init__(self)
 def __init__(self, number):
     self.tnumber = number
     self.ln_access_from_residence_to_workplaces_in_zone = "ln_access_from_residence_to_workplaces_%d" % int(
         self.tnumber)
     Variable.__init__(self)