예제 #1
0
def test_agent_pid_11_not_start_from_home_impossible_chain_type2(
        test_trips, test_attributes):
    population = load_travel_diary(test_trips, test_attributes)
    acts = [a.act for a in population.households['8'].people['11'].activities]
    assert acts == ['work', 'shop', 'home']
예제 #2
0
def test_agent_pid_13_not_start_and_return_home_night_worker_complex_chain_type2_intra_trip(
        test_trips, test_attributes):
    population = load_travel_diary(test_trips, test_attributes)
    acts = [a.act for a in population.households['10'].people['13'].activities]
    assert acts == ['work', 'shop', 'home', 'work']
예제 #3
0
def test_agent_pid_6_not_return_home(test_trips, test_attributes):
    population = load_travel_diary(test_trips, test_attributes)
    acts = [a.act for a in population.households['3'].people['6'].activities]
    assert acts == ['home', 'work']
예제 #4
0
def test_agent_pid_7_not_start_and_return_home_night_worker(
        test_trips, test_attributes):
    population = load_travel_diary(test_trips, test_attributes)
    acts = [a.act for a in population.households['4'].people['7'].activities]
    assert acts == ['work', 'home', 'work']
예제 #5
0
def test_agent_pid_5_not_start_from_home(test_trips, test_attributes):
    population = load_travel_diary(test_trips, test_attributes)
    acts = [a.act for a in population.households['2'].people['5'].activities]
    print(acts)
    assert acts == ['work', 'home']
예제 #6
0
파일: test_3_parse.py 프로젝트: zhwlxl/pam
def test_infer_home_activity_idxs_longest(test_trips, test_attributes):
    population = load_travel_diary(test_trips, test_attributes)
    person = population.households['19'].people['22']
    assert person.plan.infer_activity_idxs(target=person.home) == {0,6}
예제 #7
0
파일: test_3_parse.py 프로젝트: zhwlxl/pam
def test_agent_pid_4_complex_tour(test_trips, test_attributes):
    population = load_travel_diary(test_trips, test_attributes)
    acts = [a.act for a in population.households['1'].people['4'].activities]
    assert acts == ['home', 'work', 'work', 'work', 'work', 'home']
예제 #8
0
파일: test_3_parse.py 프로젝트: zhwlxl/pam
def test_agent_pid_3_tour(test_trips, test_attributes):
    population = load_travel_diary(test_trips, test_attributes)
    acts = [a.act for a in population.households['1'].people['3'].activities]
    print(acts)
    assert acts == ['home', 'work', 'shop', 'work', 'home']
예제 #9
0
파일: test_3_parse.py 프로젝트: zhwlxl/pam
def test_load(test_trips, test_attributes):
    population = load_travel_diary(test_trips, test_attributes)
    assert population