Skip to content

Commit

Permalink
rename file path
Browse files Browse the repository at this point in the history
  • Loading branch information
r-akemii committed Aug 7, 2024
1 parent e2faa53 commit 140f53a
Show file tree
Hide file tree
Showing 19 changed files with 35 additions and 24 deletions.
2 changes: 1 addition & 1 deletion aequilibrae/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from aequilibrae import project

try:
from aequilibrae.paths.AoN import path_computation
from aequilibrae.paths.cython.AoN import path_computation
except Exception as e:
global_logger.warning(f"Failed to import compiled modules. {e.args}")
raise
Expand Down
4 changes: 2 additions & 2 deletions aequilibrae/paths/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
from aequilibrae.paths.vdf import VDF
from aequilibrae.paths.graph import Graph, TransitGraph
from aequilibrae.paths.optimal_strategies import OptimalStrategies
from aequilibrae.paths.public_transport import HyperpathGenerating
from aequilibrae.paths.cython.public_transport import HyperpathGenerating
from aequilibrae.paths.route_choice import RouteChoice

from aequilibrae import global_logger


try:
from aequilibrae.paths.AoN import (
from aequilibrae.paths.cython.AoN import (
one_to_all,
skimming_single_origin,
path_computation,
Expand Down
2 changes: 1 addition & 1 deletion aequilibrae/paths/all_or_nothing.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from .multi_threaded_aon import MultiThreadedAoN

try:
from aequilibrae.paths.AoN import one_to_all, assign_link_loads
from aequilibrae.paths.cython.AoN import one_to_all, assign_link_loads
except ImportError as ie:
global_logger.warning(f"Could not import procedures from the binary. {ie.args}")

Expand Down
2 changes: 1 addition & 1 deletion aequilibrae/paths/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import numpy as np
import pandas as pd
from aequilibrae.paths.graph_building import build_compressed_graph, create_compressed_link_network_mapping
from aequilibrae.paths.cython.graph_building import build_compressed_graph, create_compressed_link_network_mapping

from aequilibrae.context import get_logger

Expand Down
8 changes: 4 additions & 4 deletions aequilibrae/paths/linear_approximation.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
from typing import List, Dict

import numpy as np
from aequilibrae.paths.AoN import copy_two_dimensions, copy_three_dimensions
from aequilibrae.paths.AoN import linear_combination, linear_combination_skims, aggregate_link_costs
from aequilibrae.paths.AoN import sum_a_times_b_minus_c, linear_combination_1d
from aequilibrae.paths.AoN import triple_linear_combination, triple_linear_combination_skims
from aequilibrae.paths.cython.AoN import copy_two_dimensions, copy_three_dimensions
from aequilibrae.paths.cython.AoN import linear_combination, linear_combination_skims, aggregate_link_costs
from aequilibrae.paths.cython.AoN import sum_a_times_b_minus_c, linear_combination_1d
from aequilibrae.paths.cython.AoN import triple_linear_combination, triple_linear_combination_skims
from scipy.optimize import root_scalar

from aequilibrae.paths.all_or_nothing import allOrNothing
Expand Down
2 changes: 1 addition & 1 deletion aequilibrae/paths/network_skimming.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from aequilibrae.paths.results.skim_results import SkimResults

try:
from aequilibrae.paths.AoN import skimming_single_origin
from aequilibrae.paths.cython.AoN import skimming_single_origin
except ImportError as ie:
global_logger.warning(f"Could not import procedures from the binary. {ie.args}")

Expand Down
2 changes: 1 addition & 1 deletion aequilibrae/paths/optimal_strategies.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging
from scipy import sparse
import numpy as np
from aequilibrae.paths.public_transport import HyperpathGenerating
from aequilibrae.paths.cython.public_transport import HyperpathGenerating


class OptimalStrategies:
Expand Down
2 changes: 1 addition & 1 deletion aequilibrae/paths/results/assignment_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from pathlib import Path

try:
from aequilibrae.paths.AoN import sum_axis1, assign_link_loads
from aequilibrae.paths.cython.AoN import sum_axis1, assign_link_loads
except ImportError as ie:
global_logger.warning(f"Could not import procedures from the binary. {ie.args}")

Expand Down
2 changes: 1 addition & 1 deletion aequilibrae/paths/results/path_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Union, List

try:
from aequilibrae.paths.AoN import update_path_trace, path_computation, HEURISTIC_MAP
from aequilibrae.paths.cython.AoN import update_path_trace, path_computation, HEURISTIC_MAP
except ImportError as ie:
global_logger.warning(f"Could not import procedures from the binary. {ie.args}")

Expand Down
5 changes: 3 additions & 2 deletions aequilibrae/paths/setup_assignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Make sure to keep this up to date with that file

import platform
from os.path import join
import numpy as np
import pyarrow as pa
from Cython.Build import cythonize
Expand All @@ -20,8 +21,8 @@

ext_modules = [
Extension(
"AoN",
["AoN.pyx"],
"cython.AoN",
[join("cython", "AoN.pyx")],
extra_compile_args=[f"{prefix}openmp", cpp_std], # do we want -Ofast?
extra_link_args=[f"{prefix}openmp"],
define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")],
Expand Down
11 changes: 10 additions & 1 deletion aequilibrae/paths/vdf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
from aequilibrae import global_logger

try:
from aequilibrae.paths.AoN import bpr, delta_bpr, bpr2, delta_bpr2, conical, delta_conical, inrets, delta_inrets
from aequilibrae.paths.cython.AoN import (
bpr,
delta_bpr,
bpr2,
delta_bpr2,
conical,
delta_conical,
inrets,
delta_inrets,
)
except ImportError as ie:
global_logger.warning(f"Could not import procedures from the binary. {ie.args}")

Expand Down
2 changes: 1 addition & 1 deletion docs/source/modeling_with_aequilibrae/route_choice.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Imports

.. code:: python
from aequilibrae.paths.route_choice_set import RouteChoiceSet
from aequilibrae.paths.cython.route_choice_set import RouteChoiceSet
from aequilibrae import Project
proj = Project()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Code example
from tempfile import gettempdir
from os.path import join
from aequilibrae.utils.create_example import create_example
from aequilibrae.paths.route_choice_set import RouteChoiceSet
from aequilibrae.paths.cython.route_choice_set import RouteChoiceSet
fldr = join(gettempdir(), uuid4().hex)
project = create_example(fldr, "coquimbo")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Imports
import networkx as nx
import numpy as np
import pandas as pd
from aequilibrae.paths.public_transport import HyperpathGenerating
from aequilibrae.paths.cython.public_transport import HyperpathGenerating
from numba import jit
RS = 124 # random seed
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
"database_specification/network/triggers/*.*",
"database_specification/transit/tables/*.*",
"database_specification/transit/triggers/*.*",
"network/network.yml",
],
}

Expand Down
2 changes: 1 addition & 1 deletion tests/aequilibrae/paths/test_conical.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from unittest import TestCase
from aequilibrae.paths.AoN import conical, delta_conical
from aequilibrae.paths.cython.AoN import conical, delta_conical
from multiprocessing import cpu_count
import numpy as np

Expand Down
2 changes: 1 addition & 1 deletion tests/aequilibrae/paths/test_hyperpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import numpy as np
import pandas as pd
from unittest import TestCase
from aequilibrae.paths.public_transport import HyperpathGenerating
from aequilibrae.paths.cython.public_transport import HyperpathGenerating


def create_vertices(n):
Expand Down
2 changes: 1 addition & 1 deletion tests/aequilibrae/paths/test_inrets.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from unittest import TestCase
from aequilibrae.paths.AoN import inrets, delta_inrets
from aequilibrae.paths.cython.AoN import inrets, delta_inrets
from multiprocessing import cpu_count
import numpy as np

Expand Down
4 changes: 2 additions & 2 deletions tests/aequilibrae/paths/test_parallel_numpy.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import unittest
import numpy as np
from aequilibrae.paths.AoN import copy_one_dimension, sum_axis1, linear_combination, linear_combination_skims
from aequilibrae.paths.AoN import copy_two_dimensions, copy_three_dimensions
from aequilibrae.paths.cython.AoN import copy_one_dimension, sum_axis1, linear_combination, linear_combination_skims
from aequilibrae.paths.cython.AoN import copy_two_dimensions, copy_three_dimensions


class TestParallel(unittest.TestCase):
Expand Down

0 comments on commit 140f53a

Please sign in to comment.