コード例 #1
0
 def modify_agents_size(self,
                        agent_set,
                        size,
                        index,
                        non_residential_attr_name="building_sqft",
                        residential_attr_name="residential_units"):
     UrbansimBuildingLocationChoiceModel.modify_agents_size(
         self, agent_set, size, index, non_residential_attr_name,
         residential_attr_name)
コード例 #2
0
 def get_sampling_weights(self, config, agent_set=None, **kwargs):
     weight_array = UrbansimBuildingLocationChoiceModel.get_sampling_weights(self, config, 
                                                                             agent_set=agent_set, 
                                                                             **kwargs)
     where_developable = self.filter_index
     # multiply by filter for submodels
     building_use_ids = agent_set.get_attribute_by_index('building_use_id', kwargs['agents_index'])
     for submodel, filter_variable in self.filter_for_submodels.iteritems():
         if filter_variable.get_alias() in self.choice_set.get_known_attribute_names():
             values = self.choice_set.get_attribute(filter_variable)[where_developable].astype("bool8")
             index = where(building_use_ids == submodel)[0]
             weight_array[index, :] = weight_array[index, :] * values
             
     return weight_array
コード例 #3
0
    def get_sampling_weights(self, config, agent_set=None, **kwargs):
        weight_array = UrbansimBuildingLocationChoiceModel.get_sampling_weights(
            self, config, agent_set=agent_set, **kwargs)
        where_developable = self.filter_index
        # multiply by filter for submodels
        building_use_ids = agent_set.get_attribute_by_index(
            'building_use_id', kwargs['agents_index'])
        for submodel, filter_variable in self.filter_for_submodels.iteritems():
            if filter_variable.get_alias(
            ) in self.choice_set.get_known_attribute_names():
                values = self.choice_set.get_attribute(
                    filter_variable)[where_developable].astype("bool8")
                index = where(building_use_ids == submodel)[0]
                weight_array[index, :] = weight_array[index, :] * values

        return weight_array
コード例 #4
0
 def modify_agents_size(self, agent_set, size, index, non_residential_attr_name="building_sqft", 
                        residential_attr_name="residential_units"):
     UrbansimBuildingLocationChoiceModel.modify_agents_size(self, agent_set, size, index, non_residential_attr_name, 
                                                            residential_attr_name)