當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。