Example #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')
Example #2
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)
Example #3
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)