Пример #1
0
def test_config():
    
    settings = {
        # equivalent minutes of a tick
        'TIMEUNIT': 20,
        # the length of simulation
        'TIMELENG': 1440,
        # variance tolerance of preferred activitiy timing
        'DELTA': 0.25 * 60.0,
        # the link capacity
        'CAPACITY_ped': 30000,
        'CAPACITY_bus': 120,
        'CAPACITY_sub': 1500,
        # the equivalent utility of unit in-vehicle travel time
        'ALPHA_in': 60.0,
        # the equivalent utility of unit drive travel time
        'ALPHA_drive': 60.0,
        # the equivalent utility of unit waiting time
        'ALPHA_wait': 120.0,
        # the equivalent utility of unit walking time
        'ALPHA_walk': 120.0,
        # the equivalent utility of line transfering 
        'ALPHA_tran': 5.0,
        # the equivalent utility of one dollar
        'ALPHA_fare': 1.0,
        # the unit cost of early arrival (dollar/hour)
        'ALPHA_early': 0.0, # 30.0 * min2h
        # the unit cost of late arrival (dollar/hour)
        'ALPHA_late': 0.0,  # 90.0 * min2h
        # the unit cost of house rent 
        'ALPHA_rent': 1.0,
        # the parameter related to residential location 
        'THETA_location': 0.002,
        # the parameter related to making a trip or not
        'THETA_travel': 0.005,
        # the parameter related to pattern choice
        'THETA_bundle': 0.008,
        # the parameter related to tour choice
        'THETA_tour': 0.01,
        # the parameter related to path choice
        # 'THETA_path: 0.1
        # discount of future utility
        'discount': 1.0,
        # correlation between household members
        # 1-dimension dict, i.e. corr[(person 1,person 2)]
        'corr': {}
        # activity name tokens
        # 'tokens': {
        #     'residence': 'home',
        #     'business': 'work',
        #     'school': 'school'
        # }
    }
    # logger.debug(pformat(settings))
    Config.init(settings)
    Time.init(Config.TIMELENG, Config.TIMEUNIT)
Пример #2
0
def test_config():

    settings = {
        # equivalent minutes of a tick
        'TIMEUNIT': 20,
        # the length of simulation
        'TIMELENG': 1440,
        # variance tolerance of preferred activitiy timing
        'DELTA': 0.25 * 60.0,
        # the link capacity
        'CAPACITY_ped': 30000,
        'CAPACITY_bus': 120,
        'CAPACITY_sub': 1500,
        # the equivalent utility of unit in-vehicle travel time
        'ALPHA_in': 60.0,
        # the equivalent utility of unit drive travel time
        'ALPHA_drive': 60.0,
        # the equivalent utility of unit waiting time
        'ALPHA_wait': 120.0,
        # the equivalent utility of unit walking time
        'ALPHA_walk': 120.0,
        # the equivalent utility of line transfering
        'ALPHA_tran': 5.0,
        # the equivalent utility of one dollar
        'ALPHA_fare': 1.0,
        # the unit cost of early arrival (dollar/hour)
        'ALPHA_early': 0.0,  # 30.0 * min2h
        # the unit cost of late arrival (dollar/hour)
        'ALPHA_late': 0.0,  # 90.0 * min2h
        # the unit cost of house rent
        'ALPHA_rent': 1.0,
        # the parameter related to residential location
        'THETA_location': 0.002,
        # the parameter related to making a trip or not
        'THETA_travel': 0.005,
        # the parameter related to pattern choice
        'THETA_bundle': 0.008,
        # the parameter related to tour choice
        'THETA_tour': 0.01,
        # the parameter related to path choice
        # 'THETA_path: 0.1
        # discount of future utility
        'discount': 1.0,
        # correlation between household members
        # 1-dimension dict, i.e. corr[(person 1,person 2)]
        'corr': {}
        # activity name tokens
        # 'tokens': {
        #     'residence': 'home',
        #     'business': 'work',
        #     'school': 'school'
        # }
    }
    # logger.debug(pformat(settings))
    Config.init(settings)
    Time.init(Config.TIMELENG, Config.TIMEUNIT)