Exemplo n.º 1
0
def test_loading_columns():
    network = pg.read_network()

    print('\nstart loading columns\n')
    st = time()

    pg.load_columns(network)

    print('processing time of loading columns :{0: .2f}'.format(time() - st) +
          's')

    print('\nstart column generation\n')
    st = time()

    iter_num = 0
    column_update_num = 10
    pg.perform_network_assignment(1, iter_num, column_update_num, network)

    print('processing time of column generation:{0: .2f}'.format(time() - st) +
          's'
          f' for {iter_num} assignment iterations and '
          f'{column_update_num} iterations in column generation')

    pg.output_columns(network)
    pg.output_link_performance(network)

    print('\npath finding results can be found in agent.csv')
Exemplo n.º 2
0
def test_loading_columns():
    network = pg.read_network()

    print('\nstart loading columns\n')
    st = time()

    pg.load_columns(network)

    print(f'processing time of loading columns: {time()-st:.2f} s')

    print('\nstart column generation')
    st = time()

    column_gen_num = 0
    column_update_num = 10
    # pg.perform_network_assignment(assignment_mode=1, column_gen_num,
    #                               column_update_num, network)
    # has been deprecated starting from v0.7.2, and will be removed in later.
    pg.perform_column_generation(column_gen_num, column_update_num, network)

    print(f'processing time of column generation: {time()-st:.2f} s'
          f' for {column_gen_num} iterations in column generation and '
          f'{column_update_num} iterations in column update')

    pg.output_columns(network)
    pg.output_link_performance(network)
Exemplo n.º 3
0
def test_column_generation_py():
    network = pg.read_network()

    print('\nstart column generation\n')
    st = time()

    iter_num = 20
    column_update_num = 20
    pg.perform_network_assignment(1, iter_num, column_update_num, network)

    print(f'processing time of column generation: {time()-st:.2f} s'
          f' for {iter_num} assignment iterations and '
          f'{column_update_num} iterations in column generation')

    # if you do not want to include geometry info in the output file,
    # use pg.output_columns(network, False)
    pg.output_columns(network)
    pg.output_link_performance(network)
Exemplo n.º 4
0
def test_column_generation_py():
    network = pg.read_network()

    print('\nstart column generation\n')
    st = time()

    column_gen_num = 10
    column_update_num = 10
    # pg.perform_network_assignment(assignment_mode=1, assignment_num,
    #                               column_update_num, network)
    # has been deprecated starting from v0.7.2, and will be removed later.
    pg.perform_column_generation(column_gen_num, column_update_num, network)

    print(f'processing time of column generation: {time()-st:.2f} s'
          f' for {column_gen_num} iterations in column generation and '
          f'{column_update_num} iterations in column update')

    # if you do not want to include geometry info in the output file,
    # use pg.output_columns(network, False)
    pg.output_columns(network)
    pg.output_link_performance(network)
Exemplo n.º 5
0
def test_loading_columns():
    network = pg.read_network()

    print('\nstart loading columns\n')
    st = time()

    pg.load_columns(network)

    print(f'processing time of loading columns: {time()-st:.2f} s')

    print('\nstart column generation\n')
    st = time()

    iter_num = 0
    column_update_num = 10
    pg.perform_network_assignment(1, iter_num, column_update_num, network)

    print(f'processing time of column generation: {time()-st:.2f} s'
          f' for {iter_num} assignment iterations and '
          f'{column_update_num} iterations in column generation')

    pg.output_columns(network)
    pg.output_link_performance(network)