本文整理汇总了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]
示例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"""
示例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]
示例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
示例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]
示例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']
示例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]
示例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,
]
示例9: __init__
def __init__(self, specification):
Model.__init__(self, specification)
self.specification = specification
self.idSpec = specification.idSpec
self.persArrivedAttribSpec = specification.persArrivedAttribSpec
示例10: __init__
def __init__(self, specification):
Model.__init__(self, specification)
self.specification = specification
self.activityAttribs = self.specification.activityAttribs
示例11: __init__
def __init__(self, specification):
Model.__init__(self, specification)
self.specification = specification
self.idSpec = specification.idSpec
self.tripDepAttribSpec = specification.tripDepAttribSpec
示例12: __init__
def __init__(self, specification):
Model.__init__(self, specification)
示例13: __init__
def __init__(self, specification):
Model.__init__(self, specification)
self.specification = specification
self.uniqueRecordsColName = self.specification.uniqueRecordsColName