当前位置: 首页>>代码示例>>Python>>正文


Python abstract_model.Model类代码示例

本文整理汇总了Python中openamos.core.models.abstract_model.Model的典型用法代码示例。如果您正苦于以下问题:Python Model类的具体用法?Python Model怎么用?Python Model使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Model类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

    def __init__(self, specification):
        Model.__init__(self, specification)
        self.specification = specification
        self.childDepProcessingType = self.specification.childDepProcessingType
        self.activityAttribs = self.specification.activityAttribs
        self.dailyStatusAttribs = self.specification.dailyStatusAttribs
        self.dependencyAttribs = self.specification.dependencyAttribs
        
        self.hidName = self.activityAttribs.hidName
        self.pidName = self.activityAttribs.pidName
        self.scheduleidName = self.activityAttribs.scheduleidName
        self.activitytypeName = self.activityAttribs.activitytypeName
        self.locationidName = self.activityAttribs.locationidName
        self.starttimeName = self.activityAttribs.starttimeName
        self.endtimeName = self.activityAttribs.endtimeName
        self.durationName = self.activityAttribs.durationName
        self.dependentPersonName = self.activityAttribs.dependentPersonName
        self.tripCountName = self.activityAttribs.tripCountName        
        
        self.schoolStatusName = self.dailyStatusAttribs.schoolStatusName
        self.workStatusName = self.dailyStatusAttribs.workStatusName
        self.childDependencyName = self.dependencyAttribs.childDependencyName

        self.colNames = [self.hidName,
                                  self.pidName,
                                  self.scheduleidName,
                                  self.activitytypeName,
                                  self.starttimeName,
                                  self.endtimeName,
                                  self.locationidName,
                                  self.durationName,
                                  self.dependentPersonName,
                                  self.tripCountName]
开发者ID:foss-transportationmodeling,项目名称:simtravel,代码行数:33,代码来源:child_dependency_processing.py

示例2: __init__

    def __init__(self, specification, error_specification):
        """
        This is the base class for all regression based mathematical formulations
        in OpenAMOS

        Inputs:
        specification - Specification object
        error_specifciation - ErrorSpecification object
        """

        Model.__init__(self, specification)

        if not isinstance(self.specification, Specification):
            raise SpecificationError, """specification input is not a """\
                """valid Specification object"""

        self.error_specification = error_specification

        if specification.number_choices > 1:
            raise SpecificationError, """invalid specification for regression """\
                """ model only one equation needs to be specified"""

        if not isinstance(self.error_specification, ErrorSpecification):
            raise ErrorSpecificationError, """invalid error specification"""\
                """ it should be of type ErrorSpecification"""
开发者ID:foss-transportationmodeling,项目名称:simtravel,代码行数:25,代码来源:abstract_regression_model.py

示例3: __init__

    def __init__(self, specification):
        Model.__init__(self, specification)
        self.specification = specification
        self.activityAttribs = self.specification.activityAttribs

        self.hidName = self.activityAttribs.hidName
        self.pidName = self.activityAttribs.pidName
        self.scheduleidName = self.activityAttribs.scheduleidName
        self.activitytypeName = self.activityAttribs.activitytypeName
        self.locationidName = self.activityAttribs.locationidName
        self.starttimeName = self.activityAttribs.starttimeName
        self.endtimeName = self.activityAttribs.endtimeName
        self.durationName = self.activityAttribs.durationName
        self.dependentPersonName = self.activityAttribs.dependentPersonName
        self.tripCountName = self.activityAttribs.tripCountName        

        self.colNames = [self.hidName,
                                  self.pidName,
                                  self.scheduleidName,
                                  self.activitytypeName,
                                  self.starttimeName,
                                  self.endtimeName,
                                  self.locationidName,
                                  self.durationName,
                                  self.dependentPersonName,
                                  self.tripCountName]
开发者ID:foss-transportationmodeling,项目名称:simtravel,代码行数:26,代码来源:reconcile_schedules.py

示例4: __init__

    def __init__(self, count_specification):
        if not isinstance(count_specification, CountSpecification):
            raise SpecificationError, """the specification is not a valid """ """CountSpecification object"""

        Model.__init__(self, count_specification)

        self.distribution = count_specification.distribution
开发者ID:osPlanning,项目名称:simtravel,代码行数:7,代码来源:poisson_regression_model.py

示例5: __init__

 def __init__(self, specification):
     Model.__init__(self, specification)
     self.specification = specification
     self.activityAttribs = self.specification.activityAttribs
     self.colNames = [self.activityAttribs.hidName,
                      self.activityAttribs.pidName,
                      self.activityAttribs.starttimeName,
                      self.activityAttribs.endtimeName]
开发者ID:foss-transportationmodeling,项目名称:simtravel,代码行数:8,代码来源:identify_individual_attributes.py

示例6: __init__

    def __init__(self, specification):
        Model.__init__(self, specification)
        self.specification = specification

	self.agentType =self.specification.agentType
	self.idSpec = self.specification.idSpec	
	self.hhldAttribs = self.specification.hhldAttribs
	self.personAttribs = self.specification.personAttribs
	self.evolutionAttribs = self.specification.evolutionAttribs


	self.hhldColNames = [self.idSpec.hidName, 

			     self.hhldAttribs.bldgszName,
			     self.hhldAttribs.hhtName,
			     self.hhldAttribs.hincName,
			     self.hhldAttribs.nocName,
			     self.hhldAttribs.personsName,
			     self.hhldAttribs.unittypeName,
			     self.hhldAttribs.vehiclName,
			     self.hhldAttribs.wifName,
			     self.hhldAttribs.yrMovedName,
			     'old_houseid']
	self.personColNames = [self.idSpec.hidName,
                             self.idSpec.pidName,

			     self.personAttribs.ageName,
			     self.personAttribs.clwkrName,
			     self.personAttribs.educName,
			     self.personAttribs.enrollName,
			     self.personAttribs.esrName,
			     self.personAttribs.indnaicsName,
			     self.personAttribs.occcen5Name,
			     self.personAttribs.race1Name,
			     self.personAttribs.relateName,
			     self.personAttribs.sexName,
			     self.personAttribs.marstatName,
			     self.personAttribs.hoursName,
			     self.personAttribs.gradeName,
			     self.personAttribs.hispanName,

			     #self.evolutionAttribs.morality_fName,
			     #self.evolutionAttribs.birth_fName,
			     #self.evolutionAttribs.age_fName,
			     #self.evolutionAttribs.enrollment_fName,
			     #self.evolutionAttribs.grade_fName,
			     #self.evolutionAttribs.educ_fName,
			     #self.evolutionAttribs.educInYears_fName,
			     #self.evolutionAttribs.residenceType_fName,
			     #self.evolutionAttribs.laborParticipation_fName,
			     #self.evolutionAttribs.occupation_fName,
			     #self.evolutionAttribs.income_fName,
			     #self.evolutionAttribs.marriageDecision_fName,
			     #self.evolutionAttribs.divorceDecision_fName,
			     'old_houseid']
开发者ID:foss-transportationmodeling,项目名称:simtravel,代码行数:55,代码来源:population_evolution_processing.py

示例7: __init__

    def __init__(self, specification):
        Model.__init__(self, specification)
        self.specification = specification
        self.activityAttribs = self.specification.activityAttribs
        self.arrivalInfoAttribs = self.specification.arrivalInfoAttribs
        self.occupancyInfoAttribs = self.specification.occupancyInfoAttribs
        self.dailyStatusAttribs = self.specification.dailyStatusAttribs
        self.dependencyAttribs = self.specification.dependencyAttribs

        self.schedAdjType = self.specification.schedAdjType

        self.colNames = [self.activityAttribs.hidName,
                         self.activityAttribs.pidName,
                         self.activityAttribs.scheduleidName,
                         self.activityAttribs.activitytypeName,
                         self.activityAttribs.starttimeName,
                         self.activityAttribs.endtimeName,
                         self.activityAttribs.locationidName,
                         self.activityAttribs.durationName,
                         self.activityAttribs.dependentPersonName,
                         self.activityAttribs.tripCountName]
开发者ID:foss-transportationmodeling,项目名称:simtravel,代码行数:21,代码来源:adjust_schedules.py

示例8: __init__

    def __init__(self, specification):
        Model.__init__(self, specification)
        self.specification = specification

        self.idSpec = self.specification.idSpec
        self.hhldAttribs = self.specification.hhldAttribs
        self.personAttribs = self.specification.personAttribs
        self.popgenConfig = self.specification.popgenConfig
        self.hhldIdSeries = self.specification.hhldIdSeries

        self.hhldColNames = [
            self.idSpec.hidName,
            self.hhldAttribs.bldgszName,
            self.hhldAttribs.hhtName,
            self.hhldAttribs.hincName,
            self.hhldAttribs.nocName,
            self.hhldAttribs.personsName,
            self.hhldAttribs.unittypeName,
            self.hhldAttribs.vehiclName,
            self.hhldAttribs.wifName,
            self.hhldAttribs.yrMovedName,
        ]
        self.personColNames = [
            self.idSpec.hidName,
            self.idSpec.pidName,
            self.personAttribs.ageName,
            self.personAttribs.clwkrName,
            self.personAttribs.educName,
            self.personAttribs.enrollName,
            self.personAttribs.esrName,
            self.personAttribs.indnaicsName,
            self.personAttribs.occcen5Name,
            self.personAttribs.race1Name,
            self.personAttribs.relateName,
            self.personAttribs.sexName,
            self.personAttribs.marstatName,
            self.personAttribs.hoursName,
            self.personAttribs.gradeName,
            self.personAttribs.hispanName,
        ]
开发者ID:osPlanning,项目名称:simtravel,代码行数:40,代码来源:immigration.py

示例9: __init__

    def __init__(self, specification):
        Model.__init__(self, specification)
        self.specification = specification

        self.idSpec = specification.idSpec
        self.persArrivedAttribSpec = specification.persArrivedAttribSpec
开发者ID:foss-transportationmodeling,项目名称:simtravel,代码行数:6,代码来源:persons_arrived_processing.py

示例10: __init__

 def __init__(self, specification):
     Model.__init__(self, specification)
     self.specification = specification
     self.activityAttribs = self.specification.activityAttribs
开发者ID:foss-transportationmodeling,项目名称:simtravel,代码行数:4,代码来源:reconcile_schedules.py

示例11: __init__

    def __init__(self, specification):
        Model.__init__(self, specification)
        self.specification = specification

        self.idSpec = specification.idSpec
        self.tripDepAttribSpec = specification.tripDepAttribSpec
开发者ID:foss-transportationmodeling,项目名称:simtravel,代码行数:6,代码来源:trip_occupant_processing.py

示例12: __init__

 def __init__(self, specification):
     Model.__init__(self, specification)
开发者ID:foss-transportationmodeling,项目名称:simtravel,代码行数:2,代码来源:abstract_choice_model.py

示例13: __init__

    def __init__(self, specification):
        Model.__init__(self, specification)
        self.specification = specification

        self.uniqueRecordsColName = self.specification.uniqueRecordsColName
开发者ID:foss-transportationmodeling,项目名称:simtravel,代码行数:5,代码来源:unique_records_processing.py


注:本文中的openamos.core.models.abstract_model.Model类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。