diff --git a/.github/workflows/boost_version.yml b/.github/workflows/boost_version.yml index 2c61a85e5..2c304804b 100644 --- a/.github/workflows/boost_version.yml +++ b/.github/workflows/boost_version.yml @@ -1,14 +1,7 @@ name: Boost supported versions on: - push: - branches-ignore: - - 'translations_*' - tags: [] - pull_request: - paths-ignore: - - '**.po' - + workflow_dispatch: jobs: build: @@ -30,7 +23,7 @@ jobs: pgver=$(psql --version | grep -Po '(?<=psql \(PostgreSQL\) )[^;]+(?=\.\d \()') echo "PGVER=${pgver}" >> $GITHUB_ENV echo "PGIS=3" >> $GITHUB_ENV - echo "VROOMVER=1.11.0" >> $GITHUB_ENV + echo "VROOMVER=1.12.0" >> $GITHUB_ENV - name: Add PostgreSQL APT repository run: | @@ -80,15 +73,15 @@ jobs: - name: Build VROOM if: steps.cache-vroom.outputs.cache-hit != 'true' run: | - wget https://github.com/VROOM-Project/vroom/archive/refs/tags/v${{ env.VROOMVER }}.tar.gz -O /tmp/${{ env.VROOMVER }}.tar.gz - tar -zvxf /tmp/${{ env.VROOMVER }}.tar.gz -C ~/ - cd ~/vroom-${{ env.VROOMVER }}/src + git clone --depth 1 --branch v${{ env.VROOMVER }} https://github.com/VROOM-Project/vroom ~/vroom-${{ env.VROOMVER }} - # Create object file with position independent code using -fPIC flag - sed -i 's/CXXFLAGS = /CXXFLAGS = -fPIC /' makefile + # init the required submodules + cd ~/vroom-${{ env.VROOMVER }}/ + git submodule update --init + # Using "shared" target for creating Position Independent Code, disabling use of routing cd ~/vroom-${{ env.VROOMVER }}/src - make + USE_ROUTING=false make shared - name: Configure run: | diff --git a/.github/workflows/check-queries.yml b/.github/workflows/check-queries.yml index e60cbaafc..e5bd95cd0 100644 --- a/.github/workflows/check-queries.yml +++ b/.github/workflows/check-queries.yml @@ -4,13 +4,7 @@ name: Check queries # - the latest postgis version on: - push: - branches-ignore: - - 'translations_*' - tags: [] - pull_request: - paths-ignore: - - '**.po' + workflow_dispatch: jobs: build: @@ -31,7 +25,7 @@ jobs: echo "PGVER=${PGVER}" >> $GITHUB_ENV echo "PGPORT=5432" >> $GITHUB_ENV echo "PGIS=3" >> $GITHUB_ENV - echo "VROOMVER=1.11.0" >> $GITHUB_ENV + echo "VROOMVER=1.12.0" >> $GITHUB_ENV - name: Add PostgreSQL APT repository run: | @@ -70,15 +64,15 @@ jobs: - name: Build VROOM if: steps.cache-vroom.outputs.cache-hit != 'true' run: | - wget https://github.com/VROOM-Project/vroom/archive/refs/tags/v${{ env.VROOMVER }}.tar.gz -O /tmp/${{ env.VROOMVER }}.tar.gz - tar -zvxf /tmp/${{ env.VROOMVER }}.tar.gz -C ~/ - cd ~/vroom-${{ env.VROOMVER }}/src + git clone --depth 1 --branch v${{ env.VROOMVER }} https://github.com/VROOM-Project/vroom ~/vroom-${{ env.VROOMVER }} - # Create object file with position independent code using -fPIC flag - sed -i 's/CXXFLAGS = /CXXFLAGS = -fPIC /' makefile + # init the required submodules + cd ~/vroom-${{ env.VROOMVER }}/ + git submodule update --init + # Using "shared" target for creating Position Independent Code, disabling use of routing cd ~/vroom-${{ env.VROOMVER }}/src - make + USE_ROUTING=false make shared - name: Configure run: | diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml index e020c1df7..003240455 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/clang.yml @@ -1,13 +1,7 @@ name: Build for Ubuntu with clang on: - push: - branches-ignore: - - 'translations_*' - tags: [] - pull_request: - paths-ignore: - - '**.po' + workflow_dispatch: jobs: @@ -33,7 +27,7 @@ jobs: PGP=5433 if [ "${{ matrix.psql }}" == "${pgver}" ]; then PGP=5432; fi echo "PGPORT=5432" >> $GITHUB_ENV - echo "VROOMVER=1.11.0" >> $GITHUB_ENV + echo "VROOMVER=1.12.0" >> $GITHUB_ENV - name: Add PostgreSQL APT repository run: | @@ -73,15 +67,15 @@ jobs: - name: Build VROOM if: steps.cache-vroom.outputs.cache-hit != 'true' run: | - wget https://github.com/VROOM-Project/vroom/archive/refs/tags/v${{ env.VROOMVER }}.tar.gz -O /tmp/${{ env.VROOMVER }}.tar.gz - tar -zvxf /tmp/${{ env.VROOMVER }}.tar.gz -C ~/ - cd ~/vroom-${{ env.VROOMVER }}/src + git clone --depth 1 --branch v${{ env.VROOMVER }} https://github.com/VROOM-Project/vroom ~/vroom-${{ env.VROOMVER }} - # Create object file with position independent code using -fPIC flag - sed -i 's/CXXFLAGS = /CXXFLAGS = -fPIC /' makefile + # init the required submodules + cd ~/vroom-${{ env.VROOMVER }}/ + git submodule update --init + # Using "shared" target for creating Position Independent Code, disabling use of routing cd ~/vroom-${{ env.VROOMVER }}/src - make + USE_ROUTING=false make shared - name: Configure run: | diff --git a/.github/workflows/doc-check.yml b/.github/workflows/doc-check.yml index bcdcb5bfc..f23570565 100644 --- a/.github/workflows/doc-check.yml +++ b/.github/workflows/doc-check.yml @@ -8,7 +8,8 @@ name: Check Documentation # - build Links # - English is always tested -on: [push,pull_request] +on: + workflow_dispatch: jobs: build: @@ -38,7 +39,7 @@ jobs: PROCESS=${{ true }} fi echo "PROCESS=${PROCESS}" >> $GITHUB_ENV - echo "VROOMVER=1.11.0" >> $GITHUB_ENV + echo "VROOMVER=1.12.0" >> $GITHUB_ENV - name: Get postgres version if: env.PROCESS == 'true' @@ -94,15 +95,15 @@ jobs: - name: Build VROOM if: steps.cache-vroom.outputs.cache-hit != 'true' run: | - wget https://github.com/VROOM-Project/vroom/archive/refs/tags/v${{ env.VROOMVER }}.tar.gz -O /tmp/${{ env.VROOMVER }}.tar.gz - tar -zvxf /tmp/${{ env.VROOMVER }}.tar.gz -C ~/ - cd ~/vroom-${{ env.VROOMVER }}/src + git clone --depth 1 --branch v${{ env.VROOMVER }} https://github.com/VROOM-Project/vroom ~/vroom-${{ env.VROOMVER }} - # Create object file with position independent code using -fPIC flag - sed -i 's/CXXFLAGS = /CXXFLAGS = -fPIC /' makefile + # init the required submodules + cd ~/vroom-${{ env.VROOMVER }}/ + git submodule update --init + # Using "shared" target for creating Position Independent Code, disabling use of routing cd ~/vroom-${{ env.VROOMVER }}/src - make + USE_ROUTING=false make shared - name: Configure if: env.PROCESS == 'true' diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index d932e37f6..84538046c 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -6,11 +6,7 @@ name: Build documentation # - postgis 3 on: - push: - branches: - - main - tags: - - '*' + workflow_dispatch: jobs: build: @@ -29,7 +25,7 @@ jobs: pgver=$(psql --version | grep -Po '(?<=psql \(PostgreSQL\) )[^;]+(?=\.\d \()') echo "PGVER=${pgver}" >> $GITHUB_ENV echo "PGIS=3" >> $GITHUB_ENV - echo "VROOMVER=1.11.0" >> $GITHUB_ENV + echo "VROOMVER=1.12.0" >> $GITHUB_ENV - name: Add PostgreSQL APT repository run: | @@ -74,15 +70,15 @@ jobs: - name: Build VROOM if: steps.cache-vroom.outputs.cache-hit != 'true' run: | - wget https://github.com/VROOM-Project/vroom/archive/refs/tags/v${{ env.VROOMVER }}.tar.gz -O /tmp/${{ env.VROOMVER }}.tar.gz - tar -zvxf /tmp/${{ env.VROOMVER }}.tar.gz -C ~/ - cd ~/vroom-${{ env.VROOMVER }}/src + git clone --depth 1 --branch v${{ env.VROOMVER }} https://github.com/VROOM-Project/vroom ~/vroom-${{ env.VROOMVER }} - # Create object file with position independent code using -fPIC flag - sed -i 's/CXXFLAGS = /CXXFLAGS = -fPIC /' makefile + # init the required submodules + cd ~/vroom-${{ env.VROOMVER }}/ + git submodule update --init + # Using "shared" target for creating Position Independent Code, disabling use of routing cd ~/vroom-${{ env.VROOMVER }}/src - make + USE_ROUTING=false make shared - name: Configure link checks run: | diff --git a/.github/workflows/locale-and-website.yml b/.github/workflows/locale-and-website.yml index d62d26523..611df427b 100644 --- a/.github/workflows/locale-and-website.yml +++ b/.github/workflows/locale-and-website.yml @@ -2,10 +2,6 @@ name: Update Locale and Website on: workflow_dispatch: - push: - branches: - - main - - develop jobs: release: @@ -30,7 +26,7 @@ jobs: echo "PGPORT=5432" >> $GITHUB_ENV echo "PGIS=3" >> $GITHUB_ENV echo "PROJECT_VERSION=${PROJECT_VERSION}" >> $GITHUB_ENV - echo "VROOMVER=1.11.0" >> $GITHUB_ENV + echo "VROOMVER=1.12.0" >> $GITHUB_ENV - name: Extract branch name and commit hash run: | @@ -84,15 +80,15 @@ jobs: - name: Build VROOM if: steps.cache-vroom.outputs.cache-hit != 'true' run: | - wget https://github.com/VROOM-Project/vroom/archive/refs/tags/v${{ env.VROOMVER }}.tar.gz -O /tmp/${{ env.VROOMVER }}.tar.gz - tar -zvxf /tmp/${{ env.VROOMVER }}.tar.gz -C ~/ - cd ~/vroom-${{ env.VROOMVER }}/src + git clone --depth 1 --branch v${{ env.VROOMVER }} https://github.com/VROOM-Project/vroom ~/vroom-${{ env.VROOMVER }} - # Create object file with position independent code using -fPIC flag - sed -i 's/CXXFLAGS = /CXXFLAGS = -fPIC /' makefile + # init the required submodules + cd ~/vroom-${{ env.VROOMVER }}/ + git submodule update --init + # Using "shared" target for creating Position Independent Code, disabling use of routing cd ~/vroom-${{ env.VROOMVER }}/src - make + USE_ROUTING=false make shared - name: Configure run: | diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 490bbe12a..fa7150daa 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -1,13 +1,7 @@ name: Build for macOS on: - push: - branches-ignore: - - 'translations_*' - tags: [] - pull_request: - paths-ignore: - - '**.po' + workflow_dispatch: # TODO: Fix the macOS build for compiling and building VROOM with vrprouting. jobs: @@ -27,11 +21,11 @@ jobs: run: | brew install openssl asio glpk - - name: Build VROOM v1.11.0 + - name: Build VROOM v1.12.0 run: | - wget https://github.com/VROOM-Project/vroom/archive/refs/tags/v1.11.0.tar.gz - tar -zvxf v1.11.0.tar.gz - cd vroom-1.11.0/src + wget https://github.com/VROOM-Project/vroom/archive/refs/tags/v1.12.0.tar.gz + tar -zvxf v1.12.0.tar.gz + cd vroom-1.12.0/src # Source: https://github.com/VROOM-Project/vroom/issues/378 ln -s /usr/local/opt/openssl/include/openssl /usr/local/include diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 828a00df0..acda56b7a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,7 @@ name: Release on: - push: - tags: - - 'v*.*.*' + workflow_dispatch: jobs: @@ -29,7 +27,7 @@ jobs: echo "PGPORT=5432" >> $GITHUB_ENV echo "PGIS=3" >> $GITHUB_ENV echo "PROJECT_VERSION=${PROJECT_VERSION}" >> $GITHUB_ENV - echo "VROOMVER=1.11.0" >> $GITHUB_ENV + echo "VROOMVER=1.12.0" >> $GITHUB_ENV - name: Verify Tag Name run: | @@ -92,15 +90,15 @@ jobs: - name: Build VROOM if: steps.cache-vroom.outputs.cache-hit != 'true' run: | - wget https://github.com/VROOM-Project/vroom/archive/refs/tags/v${{ env.VROOMVER }}.tar.gz -O /tmp/${{ env.VROOMVER }}.tar.gz - tar -zvxf /tmp/${{ env.VROOMVER }}.tar.gz -C ~/ - cd ~/vroom-${{ env.VROOMVER }}/src + git clone --depth 1 --branch v${{ env.VROOMVER }} https://github.com/VROOM-Project/vroom ~/vroom-${{ env.VROOMVER }} - # Create object file with position independent code using -fPIC flag - sed -i 's/CXXFLAGS = /CXXFLAGS = -fPIC /' makefile + # init the required submodules + cd ~/vroom-${{ env.VROOMVER }}/ + git submodule update --init + # Using "shared" target for creating Position Independent Code, disabling use of routing cd ~/vroom-${{ env.VROOMVER }}/src - make + USE_ROUTING=false make shared - name: Configure run: | diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 70986144d..429200c02 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -37,7 +37,7 @@ jobs: PGP=5433 if [ "${{ matrix.psql }}" == "${pgver}" ]; then PGP=5432; fi echo "PGPORT=${PGP}" >> $GITHUB_ENV - echo "VROOMVER=1.11.0" >> $GITHUB_ENV + echo "VROOMVER=1.12.0" >> $GITHUB_ENV - name: Add PostgreSQL APT repository run: | @@ -57,7 +57,12 @@ jobs: postgresql-${{ matrix.psql }}-postgis-${{ matrix.postgis }} \ postgresql-${{ matrix.psql }}-postgis-${{ matrix.postgis }}-scripts \ postgresql-${{ matrix.psql }}-pgrouting \ - postgresql-server-dev-${{ matrix.psql }} + postgresql-server-dev-${{ matrix.psql }} \ + postgresql-plpython3-${{ matrix.psql }} + + - name: Install Google OR-Tools dependencies + run: | + sudo pip install --root=/ ortools - name: Install VROOM dependencies run: | @@ -76,15 +81,15 @@ jobs: - name: Build VROOM if: steps.cache-vroom.outputs.cache-hit != 'true' run: | - wget https://github.com/VROOM-Project/vroom/archive/refs/tags/v${{ env.VROOMVER }}.tar.gz -O /tmp/${{ env.VROOMVER }}.tar.gz - tar -zvxf /tmp/${{ env.VROOMVER }}.tar.gz -C ~/ - cd ~/vroom-${{ env.VROOMVER }}/src + git clone --depth 1 --branch v${{ env.VROOMVER }} https://github.com/VROOM-Project/vroom ~/vroom-${{ env.VROOMVER }} - # Create object file with position independent code using -fPIC flag - sed -i 's/CXXFLAGS = /CXXFLAGS = -fPIC /' makefile + # init the required submodules + cd ~/vroom-${{ env.VROOMVER }}/ + git submodule update --init + # Using "shared" target for creating Position Independent Code, disabling use of routing cd ~/vroom-${{ env.VROOMVER }}/src - make + USE_ROUTING=false make shared - name: Configure run: | diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index d8fd1da37..40761c069 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -1,9 +1,7 @@ name: Build for Windows on: - push: - branches-ignore: - - '**' + workflow_dispatch: jobs: build: diff --git a/CMakeLists.txt b/CMakeLists.txt index 4475bd0ba..698de6344 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,13 +17,14 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") #--------------------------------------------- #--------------------------------------------- -project(VRPROUTING VERSION 0.3.0 +project(VRPROUTING VERSION 0.4.0 LANGUAGES C CXX ) set(PROJECT_VERSION_DEV "") string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER) -set(MINORS 0.3 0.2 0.1) +set(MINORS 0.4 0.3 0.2 0.1) set(OLD_SIGNATURES + 0.3.0 0.2.0 0.1.0 ) @@ -53,7 +54,7 @@ set(DOXYGEN_MINIMUM_VERSION "1.7") set(SPHINX_MINIMUM_VERSION "1.8") set(POSTGRESQL_MINIMUM_VERSION "12.0") set(BOOST_MINIMUM_VERSION "1.65.0") -set(VROOM_MINIMUM_VERSION "1.11.0") +set(VROOM_MINIMUM_VERSION "1.12.0") message(STATUS "DOXYGEN_MINIMUM_VERSION=${DOXYGEN_MINIMUM_VERSION}") message(STATUS "SPHINX_MINIMUM_VERSION=${SPHINX_MINIMUM_VERSION}") diff --git a/NEWS b/NEWS index d181ba574..dfce541cd 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,17 @@ +v0.4.0 Release Notes +******************************************************************************* + +To see all issues & pull requests closed by this release see the [Git closed milestone for 0.4.0](https://github.com/pgRouting/vrprouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%200.4.0%22) on Github. + +**Added support for VROOM 1.12.0 ([#34](https://github.com/pgRouting/vrprouting/issues/34))** + +- No visible changes on user side with respect to signatures. +- Adjusted to VROOM v1.12.0 due to internal breaking changes: + + - Made changes according to new vroom::Input signature. + - CI changes to compile without routing support, with Position Independent Code. + v0.3.0 Release Notes ******************************************************************************* @@ -19,6 +32,7 @@ To see all issues & pull requests closed by this release see the [Git closed mil - Added setup time in jobs and shipments to refine service time modeling. - Added support for custom cost matrices, along with the duration matrix. + - Using start_id, end_id, duration, cost as matrix table columns. - Added timeout and exploration_level parameters to vroom-category functions. - Added max_tasks column in vehicles. diff --git a/README.md b/README.md index 3858aff88..bea6efab6 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Status of the project can be found [here](https://github.com/pgRouting/vrproutin ## INTRODUCTION vrpRouting extends the pgRouting/PostGIS/PostgreSQL geospatial database to provide algorithms for Vehicle Routing Problems. -It requires VROOM as a dependency for building and computing the VRP solution. This release is compatible with VROOM version 1.11.0 +It requires VROOM as a dependency for building and computing the VRP solution. This release is compatible with VROOM version 1.12.0 This library is under development and currently contains the following functions: @@ -50,7 +50,7 @@ Building requirements * The Boost Graph Library (BGL) >= 1.65 * CMake >= 3.12 * Sphinx > 4.0.0 -* VROOM >= 1.11.0 +* VROOM >= 1.12.0 User's requirements -------------------- diff --git a/configuration.conf b/configuration.conf index 9e051b19c..4ee413dba 100644 --- a/configuration.conf +++ b/configuration.conf @@ -28,3 +28,4 @@ simulation | N | Y | N optimizers | Y | N | N initialsol | Y | N | N vroom | Y | Y | Y +or_tools | N | Y | Y diff --git a/doc/conf.py.in b/doc/conf.py.in index ecfa919cb..047ac0eda 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -315,22 +315,9 @@ pdf_style_path = ['.', '_styles'] linkcheck_ignore = [ # might not exist yet (we are generating it!) r"https://gis.stackexchange.com/", - "https://vrp.pgrouting.org/v0/en/pgr-category.html", - "https://vrp.pgrouting.org/latest/en/pgr-category.html", - "https://vrp.pgrouting.org/v0/en/vroom-category.html", - "https://vrp.pgrouting.org/latest/en/vroom-category.html", - "https://vrp.pgrouting.org/v0/en/vrp_vroom.html", - "https://vrp.pgrouting.org/latest/en/vrp_vroom.html", - "https://vrp.pgrouting.org/v0/en/vrp_vroomJobs.html", - "https://vrp.pgrouting.org/latest/en/vrp_vroomJobs.html", - "https://vrp.pgrouting.org/v0/en/vrp_vroomShipments.html", - "https://vrp.pgrouting.org/latest/en/vrp_vroomShipments.html", - "https://vrp.pgrouting.org/v0/en/vrp_vroomPlain.html", - "https://vrp.pgrouting.org/latest/en/vrp_vroomPlain.html", - "https://vrp.pgrouting.org/v0/en/vrp_vroomJobsPlain.html", - "https://vrp.pgrouting.org/latest/en/vrp_vroomJobsPlain.html", - "https://vrp.pgrouting.org/v0/en/vrp_vroomShipmentsPlain.html", - "https://vrp.pgrouting.org/latest/en/vrp_vroomShipmentsPlain.html", + + # FIXME: tmp disable as giving 443 Http Error + "https://www.leopark.mx", # (see: https://github.com/sphinx-doc/sphinx/issues/7388) r"https://github.com/pgRouting/vrprouting/", # limit only vrprouting diff --git a/doc/general/CMakeLists.txt b/doc/general/CMakeLists.txt index be8954041..3be8e26e2 100644 --- a/doc/general/CMakeLists.txt +++ b/doc/general/CMakeLists.txt @@ -12,6 +12,7 @@ SET(LOCAL_FILES support.rst pgr-category.rst vroom-category.rst + or_tools-category.rst ) foreach (f ${LOCAL_FILES}) diff --git a/doc/general/experimental.rst b/doc/general/experimental.rst index 0bd4a3aee..b1070840c 100644 --- a/doc/general/experimental.rst +++ b/doc/general/experimental.rst @@ -52,6 +52,7 @@ Experimental Functions pgr-category vroom-category + or_tools-category .. rubric:: See Also diff --git a/doc/general/installation.rst b/doc/general/installation.rst index b156877a0..5fe2a5d0e 100644 --- a/doc/general/installation.rst +++ b/doc/general/installation.rst @@ -171,14 +171,15 @@ Build VROOM v${VROOM_MINIMUM_VERSION} .. code-block:: none - wget https://github.com/VROOM-Project/vroom/archive/refs/tags/v${VROOM_MINIMUM_VERSION}.tar.gz - tar -zvxf v${VROOM_MINIMUM_VERSION}.tar.gz - cd vroom-${VROOM_MINIMUM_VERSION}/src + git clone --depth 1 --branch v${VROOM_MINIMUM_VERSION} https://github.com/VROOM-Project/vroom ~/vroom-${VROOM_MINIMUM_VERSION} - # Create object file with position independent code using -fPIC flag - sed -i 's/CXXFLAGS = /CXXFLAGS = -fPIC /' makefile + # init the required submodules + cd ~/vroom-${VROOM_MINIMUM_VERSION}/ + git submodule update --init - make + # Using "shared" target for creating Position Independent Code, disabling use of routing + cd ~/vroom-${VROOM_MINIMUM_VERSION}/src + USE_ROUTING=false make shared .. rubric:: Optional dependencies diff --git a/doc/general/introduction.rst b/doc/general/introduction.rst index e5e30f4f3..905710f5b 100644 --- a/doc/general/introduction.rst +++ b/doc/general/introduction.rst @@ -60,6 +60,10 @@ Individuals (in alphabetical order) - Adding new experimental VROOM category functions: vrp_vroom, vrp_vroomJobs, vrp_vroomShipments. +- Manas Sivakumar + + - Adding Google Or tools functionality to vrprouting + - Joseph Percival - Optimized and added several VRP functions, including: tabu, pickDeliver, pickDeliver_driver, and many others. @@ -94,6 +98,7 @@ Individuals (in alphabetical order) `Daniel Kastl `__ `Joseph Percival `__ `Vicky Vergara `__ +`Manas Sivakumar `__ Corporate Sponsors (in alphabetical order) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/doc/general/or_tools-category.rst b/doc/general/or_tools-category.rst new file mode 100644 index 000000000..a588022b3 --- /dev/null +++ b/doc/general/or_tools-category.rst @@ -0,0 +1,90 @@ +.. + **************************************************************************** + vrpRouting Manual + Copyright(c) vrpRouting Contributors + + This documentation is licensed under a Creative Commons Attribution-Share + Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ + **************************************************************************** + +| + +* `Documentation `__ → `vrpRouting v0 `__ +* Supported Versions + `Latest `__ + (`v0 `__) + + +OR-Tools - Category (Experimental) +=============================================================================== + +.. include:: experimental.rst + :start-after: begin-warn-expr + :end-before: end-warn-expr + + +.. contents:: + +.. rubric:: Functions + +.. toctree:: + :maxdepth: 1 + + knapsack + multiple_knapsack + bin_packing + + +Synopsis +------------------------------------------------------------------------------- + +OR-Tools is an open source software suite for optimization, tuned for tackling +the world's toughest problems in vehicle routing, flows, integer and linear +programming, and constraint programming. + +OR-Tools can solve + +- VR (Vehicle Routing) +- Scheduling +- Bin Packing + +Currently only Bin Packing problems can be solved with OR-Tools in vrpRouting. + +Terminologies +............................................................................... + +- **weight**: For each item, a positive integer weight is associated with it. +- **cost**: For each item, a positive integer cost(value) is associated with it. +- **capacity**: Maximum storage capacity of a knapsack or a bin. + +Inner Queries +------------------------------------------------------------------------------- + +Weights_Costs SQL +............................................................................... + +.. include:: ../../sql/or_tools/multiple_knapsack.sql + :start-after: Weights_Costs start + :end-before: Weights_Costs end + +Weights SQL +............................................................................... + +.. include:: ../../sql/or_tools/bin_packing.sql + :start-after: Weights start + :end-before: Weights end + +See Also +------------------------------------------------------------------------------- + +.. see_also_start + +* `Wikipedia: Bin Packing problems `__ +* `OR-Tools: Google OR-Tools `__ + +.. see_also_end + +.. rubric:: Indices and tables + +* :ref:`genindex` +* :ref:`search` diff --git a/doc/general/release_notes.rst b/doc/general/release_notes.rst index 9499dca0a..f49127d56 100644 --- a/doc/general/release_notes.rst +++ b/doc/general/release_notes.rst @@ -22,6 +22,19 @@ To see the full list of changes check the list of `Git commits `_ on Github. + +.. rubric:: Added support for VROOM 1.12.0 (`#34 `_) + +- No visible changes on user side with respect to signatures. +- Adjusted to VROOM v1.12.0 due to internal breaking changes: + + - Made changes according to new vroom::Input signature. + - CI changes to compile without routing support, with Position Independent Code. + v0.3.0 Release Notes ******************************************************************************* @@ -42,6 +55,7 @@ To see all issues & pull requests closed by this release see the `Git closed mil - Added setup time in jobs and shipments to refine service time modeling. - Added support for custom cost matrices, along with the duration matrix. + - Using start_id, end_id, duration, cost as matrix table columns. - Added timeout and exploration_level parameters to vroom-category functions. - Added max_tasks column in vehicles. diff --git a/doc/or_tools/CMakeLists.txt b/doc/or_tools/CMakeLists.txt new file mode 100644 index 000000000..187513ed0 --- /dev/null +++ b/doc/or_tools/CMakeLists.txt @@ -0,0 +1,13 @@ +SET(LOCAL_FILES + knapsack.rst + multiple_knapsack.rst + bin_packing.rst + ) + +foreach (f ${LOCAL_FILES}) + configure_file(${f} "${PGR_DOCUMENTATION_SOURCE_DIR}/${f}") + list(APPEND LOCAL_DOC_FILES ${PGR_DOCUMENTATION_SOURCE_DIR}/${f}) +endforeach() + +set(PROJECT_DOC_FILES ${PROJECT_DOC_FILES} ${LOCAL_DOC_FILES} PARENT_SCOPE) +set(PROJECT_IMG_FILES ${PROJECT_IMG_FILES} PARENT_SCOPE) \ No newline at end of file diff --git a/doc/or_tools/bin_packing.rst b/doc/or_tools/bin_packing.rst new file mode 100644 index 000000000..4af3c4d25 --- /dev/null +++ b/doc/or_tools/bin_packing.rst @@ -0,0 +1,100 @@ +.. + **************************************************************************** + vrpRouting Manual + Copyright(c) vrpRouting Contributors + + This documentation is licensed under a Creative Commons Attribution-Share + Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ + **************************************************************************** + +| + + +* `Documentation `__ → `vrpRouting v0 `__ +* Supported Versions + `Latest `__ + (`v0 `__) + +vrp_bin_packing - Experimental +=============================================================================== + +.. include:: experimental.rst + :start-after: begin-warn-expr + :end-before: end-warn-expr + +.. rubric:: Availability + +Version 0.4.0 + +* New **experimental** function + + * vrp_knapsack + + + +Description +------------------------------------------------------------------------------- + +The bin packing problem is an optimization problem, in which +items of different sizes must be packed into a finite number of bins or containers, +each of a fixed given capacity, in a way that minimizes the number of bins used. +The problem has many applications, such as filling up containers, loading trucks with weight capacity constraints, +creating file backups in media and technology mapping in FPGA semiconductor chip design. + + +Signatures +------------------------------------------------------------------------------- + +.. include:: ../../sql/or_tools/bin_packing.sql + :start-after: signature start + :end-before: signature end + +Parameters +------------------------------------------------------------------------------- + +.. include:: ../../sql/or_tools/bin_packing.sql + :start-after: parameters start + :end-before: parameters end + +Optional Parameters +............................................................................... + +.. include:: ../../sql/or_tools/bin_packing.sql + :start-after: optional parameters start + :end-before: optional parameters end + +Inner Queries +------------------------------------------------------------------------------- + +Weights SQL +............................................................................... + +.. include:: ../../sql/or_tools/bin_packing.sql + :start-after: Weights start + :end-before: Weights end + +Result Columns +------------------------------------------------------------------------------- + +.. include:: ../../sql/or_tools/bin_packing.sql + :start-after: result start + :end-before: result end + +Example +------------------------------------------------------------------------------- + +.. literalinclude:: doc-vrp_bin_packing.queries + :start-after: -- example_start + :end-before: -- example_end + +See Also +------------------------------------------------------------------------------- + +.. include:: or_tools-category.rst + :start-after: see_also_start + :end-before: see_also_end + +.. rubric:: Indices and tables + +* :ref:`genindex` +* :ref:`search` \ No newline at end of file diff --git a/doc/or_tools/knapsack.rst b/doc/or_tools/knapsack.rst new file mode 100644 index 000000000..24025cc28 --- /dev/null +++ b/doc/or_tools/knapsack.rst @@ -0,0 +1,98 @@ +.. + **************************************************************************** + vrpRouting Manual + Copyright(c) vrpRouting Contributors + + This documentation is licensed under a Creative Commons Attribution-Share + Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ + **************************************************************************** + + +| + +* `Documentation `__ → `vrpRouting v0 `__ +* Supported Versions + `Latest `__ + (`v0 `__) + +vrp_knapsack - Experimental +=============================================================================== + +.. include:: experimental.rst + :start-after: begin-warn-expr + :end-before: end-warn-expr + +.. rubric:: Availability + +Version 0.4.0 + +* New **experimental** function + + * vrp_knapsack + + + +Description +------------------------------------------------------------------------------- + +The knapsack problem is a problem in combinatorial optimization: +Given a set of items, each with a weight and a value, +Determine the number of each item to include in a collection +so that the total weight is less than or equal to a given limit and the total value is as large as possible + +Signatures +------------------------------------------------------------------------------- + +.. include:: ../../sql/or_tools/knapsack.sql + :start-after: signature start + :end-before: signature end + +Parameters +------------------------------------------------------------------------------- + +.. include:: ../../sql/or_tools/knapsack.sql + :start-after: parameters start + :end-before: parameters end + +Optional Parameters +............................................................................... + +.. include:: ../../sql/or_tools/knapsack.sql + :start-after: optional parameters start + :end-before: optional parameters end + +Inner Queries +------------------------------------------------------------------------------- + +Weights_Costs SQL +............................................................................... + +.. include:: ../../sql/or_tools/knapsack.sql + :start-after: Weights_Costs start + :end-before: Weights_Costs end + +Result Columns +------------------------------------------------------------------------------- + +.. include:: ../../sql/or_tools/knapsack.sql + :start-after: result start + :end-before: result end + +Example +------------------------------------------------------------------------------- + +.. literalinclude:: doc-vrp_knapsack.queries + :start-after: -- example_start + :end-before: -- example_end + +See Also +------------------------------------------------------------------------------- + +.. include:: or_tools-category.rst + :start-after: see_also_start + :end-before: see_also_end + +.. rubric:: Indices and tables + +* :ref:`genindex` +* :ref:`search` \ No newline at end of file diff --git a/doc/or_tools/multiple_knapsack.rst b/doc/or_tools/multiple_knapsack.rst new file mode 100644 index 000000000..0c8b2b934 --- /dev/null +++ b/doc/or_tools/multiple_knapsack.rst @@ -0,0 +1,97 @@ +.. + **************************************************************************** + vrpRouting Manual + Copyright(c) vrpRouting Contributors + This documentation is licensed under a Creative Commons Attribution-Share + Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ + **************************************************************************** + + +| + +* `Documentation `__ → `vrpRouting v0 `__ +* Supported Versions + `Latest `__ + (`v0 `__) + +vrp_multiple_knapsack - Experimental +=============================================================================== + +.. include:: experimental.rst + :start-after: begin-warn-expr + :end-before: end-warn-expr + +.. rubric:: Availability + +Version 0.4.0 + +* New **experimental** function + + * vrp_knapsack + + + +Description +------------------------------------------------------------------------------- + +The multiple knapsack problem is a problem in combinatorial optimization: +it is a more general verison of the classic knapsack problem where instead of a +single knapsack, you will be given multiple knapsacks and your goal is maximise the total +value of packed items in all knapsacks. + +Signatures +------------------------------------------------------------------------------- + +.. include:: ../../sql/or_tools/multiple_knapsack.sql + :start-after: signature start + :end-before: signature end + +Parameters +------------------------------------------------------------------------------- + +.. include:: ../../sql/or_tools/multiple_knapsack.sql + :start-after: parameters start + :end-before: parameters end + +Optional Parameters +............................................................................... + +.. include:: ../../sql/or_tools/multiple_knapsack.sql + :start-after: optional parameters start + :end-before: optional parameters end + +Inner Queries +------------------------------------------------------------------------------- + +Weights_Costs SQL +............................................................................... + +.. include:: ../../sql/or_tools/multiple_knapsack.sql + :start-after: Weights_Costs start + :end-before: Weights_Costs end + +Result Columns +------------------------------------------------------------------------------- + +.. include:: ../../sql/or_tools/multiple_knapsack.sql + :start-after: result start + :end-before: result end + +Example +------------------------------------------------------------------------------- + +.. literalinclude:: doc-vrp_multiple_knapsack.queries + :start-after: -- example_start + :end-before: -- example_end + +See Also +------------------------------------------------------------------------------- + +.. include:: or_tools-category.rst + :start-after: see_also_start + :end-before: see_also_end + +.. rubric:: Indices and tables + +* :ref:`genindex` +* :ref:`search` \ No newline at end of file diff --git a/docqueries/or_tools/CMakeLists.txt b/docqueries/or_tools/CMakeLists.txt new file mode 100644 index 000000000..4b4d6c593 --- /dev/null +++ b/docqueries/or_tools/CMakeLists.txt @@ -0,0 +1,11 @@ +SET(LOCAL_FILES + doc-vrp_knapsack + doc-vrp_multiple_knapsack + doc-vrp_bin_packing + ) + +foreach (f ${LOCAL_FILES}) + configure_file("${f}.result" "${PGR_DOCUMENTATION_SOURCE_DIR}/${f}.queries") + list(APPEND LOCAL_DOC_FILES "${PGR_DOCUMENTATION_SOURCE_DIR}/${f}.queries") +endforeach() +set(PROJECT_DOC_FILES ${PROJECT_DOC_FILES} ${LOCAL_DOC_FILES} PARENT_SCOPE) \ No newline at end of file diff --git a/docqueries/or_tools/doc-vrp_bin_packing.result b/docqueries/or_tools/doc-vrp_bin_packing.result new file mode 100644 index 000000000..d68283190 --- /dev/null +++ b/docqueries/or_tools/doc-vrp_bin_packing.result @@ -0,0 +1,53 @@ +BEGIN; +BEGIN +SET client_min_messages TO NOTICE; +SET +DROP TABLE IF EXISTS bin_packing_query CASCADE; +NOTICE: table "bin_packing_query" does not exist, skipping +DROP TABLE +CREATE TABLE bin_packing_query( + id INTEGER, + weight INTEGER); +CREATE TABLE +INSERT INTO bin_packing_query (id, weight) +VALUES +(1, 48), (2, 30), (3, 19), (4, 36), (5, 36), (6, 27), (7, 42), (8, 42), (9, 36), (10, 24), (11, 30); +INSERT 0 11 +/* -- example_start */ +SELECT * +FROM bin_packing_query; + id | weight +----+-------- + 1 | 48 + 2 | 30 + 3 | 19 + 4 | 36 + 5 | 36 + 6 | 27 + 7 | 42 + 8 | 42 + 9 | 36 + 10 | 24 + 11 | 30 +(11 rows) + +SELECT * +FROM vrp_bin_packing('SELECT id, weight FROM bin_packing_query', 100); + bin_number | item_id +------------+--------- + 1 | 1 + 1 | 2 + 1 | 3 + 2 | 4 + 2 | 5 + 2 | 6 + 3 | 7 + 3 | 8 + 4 | 9 + 4 | 10 + 4 | 11 +(11 rows) + +/* -- example_end */ +ROLLBACK; +ROLLBACK \ No newline at end of file diff --git a/docqueries/or_tools/doc-vrp_bin_packing.test.sql b/docqueries/or_tools/doc-vrp_bin_packing.test.sql new file mode 100644 index 000000000..f4b1e73a4 --- /dev/null +++ b/docqueries/or_tools/doc-vrp_bin_packing.test.sql @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS bin_packing_query CASCADE; + +CREATE TABLE bin_packing_query( + id INTEGER, + weight INTEGER); + +INSERT INTO bin_packing_query (id, weight) +VALUES +(1, 48), (2, 30), (3, 19), (4, 36), (5, 36), (6, 27), (7, 42), (8, 42), (9, 36), (10, 24), (11, 30); + +/* -- example_start */ +SELECT * +FROM bin_packing_query; + +SELECT * +FROM vrp_bin_packing('SELECT id, weight FROM bin_packing_query', 100); +/* -- example_end */ \ No newline at end of file diff --git a/docqueries/or_tools/doc-vrp_knapsack.result b/docqueries/or_tools/doc-vrp_knapsack.result new file mode 100644 index 000000000..c45804235 --- /dev/null +++ b/docqueries/or_tools/doc-vrp_knapsack.result @@ -0,0 +1,45 @@ +BEGIN; +BEGIN +SET client_min_messages TO NOTICE; +SET +DROP TABLE IF EXISTS knapsack_query; +NOTICE: table "knapsack_query" does not exist, skipping +DROP TABLE +CREATE TABLE knapsack_query( + id INTEGER, + weight INTEGER, + cost INTEGER); +CREATE TABLE +INSERT INTO knapsack_query(id, weight, cost) +VALUES +(1, 12, 4), +(2, 2, 2), +(3, 1, 1), +(4, 4, 10), +(5, 1, 2); +INSERT 0 5 +/* -- example_start */ +SELECT * +FROM knapsack_query; + id | weight | cost +----+--------+------ + 1 | 12 | 4 + 2 | 2 | 2 + 3 | 1 | 1 + 4 | 4 | 10 + 5 | 1 | 2 +(5 rows) + +SELECT * +FROM vrp_knapsack($$SELECT * FROM knapsack_query$$, 15); + item_id +--------- + 2 + 3 + 4 + 5 +(4 rows) + +/* -- example_end */ +ROLLBACK; +ROLLBACK \ No newline at end of file diff --git a/docqueries/or_tools/doc-vrp_knapsack.test.sql b/docqueries/or_tools/doc-vrp_knapsack.test.sql new file mode 100644 index 000000000..e804700d2 --- /dev/null +++ b/docqueries/or_tools/doc-vrp_knapsack.test.sql @@ -0,0 +1,21 @@ +DROP TABLE IF EXISTS knapsack_query; +CREATE TABLE knapsack_query( + id INTEGER, + weight INTEGER, + cost INTEGER); + +INSERT INTO knapsack_query(id, weight, cost) +VALUES +(1, 12, 4), +(2, 2, 2), +(3, 1, 1), +(4, 4, 10), +(5, 1, 2); + +/* -- example_start */ +SELECT * +FROM knapsack_query; + +SELECT * +FROM vrp_knapsack($$SELECT * FROM knapsack_query$$, 15); +/* -- example_end */ diff --git a/docqueries/or_tools/doc-vrp_multiple_knapsack.result b/docqueries/or_tools/doc-vrp_multiple_knapsack.result new file mode 100644 index 000000000..df12f2a17 --- /dev/null +++ b/docqueries/or_tools/doc-vrp_multiple_knapsack.result @@ -0,0 +1,73 @@ +BEGIN; +BEGIN +SET client_min_messages TO NOTICE; +SET +DROP TABLE IF EXISTS multiple_knapsack_query CASCADE; +NOTICE: table "multiple_knapsack_query" does not exist, skipping +DROP TABLE +CREATE TABLE multiple_knapsack_query( + id INTEGER, + weight INTEGER, + cost INTEGER); +CREATE TABLE +INSERT INTO multiple_knapsack_query (id, weight, cost) +VALUES +(1, 48, 10), +(2, 30, 30), +(3, 42, 25), +(4, 36, 50), +(5, 36, 35), +(6, 48, 30), +(7, 42, 15), +(8, 42, 40), +(9, 36, 30), +(10, 24, 35), +(11, 30, 45), +(12, 30, 10), +(13, 42, 20), +(14, 36, 30), +(15, 36, 25); +INSERT 0 15 +/* -- example_start */ +SELECT * +FROM multiple_knapsack_query; + id | weight | cost +----+--------+------ + 1 | 48 | 10 + 2 | 30 | 30 + 3 | 42 | 25 + 4 | 36 | 50 + 5 | 36 | 35 + 6 | 48 | 30 + 7 | 42 | 15 + 8 | 42 | 40 + 9 | 36 | 30 + 10 | 24 | 35 + 11 | 30 | 45 + 12 | 30 | 10 + 13 | 42 | 20 + 14 | 36 | 30 + 15 | 36 | 25 +(15 rows) + +SELECT * +FROM vrp_multiple_knapsack('SELECT id, weight, cost FROM multiple_knapsack_query', ARRAY[100,100,100,100,100]); + knapsack_number | item_id +-----------------+--------- + 1 | 2 + 1 | 4 + 1 | 11 + 2 | 3 + 2 | 15 + 3 | 5 + 3 | 10 + 3 | 14 + 4 | 9 + 4 | 13 + 5 | 6 + 5 | 8 +(12 rows) + +/* -- example_end */ +ROLLBACK; +ROLLBACK \ No newline at end of file diff --git a/docqueries/or_tools/doc-vrp_multiple_knapsack.test.sql b/docqueries/or_tools/doc-vrp_multiple_knapsack.test.sql new file mode 100644 index 000000000..63870b265 --- /dev/null +++ b/docqueries/or_tools/doc-vrp_multiple_knapsack.test.sql @@ -0,0 +1,32 @@ +DROP TABLE IF EXISTS multiple_knapsack_query CASCADE; + +CREATE TABLE multiple_knapsack_query( + id INTEGER, + weight INTEGER, + cost INTEGER); + +INSERT INTO multiple_knapsack_query (id, weight, cost) +VALUES +(1, 48, 10), +(2, 30, 30), +(3, 42, 25), +(4, 36, 50), +(5, 36, 35), +(6, 48, 30), +(7, 42, 15), +(8, 42, 40), +(9, 36, 30), +(10, 24, 35), +(11, 30, 45), +(12, 30, 10), +(13, 42, 20), +(14, 36, 30), +(15, 36, 25); + +/* -- example_start */ +SELECT * +FROM multiple_knapsack_query; + +SELECT * +FROM vrp_multiple_knapsack('SELECT id, weight, cost FROM multiple_knapsack_query', ARRAY[100,100,100,100,100]); +/* -- example_end */ \ No newline at end of file diff --git a/docqueries/or_tools/test.conf b/docqueries/or_tools/test.conf new file mode 100644 index 000000000..beaf28f8c --- /dev/null +++ b/docqueries/or_tools/test.conf @@ -0,0 +1,25 @@ +#!/usr/bin/perl -w + +%main::tests = ( + 'any' => { + 'comment' => 'Test for OR-Tools', + 'data' => [], + 'newdb' => 1, + 'tests' => [qw( + doc-vrp_knapsack + doc-vrp_multiple_knapsack + doc-vrp_bin_packing + )], + + 'documentation' => [qw( + doc-vrp_knapsack + doc-vrp_multiple_knapsack + doc-vrp_bin_packing + )], + + 'nottesting' => [qw( + )] + }, +); + +1; \ No newline at end of file diff --git a/docqueries/version/doc-full_version.result b/docqueries/version/doc-full_version.result index c7fddacca..832f17feb 100644 --- a/docqueries/version/doc-full_version.result +++ b/docqueries/version/doc-full_version.result @@ -6,7 +6,7 @@ SET SELECT version, library FROM vrp_full_version(); version | library ---------+------------------ - 0.3.0 | vrprouting-0.3.0 + 0.4.0 | vrprouting-0.4.0 (1 row) /* -- q2 */ diff --git a/docqueries/version/doc-version.result b/docqueries/version/doc-version.result index 1d05839f0..2e641c8a0 100644 --- a/docqueries/version/doc-version.result +++ b/docqueries/version/doc-version.result @@ -6,7 +6,7 @@ SET SELECT vrp_version(); vrp_version ------------- - 0.3.0 + 0.4.0 (1 row) /* -- q2 */ diff --git a/include/cpp_common/vrp_vroom_problem.hpp b/include/cpp_common/vrp_vroom_problem.hpp index b5e9f59b9..907acaf33 100644 --- a/include/cpp_common/vrp_vroom_problem.hpp +++ b/include/cpp_common/vrp_vroom_problem.hpp @@ -601,7 +601,8 @@ class Vrp_vroom_problem : public vrprouting::Pgr_messages { m_vehicles.size() ? static_cast(m_vehicles[0].capacity.size()) : 0; - vroom::Input problem_instance(amount_size); + vroom::Input problem_instance; + problem_instance.set_amount_size(amount_size); for (const auto &vehicle : m_vehicles) { problem_instance.add_vehicle(vehicle); diff --git a/locale/en/LC_MESSAGES/installation.po b/locale/en/LC_MESSAGES/installation.po index b0f080ec1..c7a74384e 100644 --- a/locale/en/LC_MESSAGES/installation.po +++ b/locale/en/LC_MESSAGES/installation.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: vrpRouting v0.0.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-06 20:38+0000\n" +"POT-Creation-Date: 2022-06-02 07:36+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.9.1\n" +"Generated-By: Babel 2.10.1\n" #: ../../build/doc/installation.rst:11 msgid "Installation" @@ -151,7 +151,7 @@ msgid "CMake >= 3.12" msgstr "" #: ../../build/doc/installation.rst:113 -msgid "VROOM >= 1.11.0" +msgid "VROOM >= 1.12.0" msgstr "" #: ../../build/doc/installation.rst:116 @@ -227,201 +227,201 @@ msgid "Install VROOM dependencies" msgstr "" #: ../../build/doc/installation.rst:170 -msgid "Build VROOM v1.11.0" +msgid "Build VROOM v1.12.0" msgstr "" -#: ../../build/doc/installation.rst:184 +#: ../../build/doc/installation.rst:185 msgid "Optional dependencies" msgstr "" -#: ../../build/doc/installation.rst:185 +#: ../../build/doc/installation.rst:186 msgid "For documentation and testing" msgstr "" -#: ../../build/doc/installation.rst:199 +#: ../../build/doc/installation.rst:200 msgid "Configuring" msgstr "" -#: ../../build/doc/installation.rst:201 +#: ../../build/doc/installation.rst:202 msgid "vrpRouting uses the `cmake` system to do the configuration." msgstr "" -#: ../../build/doc/installation.rst:203 +#: ../../build/doc/installation.rst:204 msgid "The build directory is different from the source directory" msgstr "" -#: ../../build/doc/installation.rst:205 +#: ../../build/doc/installation.rst:206 msgid "Create the build directory" msgstr "" -#: ../../build/doc/installation.rst:212 +#: ../../build/doc/installation.rst:213 msgid "Configurable variables" msgstr "" -#: ../../build/doc/installation.rst:215 +#: ../../build/doc/installation.rst:216 msgid "To see the variables that can be configured" msgstr "" -#: ../../build/doc/installation.rst:216 +#: ../../build/doc/installation.rst:217 msgid "" "Here, the variable VROOM_INSTALL_PATH corresponds to the location of the " "root directory of VROOM." msgstr "" -#: ../../build/doc/installation.rst:225 +#: ../../build/doc/installation.rst:226 msgid "Configuring The Documentation" msgstr "" -#: ../../build/doc/installation.rst:226 +#: ../../build/doc/installation.rst:227 msgid "" "Most of the effort of the documentation has being on the HTML files. Some" " variables for the documentation:" msgstr "" -#: ../../build/doc/installation.rst:230 +#: ../../build/doc/installation.rst:231 msgid "Variable" msgstr "" -#: ../../build/doc/installation.rst:230 +#: ../../build/doc/installation.rst:231 msgid "Default" msgstr "" -#: ../../build/doc/installation.rst:230 +#: ../../build/doc/installation.rst:231 msgid "Comment" msgstr "" -#: ../../build/doc/installation.rst:232 +#: ../../build/doc/installation.rst:233 msgid "WITH_DOC" msgstr "" -#: ../../build/doc/installation.rst:232 ../../build/doc/installation.rst:235 -#: ../../build/doc/installation.rst:236 ../../build/doc/installation.rst:237 +#: ../../build/doc/installation.rst:233 ../../build/doc/installation.rst:236 +#: ../../build/doc/installation.rst:237 ../../build/doc/installation.rst:238 msgid "BOOL=OFF" msgstr "" -#: ../../build/doc/installation.rst:232 +#: ../../build/doc/installation.rst:233 msgid "Turn on/off building the documentation" msgstr "" -#: ../../build/doc/installation.rst:233 +#: ../../build/doc/installation.rst:234 msgid "BUILD_HTML" msgstr "" -#: ../../build/doc/installation.rst:233 ../../build/doc/installation.rst:234 +#: ../../build/doc/installation.rst:234 ../../build/doc/installation.rst:235 msgid "BOOL=ON" msgstr "" -#: ../../build/doc/installation.rst:233 +#: ../../build/doc/installation.rst:234 msgid "If ON, turn on/off building HTML for user's documentation" msgstr "" -#: ../../build/doc/installation.rst:234 +#: ../../build/doc/installation.rst:235 msgid "BUILD_DOXY" msgstr "" -#: ../../build/doc/installation.rst:234 +#: ../../build/doc/installation.rst:235 msgid "If ON, turn on/off building HTML for developer's documentation" msgstr "" -#: ../../build/doc/installation.rst:235 +#: ../../build/doc/installation.rst:236 msgid "BUILD_LATEX" msgstr "" -#: ../../build/doc/installation.rst:235 +#: ../../build/doc/installation.rst:236 msgid "If ON, turn on/off building PDF" msgstr "" -#: ../../build/doc/installation.rst:236 +#: ../../build/doc/installation.rst:237 msgid "BUILD_MAN" msgstr "" -#: ../../build/doc/installation.rst:236 +#: ../../build/doc/installation.rst:237 msgid "If ON, turn on/off building MAN pages" msgstr "" -#: ../../build/doc/installation.rst:237 +#: ../../build/doc/installation.rst:238 msgid "DOC_USE_BOOTSTRAP" msgstr "" -#: ../../build/doc/installation.rst:237 +#: ../../build/doc/installation.rst:238 msgid "If ON, use sphinx-bootstrap for HTML pages of the users documentation" msgstr "" -#: ../../build/doc/installation.rst:240 +#: ../../build/doc/installation.rst:241 msgid "Configuring with documentation" msgstr "" -#: ../../build/doc/installation.rst:246 +#: ../../build/doc/installation.rst:247 msgid "Most of the effort of the documentation has being on the html files." msgstr "" -#: ../../build/doc/installation.rst:252 +#: ../../build/doc/installation.rst:253 msgid "Building" msgstr "" -#: ../../build/doc/installation.rst:254 +#: ../../build/doc/installation.rst:255 msgid "Using ``make`` to build the code and the documentation" msgstr "" -#: ../../build/doc/installation.rst:256 +#: ../../build/doc/installation.rst:257 msgid "The following instructions start from *path/to/pgrouting/build*" msgstr "" -#: ../../build/doc/installation.rst:265 +#: ../../build/doc/installation.rst:266 msgid "" "We have tested on several platforms, For installing or reinstalling all " "the steps are needed." msgstr "" -#: ../../build/doc/installation.rst:267 +#: ../../build/doc/installation.rst:268 msgid "The sql signatures are configured and build in the ``cmake`` command." msgstr "" -#: ../../build/doc/installation.rst:271 +#: ../../build/doc/installation.rst:272 msgid "MinGW on Windows" msgstr "" -#: ../../build/doc/installation.rst:282 +#: ../../build/doc/installation.rst:283 msgid "Linux" msgstr "" -#: ../../build/doc/installation.rst:283 +#: ../../build/doc/installation.rst:284 msgid "The following instructions start from *path/to/repository*" msgstr "" -#: ../../build/doc/installation.rst:293 +#: ../../build/doc/installation.rst:294 msgid "When the configuration changes:" msgstr "" -#: ../../build/doc/installation.rst:299 +#: ../../build/doc/installation.rst:300 msgid "and start the build process as mentioned above." msgstr "" -#: ../../build/doc/installation.rst:304 +#: ../../build/doc/installation.rst:305 msgid "Testing" msgstr "" -#: ../../build/doc/installation.rst:306 +#: ../../build/doc/installation.rst:307 msgid "Currently there is no :code:`make test` and testing is done as follows" msgstr "" -#: ../../build/doc/installation.rst:308 +#: ../../build/doc/installation.rst:309 msgid "The following instructions start from *path/to/pgrouting/*" msgstr "" -#: ../../build/doc/installation.rst:318 +#: ../../build/doc/installation.rst:319 msgid "See Also" msgstr "" -#: ../../build/doc/installation.rst:321 +#: ../../build/doc/installation.rst:322 msgid "Indices and tables" msgstr "" -#: ../../build/doc/installation.rst:322 +#: ../../build/doc/installation.rst:323 msgid ":ref:`genindex`" msgstr "" -#: ../../build/doc/installation.rst:323 +#: ../../build/doc/installation.rst:324 msgid ":ref:`search`" msgstr "" diff --git a/locale/en/LC_MESSAGES/release_notes.po b/locale/en/LC_MESSAGES/release_notes.po index 8c2defd13..27011ed76 100644 --- a/locale/en/LC_MESSAGES/release_notes.po +++ b/locale/en/LC_MESSAGES/release_notes.po @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: vrpRouting v0.0.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-23 17:37+0000\n" +"POT-Creation-Date: 2022-06-02 07:36+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.9.1\n" +"Generated-By: Babel 2.10.1\n" #: ../../build/doc/release_notes.rst:12 msgid "" @@ -45,97 +45,136 @@ msgid "Contents" msgstr "" #: ../../build/doc/release_notes.rst:26 -msgid "v0.3.0 Release Notes" +msgid "v0.4.0 Release Notes" msgstr "" #: ../../build/doc/release_notes.rst:28 #, python-format msgid "" "To see all issues & pull requests closed by this release see the `Git " +"closed milestone for 0.4.0 " +"`_" +" on Github." +msgstr "" + +#: ../../build/doc/release_notes.rst:31 +msgid "" +"Added support for VROOM 1.12.0 (`#34 " +"`_)" +msgstr "" + +#: ../../build/doc/release_notes.rst:32 +msgid "No visible changes on user side with respect to signatures." +msgstr "" + +#: ../../build/doc/release_notes.rst:33 +msgid "Adjusted to VROOM v1.12.0 due to internal breaking changes:" +msgstr "" + +#: ../../build/doc/release_notes.rst:35 +msgid "Made changes according to new vroom::Input signature." +msgstr "" + +#: ../../build/doc/release_notes.rst:36 +msgid "" +"CI changes to compile without routing support, with Position Independent " +"Code." +msgstr "" + +#: ../../build/doc/release_notes.rst:39 +msgid "v0.3.0 Release Notes" +msgstr "" + +#: ../../build/doc/release_notes.rst:41 +#, python-format +msgid "" +"To see all issues & pull requests closed by this release see the `Git " "closed milestone for 0.3.0 " "`_" " on Github." msgstr "" -#: ../../build/doc/release_notes.rst:31 +#: ../../build/doc/release_notes.rst:44 msgid "Modification of experimental functions" msgstr "" -#: ../../build/doc/release_notes.rst:32 ../../build/doc/release_notes.rst:69 +#: ../../build/doc/release_notes.rst:45 ../../build/doc/release_notes.rst:83 msgid "VROOM" msgstr "" -#: ../../build/doc/release_notes.rst:34 ../../build/doc/release_notes.rst:71 +#: ../../build/doc/release_notes.rst:47 ../../build/doc/release_notes.rst:85 msgid "vrp_vroom" msgstr "" -#: ../../build/doc/release_notes.rst:35 ../../build/doc/release_notes.rst:72 +#: ../../build/doc/release_notes.rst:48 ../../build/doc/release_notes.rst:86 msgid "vrp_vroomJobs" msgstr "" -#: ../../build/doc/release_notes.rst:36 ../../build/doc/release_notes.rst:73 +#: ../../build/doc/release_notes.rst:49 ../../build/doc/release_notes.rst:87 msgid "vrp_vroomShipments" msgstr "" -#: ../../build/doc/release_notes.rst:37 ../../build/doc/release_notes.rst:74 +#: ../../build/doc/release_notes.rst:50 ../../build/doc/release_notes.rst:88 msgid "vrp_vroomPlain" msgstr "" -#: ../../build/doc/release_notes.rst:38 ../../build/doc/release_notes.rst:75 +#: ../../build/doc/release_notes.rst:51 ../../build/doc/release_notes.rst:89 msgid "vrp_vroomJobsPlain" msgstr "" -#: ../../build/doc/release_notes.rst:39 ../../build/doc/release_notes.rst:76 +#: ../../build/doc/release_notes.rst:52 ../../build/doc/release_notes.rst:90 msgid "vrp_vroomShipmentsPlain" msgstr "" -#: ../../build/doc/release_notes.rst:42 +#: ../../build/doc/release_notes.rst:55 msgid "" "Added support for VROOM 1.11.0 (`#24 " "`_)" msgstr "" -#: ../../build/doc/release_notes.rst:43 +#: ../../build/doc/release_notes.rst:56 msgid "Added setup time in jobs and shipments to refine service time modeling." msgstr "" -#: ../../build/doc/release_notes.rst:44 -msgid "" -"Added support for custom cost matrices, along with the duration matrix. -" -" Using start_id, end_id, duration, cost as matrix table columns." +#: ../../build/doc/release_notes.rst:57 +msgid "Added support for custom cost matrices, along with the duration matrix." msgstr "" -#: ../../build/doc/release_notes.rst:46 +#: ../../build/doc/release_notes.rst:59 +msgid "Using start_id, end_id, duration, cost as matrix table columns." +msgstr "" + +#: ../../build/doc/release_notes.rst:60 msgid "" "Added timeout and exploration_level parameters to vroom-category " "functions." msgstr "" -#: ../../build/doc/release_notes.rst:47 +#: ../../build/doc/release_notes.rst:61 msgid "Added max_tasks column in vehicles." msgstr "" -#: ../../build/doc/release_notes.rst:48 +#: ../../build/doc/release_notes.rst:62 msgid "Added tests for empty skills arrays." msgstr "" -#: ../../build/doc/release_notes.rst:49 +#: ../../build/doc/release_notes.rst:63 msgid "Added custom scaling logic for speed_factor." msgstr "" -#: ../../build/doc/release_notes.rst:50 +#: ../../build/doc/release_notes.rst:64 msgid "Modified parameter names to make the naming consistent." msgstr "" -#: ../../build/doc/release_notes.rst:53 +#: ../../build/doc/release_notes.rst:67 msgid "Fixes" msgstr "" -#: ../../build/doc/release_notes.rst:54 +#: ../../build/doc/release_notes.rst:68 msgid "Honor client cancel requests for vroom-category functions." msgstr "" -#: ../../build/doc/release_notes.rst:55 +#: ../../build/doc/release_notes.rst:69 msgid "" "Added more information in the inner query and result columns of VROOM " "category functions (`#26 " @@ -143,59 +182,59 @@ msgid "" "`_):" msgstr "" -#: ../../build/doc/release_notes.rst:58 +#: ../../build/doc/release_notes.rst:72 msgid "Summary row in the output, for each vehicle and for the complete problem." msgstr "" -#: ../../build/doc/release_notes.rst:59 +#: ../../build/doc/release_notes.rst:73 msgid "Uassigned rows in the output with vehicle_id = -1." msgstr "" -#: ../../build/doc/release_notes.rst:60 +#: ../../build/doc/release_notes.rst:74 msgid "" "Modified travel_time result column to return travel time between current " "and last step." msgstr "" -#: ../../build/doc/release_notes.rst:61 +#: ../../build/doc/release_notes.rst:75 msgid "" "Added data jsonb field in jobs, shipments, vehicles, breaks as well as in" " the result columns." msgstr "" -#: ../../build/doc/release_notes.rst:62 +#: ../../build/doc/release_notes.rst:76 msgid "Added departure field and location_id field in the result columns." msgstr "" -#: ../../build/doc/release_notes.rst:65 +#: ../../build/doc/release_notes.rst:79 msgid "v0.2.0 Release Notes" msgstr "" -#: ../../build/doc/release_notes.rst:68 +#: ../../build/doc/release_notes.rst:82 msgid "New experimental functions" msgstr "" -#: ../../build/doc/release_notes.rst:79 +#: ../../build/doc/release_notes.rst:93 msgid "v0.1.0 Release Notes" msgstr "" -#: ../../build/doc/release_notes.rst:82 +#: ../../build/doc/release_notes.rst:96 msgid "Extraction tasks" msgstr "" -#: ../../build/doc/release_notes.rst:83 +#: ../../build/doc/release_notes.rst:97 msgid "Porting pgRouting's VRP functionality" msgstr "" -#: ../../build/doc/release_notes.rst:86 +#: ../../build/doc/release_notes.rst:100 msgid "New official functions" msgstr "" -#: ../../build/doc/release_notes.rst:87 +#: ../../build/doc/release_notes.rst:101 msgid "vrp_version" msgstr "" -#: ../../build/doc/release_notes.rst:88 +#: ../../build/doc/release_notes.rst:102 msgid "vrp_full_version" msgstr "" diff --git a/locale/pot/installation.pot b/locale/pot/installation.pot index 18d96a4fe..c5c39ea87 100644 --- a/locale/pot/installation.pot +++ b/locale/pot/installation.pot @@ -1,14 +1,14 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) vrpRouting Contributors - Version v0.3.0-dev +# Copyright (C) vrpRouting Contributors - Version v0.4.0-dev # This file is distributed under the same license as the vrpRouting package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: vrpRouting v0.3.0-dev\n" +"Project-Id-Version: vrpRouting v0.4.0-dev\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-06 20:38+0000\n" +"POT-Creation-Date: 2022-06-02 07:36+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -133,7 +133,7 @@ msgid "CMake >= 3.12" msgstr "" #: ../../build/doc/installation.rst:113 -msgid "VROOM >= 1.11.0" +msgid "VROOM >= 1.12.0" msgstr "" #: ../../build/doc/installation.rst:116 @@ -209,197 +209,197 @@ msgid "Install VROOM dependencies" msgstr "" #: ../../build/doc/installation.rst:170 -msgid "Build VROOM v1.11.0" +msgid "Build VROOM v1.12.0" msgstr "" -#: ../../build/doc/installation.rst:184 +#: ../../build/doc/installation.rst:185 msgid "Optional dependencies" msgstr "" -#: ../../build/doc/installation.rst:185 +#: ../../build/doc/installation.rst:186 msgid "For documentation and testing" msgstr "" -#: ../../build/doc/installation.rst:199 +#: ../../build/doc/installation.rst:200 msgid "Configuring" msgstr "" -#: ../../build/doc/installation.rst:201 +#: ../../build/doc/installation.rst:202 msgid "vrpRouting uses the `cmake` system to do the configuration." msgstr "" -#: ../../build/doc/installation.rst:203 +#: ../../build/doc/installation.rst:204 msgid "The build directory is different from the source directory" msgstr "" -#: ../../build/doc/installation.rst:205 +#: ../../build/doc/installation.rst:206 msgid "Create the build directory" msgstr "" -#: ../../build/doc/installation.rst:212 +#: ../../build/doc/installation.rst:213 msgid "Configurable variables" msgstr "" -#: ../../build/doc/installation.rst:215 +#: ../../build/doc/installation.rst:216 msgid "To see the variables that can be configured" msgstr "" -#: ../../build/doc/installation.rst:216 +#: ../../build/doc/installation.rst:217 msgid "Here, the variable VROOM_INSTALL_PATH corresponds to the location of the root directory of VROOM." msgstr "" -#: ../../build/doc/installation.rst:225 +#: ../../build/doc/installation.rst:226 msgid "Configuring The Documentation" msgstr "" -#: ../../build/doc/installation.rst:226 +#: ../../build/doc/installation.rst:227 msgid "Most of the effort of the documentation has being on the HTML files. Some variables for the documentation:" msgstr "" -#: ../../build/doc/installation.rst:230 +#: ../../build/doc/installation.rst:231 msgid "Variable" msgstr "" -#: ../../build/doc/installation.rst:230 +#: ../../build/doc/installation.rst:231 msgid "Default" msgstr "" -#: ../../build/doc/installation.rst:230 +#: ../../build/doc/installation.rst:231 msgid "Comment" msgstr "" -#: ../../build/doc/installation.rst:232 +#: ../../build/doc/installation.rst:233 msgid "WITH_DOC" msgstr "" -#: ../../build/doc/installation.rst:232 -#: ../../build/doc/installation.rst:235 +#: ../../build/doc/installation.rst:233 #: ../../build/doc/installation.rst:236 #: ../../build/doc/installation.rst:237 +#: ../../build/doc/installation.rst:238 msgid "BOOL=OFF" msgstr "" -#: ../../build/doc/installation.rst:232 +#: ../../build/doc/installation.rst:233 msgid "Turn on/off building the documentation" msgstr "" -#: ../../build/doc/installation.rst:233 +#: ../../build/doc/installation.rst:234 msgid "BUILD_HTML" msgstr "" -#: ../../build/doc/installation.rst:233 #: ../../build/doc/installation.rst:234 +#: ../../build/doc/installation.rst:235 msgid "BOOL=ON" msgstr "" -#: ../../build/doc/installation.rst:233 +#: ../../build/doc/installation.rst:234 msgid "If ON, turn on/off building HTML for user's documentation" msgstr "" -#: ../../build/doc/installation.rst:234 +#: ../../build/doc/installation.rst:235 msgid "BUILD_DOXY" msgstr "" -#: ../../build/doc/installation.rst:234 +#: ../../build/doc/installation.rst:235 msgid "If ON, turn on/off building HTML for developer's documentation" msgstr "" -#: ../../build/doc/installation.rst:235 +#: ../../build/doc/installation.rst:236 msgid "BUILD_LATEX" msgstr "" -#: ../../build/doc/installation.rst:235 +#: ../../build/doc/installation.rst:236 msgid "If ON, turn on/off building PDF" msgstr "" -#: ../../build/doc/installation.rst:236 +#: ../../build/doc/installation.rst:237 msgid "BUILD_MAN" msgstr "" -#: ../../build/doc/installation.rst:236 +#: ../../build/doc/installation.rst:237 msgid "If ON, turn on/off building MAN pages" msgstr "" -#: ../../build/doc/installation.rst:237 +#: ../../build/doc/installation.rst:238 msgid "DOC_USE_BOOTSTRAP" msgstr "" -#: ../../build/doc/installation.rst:237 +#: ../../build/doc/installation.rst:238 msgid "If ON, use sphinx-bootstrap for HTML pages of the users documentation" msgstr "" -#: ../../build/doc/installation.rst:240 +#: ../../build/doc/installation.rst:241 msgid "Configuring with documentation" msgstr "" -#: ../../build/doc/installation.rst:246 +#: ../../build/doc/installation.rst:247 msgid "Most of the effort of the documentation has being on the html files." msgstr "" -#: ../../build/doc/installation.rst:252 +#: ../../build/doc/installation.rst:253 msgid "Building" msgstr "" -#: ../../build/doc/installation.rst:254 +#: ../../build/doc/installation.rst:255 msgid "Using ``make`` to build the code and the documentation" msgstr "" -#: ../../build/doc/installation.rst:256 +#: ../../build/doc/installation.rst:257 msgid "The following instructions start from *path/to/pgrouting/build*" msgstr "" -#: ../../build/doc/installation.rst:265 +#: ../../build/doc/installation.rst:266 msgid "We have tested on several platforms, For installing or reinstalling all the steps are needed." msgstr "" -#: ../../build/doc/installation.rst:267 +#: ../../build/doc/installation.rst:268 msgid "The sql signatures are configured and build in the ``cmake`` command." msgstr "" -#: ../../build/doc/installation.rst:271 +#: ../../build/doc/installation.rst:272 msgid "MinGW on Windows" msgstr "" -#: ../../build/doc/installation.rst:282 +#: ../../build/doc/installation.rst:283 msgid "Linux" msgstr "" -#: ../../build/doc/installation.rst:283 +#: ../../build/doc/installation.rst:284 msgid "The following instructions start from *path/to/repository*" msgstr "" -#: ../../build/doc/installation.rst:293 +#: ../../build/doc/installation.rst:294 msgid "When the configuration changes:" msgstr "" -#: ../../build/doc/installation.rst:299 +#: ../../build/doc/installation.rst:300 msgid "and start the build process as mentioned above." msgstr "" -#: ../../build/doc/installation.rst:304 +#: ../../build/doc/installation.rst:305 msgid "Testing" msgstr "" -#: ../../build/doc/installation.rst:306 +#: ../../build/doc/installation.rst:307 msgid "Currently there is no :code:`make test` and testing is done as follows" msgstr "" -#: ../../build/doc/installation.rst:308 +#: ../../build/doc/installation.rst:309 msgid "The following instructions start from *path/to/pgrouting/*" msgstr "" -#: ../../build/doc/installation.rst:318 +#: ../../build/doc/installation.rst:319 msgid "See Also" msgstr "" -#: ../../build/doc/installation.rst:321 +#: ../../build/doc/installation.rst:322 msgid "Indices and tables" msgstr "" -#: ../../build/doc/installation.rst:322 +#: ../../build/doc/installation.rst:323 msgid ":ref:`genindex`" msgstr "" -#: ../../build/doc/installation.rst:323 +#: ../../build/doc/installation.rst:324 msgid ":ref:`search`" msgstr "" diff --git a/locale/pot/release_notes.pot b/locale/pot/release_notes.pot index 5e2e8399d..f1a3fa933 100644 --- a/locale/pot/release_notes.pot +++ b/locale/pot/release_notes.pot @@ -1,14 +1,14 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) vrpRouting Contributors - Version v0.3.0-dev +# Copyright (C) vrpRouting Contributors - Version v0.4.0-dev # This file is distributed under the same license as the vrpRouting package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: vrpRouting v0.3.0-dev\n" +"Project-Id-Version: vrpRouting v0.4.0-dev\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-23 17:37+0000\n" +"POT-Creation-Date: 2022-06-02 07:36+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -37,144 +37,176 @@ msgid "Contents" msgstr "" #: ../../build/doc/release_notes.rst:26 -msgid "v0.3.0 Release Notes" +msgid "v0.4.0 Release Notes" msgstr "" #: ../../build/doc/release_notes.rst:28 -msgid "To see all issues & pull requests closed by this release see the `Git closed milestone for 0.3.0 `_ on Github." +msgid "To see all issues & pull requests closed by this release see the `Git closed milestone for 0.4.0 `_ on Github." msgstr "" #: ../../build/doc/release_notes.rst:31 -msgid "Modification of experimental functions" +msgid "Added support for VROOM 1.12.0 (`#34 `_)" msgstr "" #: ../../build/doc/release_notes.rst:32 -#: ../../build/doc/release_notes.rst:69 +msgid "No visible changes on user side with respect to signatures." +msgstr "" + +#: ../../build/doc/release_notes.rst:33 +msgid "Adjusted to VROOM v1.12.0 due to internal breaking changes:" +msgstr "" + +#: ../../build/doc/release_notes.rst:35 +msgid "Made changes according to new vroom::Input signature." +msgstr "" + +#: ../../build/doc/release_notes.rst:36 +msgid "CI changes to compile without routing support, with Position Independent Code." +msgstr "" + +#: ../../build/doc/release_notes.rst:39 +msgid "v0.3.0 Release Notes" +msgstr "" + +#: ../../build/doc/release_notes.rst:41 +msgid "To see all issues & pull requests closed by this release see the `Git closed milestone for 0.3.0 `_ on Github." +msgstr "" + +#: ../../build/doc/release_notes.rst:44 +msgid "Modification of experimental functions" +msgstr "" + +#: ../../build/doc/release_notes.rst:45 +#: ../../build/doc/release_notes.rst:83 msgid "VROOM" msgstr "" -#: ../../build/doc/release_notes.rst:34 -#: ../../build/doc/release_notes.rst:71 +#: ../../build/doc/release_notes.rst:47 +#: ../../build/doc/release_notes.rst:85 msgid "vrp_vroom" msgstr "" -#: ../../build/doc/release_notes.rst:35 -#: ../../build/doc/release_notes.rst:72 +#: ../../build/doc/release_notes.rst:48 +#: ../../build/doc/release_notes.rst:86 msgid "vrp_vroomJobs" msgstr "" -#: ../../build/doc/release_notes.rst:36 -#: ../../build/doc/release_notes.rst:73 +#: ../../build/doc/release_notes.rst:49 +#: ../../build/doc/release_notes.rst:87 msgid "vrp_vroomShipments" msgstr "" -#: ../../build/doc/release_notes.rst:37 -#: ../../build/doc/release_notes.rst:74 +#: ../../build/doc/release_notes.rst:50 +#: ../../build/doc/release_notes.rst:88 msgid "vrp_vroomPlain" msgstr "" -#: ../../build/doc/release_notes.rst:38 -#: ../../build/doc/release_notes.rst:75 +#: ../../build/doc/release_notes.rst:51 +#: ../../build/doc/release_notes.rst:89 msgid "vrp_vroomJobsPlain" msgstr "" -#: ../../build/doc/release_notes.rst:39 -#: ../../build/doc/release_notes.rst:76 +#: ../../build/doc/release_notes.rst:52 +#: ../../build/doc/release_notes.rst:90 msgid "vrp_vroomShipmentsPlain" msgstr "" -#: ../../build/doc/release_notes.rst:42 +#: ../../build/doc/release_notes.rst:55 msgid "Added support for VROOM 1.11.0 (`#24 `_)" msgstr "" -#: ../../build/doc/release_notes.rst:43 +#: ../../build/doc/release_notes.rst:56 msgid "Added setup time in jobs and shipments to refine service time modeling." msgstr "" -#: ../../build/doc/release_notes.rst:44 -msgid "Added support for custom cost matrices, along with the duration matrix. - Using start_id, end_id, duration, cost as matrix table columns." +#: ../../build/doc/release_notes.rst:57 +msgid "Added support for custom cost matrices, along with the duration matrix." msgstr "" -#: ../../build/doc/release_notes.rst:46 +#: ../../build/doc/release_notes.rst:59 +msgid "Using start_id, end_id, duration, cost as matrix table columns." +msgstr "" + +#: ../../build/doc/release_notes.rst:60 msgid "Added timeout and exploration_level parameters to vroom-category functions." msgstr "" -#: ../../build/doc/release_notes.rst:47 +#: ../../build/doc/release_notes.rst:61 msgid "Added max_tasks column in vehicles." msgstr "" -#: ../../build/doc/release_notes.rst:48 +#: ../../build/doc/release_notes.rst:62 msgid "Added tests for empty skills arrays." msgstr "" -#: ../../build/doc/release_notes.rst:49 +#: ../../build/doc/release_notes.rst:63 msgid "Added custom scaling logic for speed_factor." msgstr "" -#: ../../build/doc/release_notes.rst:50 +#: ../../build/doc/release_notes.rst:64 msgid "Modified parameter names to make the naming consistent." msgstr "" -#: ../../build/doc/release_notes.rst:53 +#: ../../build/doc/release_notes.rst:67 msgid "Fixes" msgstr "" -#: ../../build/doc/release_notes.rst:54 +#: ../../build/doc/release_notes.rst:68 msgid "Honor client cancel requests for vroom-category functions." msgstr "" -#: ../../build/doc/release_notes.rst:55 +#: ../../build/doc/release_notes.rst:69 msgid "Added more information in the inner query and result columns of VROOM category functions (`#26 `_, `#27 `_):" msgstr "" -#: ../../build/doc/release_notes.rst:58 +#: ../../build/doc/release_notes.rst:72 msgid "Summary row in the output, for each vehicle and for the complete problem." msgstr "" -#: ../../build/doc/release_notes.rst:59 +#: ../../build/doc/release_notes.rst:73 msgid "Uassigned rows in the output with vehicle_id = -1." msgstr "" -#: ../../build/doc/release_notes.rst:60 +#: ../../build/doc/release_notes.rst:74 msgid "Modified travel_time result column to return travel time between current and last step." msgstr "" -#: ../../build/doc/release_notes.rst:61 +#: ../../build/doc/release_notes.rst:75 msgid "Added data jsonb field in jobs, shipments, vehicles, breaks as well as in the result columns." msgstr "" -#: ../../build/doc/release_notes.rst:62 +#: ../../build/doc/release_notes.rst:76 msgid "Added departure field and location_id field in the result columns." msgstr "" -#: ../../build/doc/release_notes.rst:65 +#: ../../build/doc/release_notes.rst:79 msgid "v0.2.0 Release Notes" msgstr "" -#: ../../build/doc/release_notes.rst:68 +#: ../../build/doc/release_notes.rst:82 msgid "New experimental functions" msgstr "" -#: ../../build/doc/release_notes.rst:79 +#: ../../build/doc/release_notes.rst:93 msgid "v0.1.0 Release Notes" msgstr "" -#: ../../build/doc/release_notes.rst:82 +#: ../../build/doc/release_notes.rst:96 msgid "Extraction tasks" msgstr "" -#: ../../build/doc/release_notes.rst:83 +#: ../../build/doc/release_notes.rst:97 msgid "Porting pgRouting's VRP functionality" msgstr "" -#: ../../build/doc/release_notes.rst:86 +#: ../../build/doc/release_notes.rst:100 msgid "New official functions" msgstr "" -#: ../../build/doc/release_notes.rst:87 +#: ../../build/doc/release_notes.rst:101 msgid "vrp_version" msgstr "" -#: ../../build/doc/release_notes.rst:88 +#: ../../build/doc/release_notes.rst:102 msgid "vrp_full_version" msgstr "" diff --git a/pgtap/or_tools/inner_query.sql b/pgtap/or_tools/inner_query.sql new file mode 100644 index 000000000..646ac3a6e --- /dev/null +++ b/pgtap/or_tools/inner_query.sql @@ -0,0 +1,105 @@ +BEGIN; +SET search_path TO 'ortools', 'public'; + +SELECT CASE WHEN min_version('0.3.0') THEN plan (48) ELSE plan(1) END; + +CREATE OR REPLACE FUNCTION test_value(fn TEXT, inner_query_table TEXT, start_sql TEXT, rest_sql TEXT, params TEXT[], parameter TEXT, accept TEXT[], reject TEXT[]) +RETURNS SETOF TEXT AS +$BODY$ +DECLARE + end_sql TEXT; + query TEXT; + p TEXT; + type_name TEXT; +BEGIN + start_sql = 'SELECT * FROM ' || fn || '(' || start_sql || '$$ SELECT '; + FOREACH p IN ARRAY params + LOOP + IF p = parameter THEN CONTINUE; + END IF; + start_sql = start_sql || p || ', '; + END LOOP; + end_sql = ' FROM ' || inner_query_table || '$$' || rest_sql; + + FOREACH type_name IN ARRAY accept + LOOP + query := start_sql || parameter || '::' || type_name || end_sql; + RETURN query SELECT lives_ok(query); + END LOOP; + + FOREACH type_name IN ARRAY reject + LOOP + query := start_sql || parameter || '::' || type_name || end_sql; + RETURN query SELECT throws_ok(query, 38000); + END LOOP; +END; +$BODY$ LANGUAGE plpgsql; + + +CREATE OR REPLACE FUNCTION test_anyInteger(fn TEXT, inner_query_table TEXT, start_sql TEXT, rest_sql TEXT, params TEXT[], parameter TEXT) +RETURNS SETOF TEXT AS +$BODY$ +DECLARE + accept TEXT[] := ARRAY['SMALLINT', 'INTEGER', 'BIGINT']; + reject TEXT[] := ARRAY['REAL', 'FLOAT8', 'NUMERIC']; +BEGIN + RETURN query SELECT test_value(fn, inner_query_table, start_sql, rest_sql, params, parameter, accept, reject); +END; +$BODY$ LANGUAGE plpgsql; + + +CREATE OR REPLACE FUNCTION inner_query() +RETURNS SETOF TEXT AS +$BODY$ +DECLARE + fn TEXT; + start_sql TEXT; + rest_sql TEXT; + inner_query_table TEXT; + params TEXT[]; +BEGIN + IF NOT min_version('0.3.0') THEN + RETURN QUERY + SELECT skip(1, 'Function is modified on 0.3.0'); + RETURN; + END IF; + + -- vrp_knapsack + fn := 'vrp_knapsack'; + inner_query_table := 'knapsack_data'; + start_sql := ''; + rest_sql := ', 15)'; + params := ARRAY['id', 'weight', 'cost']; + RETURN QUERY SELECT test_anyInteger(fn, inner_query_table, start_sql, rest_sql, params, 'id'); + RETURN QUERY SELECT test_anyInteger(fn, inner_query_table, start_sql, rest_sql, params, 'weight'); + RETURN QUERY SELECT test_anyInteger(fn, inner_query_table, start_sql, rest_sql, params, 'cost'); + + -- vrp_multiple_knapsack + fn := 'vrp_multiple_knapsack'; + inner_query_table := 'multiple_knapsack_data'; + start_sql := ''; + rest_sql := ', ARRAY[100,100,100,100,100])'; + params := ARRAY['id', 'weight', 'cost']; + RETURN QUERY SELECT test_anyInteger(fn, inner_query_table, start_sql, rest_sql, params, 'id'); + RETURN QUERY SELECT test_anyInteger(fn, inner_query_table, start_sql, rest_sql, params, 'weight'); + RETURN QUERY SELECT test_anyInteger(fn, inner_query_table, start_sql, rest_sql, params, 'cost'); + + -- bin_packing + fn := 'vrp_bin_packing'; + inner_query_table := 'bin_packing_data'; + start_sql := ''; + rest_sql := ', 100)'; + params := ARRAY['id', 'weight']; + RETURN QUERY SELECT test_anyInteger(fn, inner_query_table, start_sql, rest_sql, params, 'id'); + RETURN QUERY SELECT test_anyInteger(fn, inner_query_table, start_sql, rest_sql, params, 'weight'); + +END; +$BODY$ +LANGUAGE plpgsql; + +SELECT inner_query(); + + + +SELECT * FROM finish(); +ROLLBACK; diff --git a/pgtap/or_tools/no_crash_test.sql b/pgtap/or_tools/no_crash_test.sql new file mode 100644 index 000000000..4c41e0ca3 --- /dev/null +++ b/pgtap/or_tools/no_crash_test.sql @@ -0,0 +1,80 @@ +BEGIN; +SET search_path TO 'ortools', 'public'; +SET client_min_messages TO ERROR; +SELECT CASE WHEN min_version('0.3.0') THEN plan (18) ELSE plan(1) END; + +CREATE OR REPLACE FUNCTION no_crash() +RETURNS SETOF TEXT AS +$BODY$ +DECLARE +params TEXT[]; +subs TEXT[]; +error_messages TEXT[]; +non_empty_args INTEGER[]; +BEGIN + -- vrp_knapsack + params = ARRAY[ + '$$SELECT * FROM ortools.knapsack_data$$', + 'capacity => 15', + 'max_rows => 100000' + ]::TEXT[]; + subs = ARRAY[ + 'NULL', + 'capacity => NULL', + 'max_rows => NULL' + ]::TEXT[]; + error_messages = ARRAY[ + 38000, + 38000, + '' + ]::TEXT[]; + non_empty_args = ARRAY[0, 1, 2, 3]::INTEGER[]; + + RETURN QUERY SELECT * FROM no_crash_test('vrp_knapsack', params, subs, error_messages, non_empty_args); + + --vrp_multiple_knapsack + params = ARRAY[ + '$$SELECT * FROM ortools.multiple_knapsack_data$$', + 'capacities => ARRAY[100,100,100,100,100]', + 'max_rows => 100000' + ]::TEXT[]; + subs = ARRAY[ + 'NULL', + 'capacities => NULL', + 'max_rows => NULL' + ]::TEXT[]; + error_messages = ARRAY[ + 38000, + 38000, + '' + ]::TEXT[]; + non_empty_args = ARRAY[0, 1, 2, 3]::INTEGER[]; + + RETURN QUERY SELECT * FROM no_crash_test('vrp_multiple_knapsack', params, subs, error_messages, non_empty_args); + + -- bin_packing + params = ARRAY[ + '$$SELECT * FROM ortools.bin_packing_data$$', + 'bin_capacity => 100', + 'max_rows => 100000' + ]::TEXT[]; + subs = ARRAY[ + 'NULL', + 'bin_capacity => NULL', + 'max_rows => NULL' + ]::TEXT[]; + error_messages = ARRAY[ + 38000, + 38000, + '' + ]::TEXT[]; + non_empty_args = ARRAY[0, 1, 2, 3]::INTEGER[]; + + RETURN QUERY SELECT * FROM no_crash_test('vrp_bin_packing', params, subs, error_messages, non_empty_args); +END +$BODY$ +LANGUAGE plpgsql VOLATILE; + +SELECT * FROM no_crash(); + +ROLLBACK; diff --git a/pgtap/or_tools/types_check.sql b/pgtap/or_tools/types_check.sql new file mode 100644 index 000000000..75b0143d2 --- /dev/null +++ b/pgtap/or_tools/types_check.sql @@ -0,0 +1,95 @@ +BEGIN; +SET search_path TO 'ortools', 'public'; + +SELECT CASE WHEN min_version('0.3.0') THEN plan (15) ELSE plan(1) END; + +CREATE OR REPLACE FUNCTION types_check() +RETURNS SETOF TEXT AS +$BODY$ +BEGIN + + IF NOT min_version('0.3.0') THEN + RETURN QUERY + SELECT skip(1, 'Function is modified on 0.3.0'); + RETURN; + END IF; + + -- vrp_knapsack + RETURN QUERY + SELECT has_function('vrp_knapsack'); + RETURN QUERY + SELECT has_function('vrp_knapsack', ARRAY['text', 'integer', 'integer']); + RETURN QUERY + SELECT function_returns('vrp_knapsack', ARRAY['text', 'integer', 'integer'], 'setof integer'); + + -- parameter names + RETURN QUERY + SELECT bag_has( + $$SELECT proargnames from pg_proc where proname = 'vrp_knapsack'$$, + $$SELECT '{"inner_query","capacity","max_rows","item_id"}'::TEXT[]$$ + ); + + -- parameter types + RETURN QUERY + SELECT set_eq( + $$SELECT proallargtypes from pg_proc where proname = 'vrp_knapsack'$$, + $$VALUES + (ARRAY[25,23,23,23]::OID[]) + $$ + ); + + -- vrp_multiple_knapsack + RETURN QUERY + SELECT has_function('vrp_multiple_knapsack'); + RETURN QUERY + SELECT has_function('vrp_multiple_knapsack', ARRAY['text', 'integer[]', 'integer']); + RETURN QUERY + SELECT function_returns('vrp_multiple_knapsack', ARRAY['text', 'integer[]', 'integer'], 'setof record'); + + -- parameter names + RETURN QUERY + SELECT bag_has( + $$SELECT proargnames from pg_proc where proname = 'vrp_multiple_knapsack'$$, + $$SELECT '{"inner_query","capacities","max_rows","knapsack_number","item_id"}'::TEXT[]$$ + ); + + -- parameter types + RETURN QUERY + SELECT set_eq( + $$SELECT proallargtypes from pg_proc where proname = 'vrp_multiple_knapsack'$$, + $$VALUES + (ARRAY[25,1007,23,23,23]::OID[]) + $$ + ); + + -- vrp_bin_packing + RETURN QUERY + SELECT has_function('vrp_bin_packing'); + RETURN QUERY + SELECT has_function('vrp_bin_packing', ARRAY['text', 'integer', 'integer']); + RETURN QUERY + SELECT function_returns('vrp_bin_packing', ARRAY['text', 'integer', 'integer'], 'setof record'); + + -- parameter names + RETURN QUERY + SELECT bag_has( + $$SELECT proargnames from pg_proc where proname = 'vrp_bin_packing'$$, + $$SELECT '{"inner_query","bin_capacity","max_rows","bin_number","item_id"}'::TEXT[]$$ + ); + + -- parameter types + RETURN QUERY + SELECT set_eq( + $$SELECT proallargtypes from pg_proc where proname = 'vrp_bin_packing'$$, + $$VALUES + (ARRAY[25,23,23,23,23]::OID[]) + $$ + ); +END; +$BODY$ +LANGUAGE plpgsql; + +SELECT types_check(); + +SELECT * FROM finish(); +ROLLBACK; diff --git a/sql/or_tools/CMakeLists.txt b/sql/or_tools/CMakeLists.txt new file mode 100644 index 000000000..977757628 --- /dev/null +++ b/sql/or_tools/CMakeLists.txt @@ -0,0 +1,12 @@ +SET(LOCAL_FILES + knapsack.sql + multiple_knapsack.sql + bin_packing.sql + ) + +foreach (f ${LOCAL_FILES}) + configure_file(${f} ${f}) + list(APPEND PACKAGE_SQL_FILES ${CMAKE_CURRENT_BINARY_DIR}/${f}) +endforeach() + +set(PROJECT_SQL_FILES ${PROJECT_SQL_FILES} ${PACKAGE_SQL_FILES} PARENT_SCOPE) diff --git a/sql/or_tools/bin_packing.sql b/sql/or_tools/bin_packing.sql new file mode 100644 index 000000000..5839942d9 --- /dev/null +++ b/sql/or_tools/bin_packing.sql @@ -0,0 +1,228 @@ +/*PGR-GNU***************************************************************** +File: bin_packing.sql + +Copyright (c) 2022 GSoC-2022 pgRouting developers +Mail: project@pgrouting.org + +Function's developer: +Copyright (c) 2022 Manas Sivakumar + +------ + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + ********************************************************************PGR-GNU*/ +/* +signature start + +.. code-block:: none + + vrp_bin_packing( + Weights SQL, bin_capacity ANY-INTEGER, [, max_rows]) + + RETURNS SET OF + (bin_number, item_id) + +signature end + +parameters start + +============================== ================ ============================================================ +Parameter Type Description +============================== ================ ============================================================ +**Weights SQL** ``TEXT`` `Weights SQL`_ query describing the weight of each item +**Bin_Capacity** ``ANY-INTEGER`` Maximum Capacity of the bin. +============================== ================ ============================================================ + +parameters end + +optional parameters start + +===================== =============== ================================ ================================================== +Parameter Type Default Description +===================== =============== ================================ ================================================== +**max_rows** ``ANY-INTEGER`` :math:`100000` Maximum items(rows) to fetch from bin_packing_data + table +===================== =============== ================================ ================================================== + +optional parameters end + +.. Weights start + +A ``SELECT`` statement that returns the following columns: + +:: + + id, weight + + +==================== ========================= =========== ================================================ +Column Type Default Description +==================== ========================= =========== ================================================ +**id** ``ANY-INTEGER`` unique identifier of the item. + +**weight** ``ANY-INTEGER`` weight of the item. +==================== ========================= =========== ================================================ + +.. Weights end + +result start + +Returns set of + +.. code-block:: none + + (bin_number, item_id) + +=================== ================= ================================================= +Column Type Description +=================== ================= ================================================= +**bin_number** ``ANY-INTEGER`` Integer to uniquely identify a bin + +**item_id** ``ANY-INTEGER`` Integer to uniquely identify an item in the + bin +=================== ================= ================================================= +result end + +**Note**: + +- ANY-INTEGER: [SMALLINT, INTEGER, BIGINT] +*/ +DROP FUNCTION IF EXISTS vrp_bin_packing CASCADE; +-- DROP TABLE IF EXISTS bin_packing_data CASCADE; + +-- CREATE TABLE bin_packing_data( +-- id INTEGER, +-- weight INTEGER); + +-- INSERT INTO bin_packing_data (id, weight) +-- VALUES +-- (1, 48), (2, 30), (3, 19), (4, 36), (5, 36), (6, 27), (7, 42), (8, 42), (9, 36), (10, 24), (11, 30); + + +CREATE OR REPLACE FUNCTION vrp_bin_packing( + inner_query TEXT, -- weights SQL + bin_capacity INTEGER, -- Bin Capacity + max_rows INTEGER = 100000 -- Maximum number of rows to be fetched. Default is value = 100000. +) +RETURNS TABLE(bin_number INTEGER, item_id INTEGER) +AS $$ + try: + from ortools.linear_solver import pywraplp + except Exception as err: + plpy.error(err) + + global max_rows + if inner_query == None: + raise Exception('Inner Query Cannot be NULL') + if bin_capacity == None: + raise Exception('Capacity Cannot be NULL') + if max_rows == None: + max_rows = 100000 + + # Program Execution Starts here + + try: + inner_query_result = plpy.execute(inner_query, max_rows) + num_of_rows = inner_query_result.nrows() + colnames = inner_query_result.colnames() + coltypes = inner_query_result.coltypes() + except plpy.SPIError as error_msg: + plpy.error("Error Processing Inner Query. The given query is not a valid SQL command") + + if len(colnames) != 2: + plpy.error("Expected 2 column, Got ", len(colnames)) + if ('weight' in colnames) and ('id' in colnames): + # got expected column names + pass + else: + plpy.error("Expected column weight, Got ", colnames) + if all(item in [20, 21, 23] for item in coltypes): + # got expected column types + pass + else: + raise Exception("Returned columns of different type. Expected Integer") + + data = {} + weights = [] + data_ids = [] + + for i in range(num_of_rows): + weights.append(inner_query_result[i]["weight"]) + data_ids.append(inner_query_result[i]["id"]) + + + data['weights'] = weights + data['items'] = list(range(len(weights))) + data['bins'] = data['items'] + data['bin_capacity'] = bin_capacity + + try: + solver = pywraplp.Solver.CreateSolver('SCIP') + except: + plpy.error("Unable to Initialize solver") + + if solver is None: + plpy.error('SCIP solver unavailable.') + + + x = {} + for i in data['items']: + for j in data['bins']: + x[(i, j)] = solver.IntVar(0, 1, 'x_%i_%i' % (i, j)) + + y = {} + for j in data['bins']: + y[j] = solver.IntVar(0, 1, 'y[%i]' % j) + + for i in data['items']: + solver.Add(sum(x[i, j] for j in data['bins']) == 1) + + for j in data['bins']: + solver.Add(sum(x[(i, j)] * data['weights'][i] + for i in data['items']) <= y[j] * data['bin_capacity']) + + solver.Minimize(solver.Sum([y[j] for j in data['bins']])) + + status = solver.Solve() + + if status == pywraplp.Solver.OPTIMAL: + for j in data['bins']: + if y[j].solution_value() == 1: + bin_items = [] + bin_weight = 0 + for i in data['items']: + if x[i, j].solution_value() > 0: + bin_items.append(i) + bin_weight += data['weights'][i] + if bin_weight > 0: + for k in range(len(bin_items)): + yield(j+1, data_ids[bin_items[k]]) + else: + plpy.notice('The problem does not have an optimal solution') + + # end of the program + +$$ LANGUAGE plpython3u VOLATILE; + +-- SELECT * FROM vrp_bin_packing('SELECT id, weight FROM bin_packing_data', 100); + +-- COMMENTS + +COMMENT ON FUNCTION vrp_bin_packing(TEXT, INTEGER, INTEGER) +IS 'vrp_bin_packing +- Documentation: + - ${PROJECT_DOC_LINK}/vrp_bin_packing.html +'; \ No newline at end of file diff --git a/sql/or_tools/knapsack.sql b/sql/or_tools/knapsack.sql new file mode 100644 index 000000000..00136ca87 --- /dev/null +++ b/sql/or_tools/knapsack.sql @@ -0,0 +1,208 @@ + +/*PGR-GNU***************************************************************** +File: knapsack.sql + +Copyright (c) 2022 GSoC-2022 pgRouting developers +Mail: project@pgrouting.org + +Function's developer: +Copyright (c) 2022 Manas Sivakumar + +------ + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + ********************************************************************PGR-GNU*/ + +/* +signature start + +.. code-block:: none + + vrp_knapsack( + Weights_Costs SQL, capacity ANY-INTEGER, [, max_rows]) + + RETURNS SET OF + (item_id) + +signature end + +parameters start + +============================== ================ ========================================================= +Parameter Type Description +============================== ================ ========================================================= +**Weights_Costs SQL** ``TEXT`` `Weights_Costs SQL`_ query describing the weights and + cost of each item +**Capacity** ``ANY-INTEGER`` Maximum Capacity of the knapsack. +============================== ================ ========================================================= + +parameters end + +optional parameters start + +===================== =============== ================================== ================================================= +Parameter Type Default Description +===================== =============== ================================== ================================================= +**max_rows** ``ANY-INTEGER`` :math:`100000` Maximum items(rows) to fetch from knapsack_data + table +===================== =============== ================================== ================================================= + +optional parameters end + +.. Weights_Costs start + +A ``SELECT`` statement that returns the following columns: + +:: + + id, weight, cost + + +==================== ========================= =========== ================================================ +Column Type Default Description +==================== ========================= =========== ================================================ +**id** ``ANY-INTEGER`` unique identifier of the item. + +**weight** ``ANY-INTEGER`` weight of the item. + +**cost** ``ANY-INTEGER`` cost of the item. +==================== ========================= =========== ================================================ + +.. Weights_Costs end + +result start + +Returns set of + +.. code-block:: none + + (item_id) + +=================== ================= ================================================= +Column Type Description +=================== ================= ================================================= +**item_id** ``ANY-INTEGER`` Integer to uniquely identify an item in the + knapsack +=================== ================= ================================================= +result end + +**Note**: + +- ANY-INTEGER: [SMALLINT, INTEGER, BIGINT] +*/ + +DROP FUNCTION IF EXISTS vrp_knapsack CASCADE; +-- DROP TABLE IF EXISTS knapsack_data; + +-- CREATE TABLE knapsack_data( +-- id INTEGER, +-- weight INTEGER, +-- cost INTEGER); + +-- INSERT INTO knapsack_data (id, weight, cost) +-- VALUES +-- (1, 12, 4), +-- (2, 2, 2), +-- (3, 1, 1), +-- (4, 4, 10), +-- (5, 1, 2); + +CREATE OR REPLACE FUNCTION vrp_knapsack( + inner_query TEXT, -- weights_cost SQL + capacity INTEGER, -- Knapsack Capacity + max_rows INTEGER = 100000 -- Maximum number of rows to be fetched. Default is 100000. +) +RETURNS TABLE(item_id INTEGER) +AS $$ + try: + from ortools.algorithms import pywrapknapsack_solver + except Exception as err: + plpy.error(err) + + global max_rows + if inner_query == None: + raise Exception('Inner Query Cannot be NULL') + if capacity == None: + raise Exception('Capacity Cannot be NULL') + if max_rows == None: + max_rows = 100000 + try: + solver = pywrapknapsack_solver.KnapsackSolver( + pywrapknapsack_solver.KnapsackSolver. + KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER, 'KnapsackExample') + except: + plpy.error('Unable to Initialize Knapsack Solver') + + capacities = [] + capacities.append(capacity) + + # Program Execution Starts here + + try: + inner_query_result = plpy.execute(inner_query, max_rows) + num_of_rows = inner_query_result.nrows() + colnames = inner_query_result.colnames() + coltypes = inner_query_result.coltypes() + except plpy.SPIError as error_msg: + plpy.error("Error Processing Inner Query. The given query is not a valid SQL command") + + if len(colnames) != 3: + plpy.error("Expected 3 columns, Got ", len(colnames)) + if ('weight' in colnames) and ('cost' in colnames) and ('id' in colnames): + # got correct column names + pass + else: + plpy.error("Expected columns weight and cost, Got ", colnames) + if all(item in [20, 21, 23] for item in coltypes): + # got correct column types + pass + else: + raise Exception("Returned columns of different type. Expected Integer, Integer") + + ids = [] + values = [] + weight1 = [] + weights =[] + for i in range(num_of_rows): + ids.append(inner_query_result[i]["id"]) + values.append(inner_query_result[i]["cost"]) + weight1.append(inner_query_result[i]["weight"]) + weights.append(weight1) + + try: + solver.Init(values, weights, capacities) + except Exception as error_msg: + plpy.error(error_msg) + computed_value = solver.Solve() + + # prints results + for i in range(len(values)): + if solver.BestSolutionContains(i): + yield (ids[i]) + + # end of the program + +$$ LANGUAGE plpython3u VOLATILE; + +-- SELECT * FROM vrp_knapsack('SELECT id, weight, cost FROM knapsack_data' , 15); + +-- COMMENTS + +COMMENT ON FUNCTION vrp_knapsack(TEXT, INTEGER, INTEGER) +IS 'vrp_knapsack +- Documentation: + - ${PROJECT_DOC_LINK}/vrp_knapsack.html +'; diff --git a/sql/or_tools/multiple_knapsack.sql b/sql/or_tools/multiple_knapsack.sql new file mode 100644 index 000000000..d6dc1fa07 --- /dev/null +++ b/sql/or_tools/multiple_knapsack.sql @@ -0,0 +1,239 @@ +/*PGR-GNU***************************************************************** +File: multiple_knapsack.sql + +Copyright (c) 2022 GSoC-2022 pgRouting developers +Mail: project@pgrouting.org + +Function's developer: +Copyright (c) 2022 Manas Sivakumar + +------ + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + ********************************************************************PGR-GNU*/ +/* +signature start + +.. code-block:: none + + vrp_multiple_knapsack( + Weights_Costs SQL, capacities ARRAY[ANY-INTEGER], [, max_rows]) + + RETURNS SET OF + (knapsack_number, item_id) + +signature end + +parameters start + +============================== ======================= ========================================================= +Parameter Type Description +============================== ======================= ========================================================= +**Weights_Costs SQL** ``TEXT`` `Weights_Costs SQL`_ query describing the weight of each item +**Capacities** ``ARRAY[ANY-INTEGER]`` An array describing the capacity of each knapsack +============================== ======================= ========================================================= + +parameters end + +optional parameters start + +===================== ================ ============================= ================================================= +Parameter Type Default Description +===================== ================ ============================= ================================================= +**max_rows** ``ANY-INTEGER`` :math:`100000` Maximum items(rows) to fetch from bin_packing_data + table +===================== ================ ============================= ================================================= + +optional parameters end + +.. Weights_Costs start + +A ``SELECT`` statement that returns the following columns: + +:: + + id, weight, cost + + +==================== ========================= =========== ================================================ +Column Type Default Description +==================== ========================= =========== ================================================ +**id** ``ANY-INTEGER`` unique identifier of the item. + +**weight** ``ANY-INTEGER`` weight of the item. + +**cost** ``ANY-INTEGER`` cost of the item. +==================== ========================= =========== ================================================ + +.. Weights_Costs end + +result start + +Returns set of + +.. code-block:: none + + (knapsack_number, item_id) + +=================== ================= ================================================= +Column Type Description +=================== ================= ================================================= +**knapsack_number** ``ANY-INTEGER`` Integer to uniquely identify a knapsack + +**item_id** ``ANY-INTEGER`` Integer to uniquely identify an item in the + bin +=================== ================= ================================================= +result end + +**Note**: + +- ANY-INTEGER: [SMALLINT, INTEGER, BIGINT] +*/ + +DROP FUNCTION IF EXISTS vrp_multiple_knapsack CASCADE; +-- DROP TABLE IF EXISTS multiple_knapsack_data CASCADE; + +-- CREATE TABLE multiple_knapsack_data( +-- id INTEGER, +-- weight INTEGER, +-- cost INTEGER); + +-- INSERT INTO multiple_knapsack_data (id, weight, cost) +-- VALUES +-- (1, 48, 10), +-- (2, 30, 30), +-- (3, 42, 25), +-- (4, 36, 50), +-- (5, 36, 35), +-- (6, 48, 30), +-- (7, 42, 15), +-- (8, 42, 40), +-- (9, 36, 30), +-- (10, 24, 35), +-- (11, 30, 45), +-- (12, 30, 10), +-- (13, 42, 20), +-- (14, 36, 30), +-- (15, 36, 25); + + +CREATE OR REPLACE FUNCTION vrp_multiple_knapsack( + inner_query TEXT, -- weights_cost SQL + capacities INTEGER[], -- ARRAY of Knapsack Capacities + max_rows INTEGER = 100000 -- Maximum number of rows to be fetched. Default value is 100000. +) +RETURNS TABLE(knapsack_number INTEGER, item_id INTEGER) +AS $$ + try: + from ortools.linear_solver import pywraplp + except Exception as err: + plpy.error(err) + + global max_rows + if inner_query == None: + raise Exception('Inner Query Cannot be NULL') + if capacities == None: + raise Exception('Capacity Cannot be NULL') + if max_rows == None: + max_rows = 100000 + + data = {} + data['values'] = [] + data['weights'] = [] + data_ids = [] + + # Program Execution Starts here + + try: + inner_query_result = plpy.execute(inner_query, max_rows) + num_of_rows = inner_query_result.nrows() + colnames = inner_query_result.colnames() + coltypes = inner_query_result.coltypes() + except plpy.SPIError as error_msg: + plpy.error("Error Processing Inner Query. The given query is not a valid SQL command") + + if len(colnames) != 3: + plpy.error("Expected 3 columns, Got ", len(colnames)) + if ('weight' in colnames) and ('cost' in colnames) and ('cost' in colnames): + # got expected column names + pass + else: + plpy.error("Expected columns weight and cost, Got ", colnames) + if all(item in [20, 21, 23] for item in coltypes): + # got expected column types + pass + else: + raise Exception("Returned columns of different type. Expected Integer, Integer") + + for i in range(num_of_rows): + data['values'].append(inner_query_result[i]["cost"]) + data['weights'].append(inner_query_result[i]["weight"]) + data_ids.append(inner_query_result[i]["id"]) + + + data['num_items'] = len(data['weights']) + data['all_items'] = range(data['num_items']) + + data['bin_capacities'] = capacities + data['num_bins'] = len(data['bin_capacities']) + data['all_bins'] = range(data['num_bins']) + + try: + solver = pywraplp.Solver.CreateSolver('SCIP') + except: + plpy.error("Unable to Initialize solver") + + if solver is None: + plpy.error('SCIP solver unavailable.') + + x = {} + for i in data['all_items']: + for b in data['all_bins']: + x[i, b] = solver.BoolVar(f'x_{i}_{b}') + + for i in data['all_items']: + solver.Add(sum(x[i, b] for b in data['all_bins']) <= 1) + + for b in data['all_bins']: + solver.Add(sum(x[i, b] * data['weights'][i] for i in data['all_items']) <= data['bin_capacities'][b]) + + objective = solver.Objective() + for i in data['all_items']: + for b in data['all_bins']: + objective.SetCoefficient(x[i, b], data['values'][i]) + objective.SetMaximization() + + status = solver.Solve() + + if status == pywraplp.Solver.OPTIMAL: + for b in data['all_bins']: + for i in data['all_items']: + if x[i, b].solution_value() > 0: + yield(b+1, data_ids[i]) + else: + plpy.notice('The problem does not have an optimal solution.') + # end of the program +$$ LANGUAGE plpython3u VOLATILE; + +-- SELECT * FROM vrp_multiple_knapsack('SELECT id, weight, cost FROM multiple_knapsack_data', ARRAY[100,100,100,100,100]); + +-- COMMENTS + +COMMENT ON FUNCTION vrp_multiple_knapsack(TEXT, INTEGER[], INTEGER) +IS 'vrp_multiple_knapsack +- Documentation: + - ${PROJECT_DOC_LINK}/vrp_multiple_knapsack.html +'; diff --git a/sql/pg_controls/vrprouting.control b/sql/pg_controls/vrprouting.control index ad9e4065d..b973f5ea7 100644 --- a/sql/pg_controls/vrprouting.control +++ b/sql/pg_controls/vrprouting.control @@ -6,3 +6,4 @@ relocatable = true requires = 'plpgsql' requires = 'postgis' requires = 'pgrouting' +requires = 'plpython3u' diff --git a/sql/sigs/vrprouting--0.4.sig b/sql/sigs/vrprouting--0.4.sig new file mode 100644 index 000000000..86c94073d --- /dev/null +++ b/sql/sigs/vrprouting--0.4.sig @@ -0,0 +1,44 @@ +vrp_bin_packing(text,integer,integer) +_vrp_boost_version() +_vrp_build_type() +vrp_compatiblevehiclesraw(text,text,text,text,bigint,double precision,boolean) +vrp_compatiblevehicles(text,text,text,text,bigint,double precision,boolean) +_vrp_compatiblevehicles(text,text,text,text,double precision,boolean) +_vrp_compilation_date() +_vrp_compiler_version() +vrp_full_version() +_vrp_git_hash() +vrp_knapsack(text,integer,integer) +_vrp_lib_version() +vrp_multiple_knapsack(text,integer[],integer) +_vrp_onedepot(text,text,text,integer) +vrp_onedepot(text,text,text,integer) +_vrp_operating_system() +vrp_optimizeraw(text,text,text,text,bigint,double precision,integer,boolean,integer) +_vrp_optimize(text,text,text,text,double precision,integer,bigint,boolean,integer,boolean) +vrp_optimize(text,text,text,text,regclass,timestamp without time zone,double precision,integer) +vrp_optimizeupdateraw(text,text,text,text,regclass,text,text,bigint,double precision,integer,boolean,integer) +_vrp_pgr_pickdelivereuclidean(text,text,double precision,integer,integer) +vrp_pgr_pickdelivereuclidean(text,text,double precision,integer,integer) +_vrp_pgr_pickdeliver(text,text,text,double precision,integer,integer) +vrp_pgr_pickdeliver(text,text,text,double precision,integer,integer) +_vrp_pgsql_version() +vrp_pickdeliveraddraw(text,text,text,text,bigint,bigint,boolean,double precision,integer,boolean) +_vrp_pickdeliveradd(text,text,text,text,bigint,timestamp without time zone,boolean,double precision,integer,boolean) +vrp_pickdeliveradd(text,text,text,text,bigint,timestamp without time zone,boolean,double precision,integer,boolean) +vrp_pickdeliverraw(text,text,text,text,bigint,boolean,double precision,integer,boolean) +_vrp_pickdeliverraw(text,text,text,text,boolean,double precision,integer,boolean,bigint) +_vrp_pickdeliver(text,text,text,text,boolean,double precision,integer,boolean,timestamp without time zone) +vrp_pickdeliver(text,text,text,text,timestamp without time zone,boolean,double precision,integer,boolean) +vrp_simulation(text,text,text,text,double precision,integer,integer,timestamp without time zone,integer,integer,boolean,time without time zone[]) +_vrp_vehiclesattime(text,timestamp without time zone,boolean) +vrp_version() +vrp_viewrouteraw(text,text,text,text,bigint,double precision) +vrp_viewroute(text,text,text,text,bigint,double precision) +vrp_vroomjobsplain(text,text,text,text,text,text,integer,integer) +vrp_vroomjobs(text,text,text,text,text,text,integer,interval) +vrp_vroomplain(text,text,text,text,text,text,text,text,integer,integer) +vrp_vroomshipmentsplain(text,text,text,text,text,text,integer,integer) +vrp_vroomshipments(text,text,text,text,text,text,integer,interval) +_vrp_vroom(text,text,text,text,text,text,text,text,integer,integer,smallint,boolean) +vrp_vroom(text,text,text,text,text,text,text,text,integer,interval) diff --git a/tools/developer/run.sh b/tools/developer/run.sh index 8ae8e0485..30147bf5e 100755 --- a/tools/developer/run.sh +++ b/tools/developer/run.sh @@ -2,124 +2,154 @@ set -e +DIR=$(git rev-parse --show-toplevel) +pushd "${DIR}" > /dev/null || exit 1 + +# The next two lines need to be executed only once +# pushd tools/testers/ ; tar -xf matrix_new_values.tar.gz; popd +# sudo apt-get install libssl-dev libasio-dev libglpk-dev # copy this file into the root of your repository # adjust to your needs -# set up your postgres version and port -PGVERSION="12" +# This run.sh is intended for 3.x.x +VERSION=$(grep -Po '(?<=project\(VRPROUTING VERSION )[^;]+' CMakeLists.txt) +echo "pgRouting VERSION ${VERSION}" + +# set up your postgres version, port and compiler (if more than one) +PGVERSION="13" PGPORT="5432" PGBIN="/usr/lib/postgresql/${PGVERSION}/bin" +PGINC="/usr/include/postgresql/${PGVERSION}/server" +# When more than one compiler is installed +GCC="" + +QUERIES_DIRS=$(ls docqueries -1) +TAP_DIRS=$(ls pgtap -1) + +QUERIES_DIRS="" +TAP_DIRS="" + +function install_vroom { + cd "${DIR}" + rm -rf ./vroom-v1.12.0 + git clone --depth 1 --branch v1.12.0 https://github.com/VROOM-Project/vroom ./vroom-v1.12.0 + pushd vroom-v1.12.0/ + git submodule update --init + cd src/ + USE_ROUTING=false make shared + popd +} -# Compiler setup +function set_cmake { + # Using all defaults + #cmake .. -# When more than one compiler is installed -GCC="8" + # Options Release RelWithDebInfo MinSizeRel Debug + #cmake -DCMAKE_BUILD_TYPE=Debug .. -ALLDIRS=" -pickDeliver -vrp_basic -version -" + # Additional debug information + #cmake -DPgRouting_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug .. -TESTDIRS=${ALLDIRS} -TESTDIRS="version" + # with documentation (like the one the website) + #cmake -DDOC_USE_BOOTSTRAP=ON -DWITH_DOC=ON .. + # with developers documentation + #cmake -DWITH_DOC=ON -DBUILD_DOXY=ON .. -function test_compile { + #CXX=clang++ CC=clang cmake -DPOSTGRESQL_BIN=${PGBIN} -DCMAKE_BUILD_TYPE=Debug .. + + cmake "-DPostgreSQL_INCLUDE_DIR=${PGINC}" -DCMAKE_BUILD_TYPE=Debug -DWITH_DOC=OFF "-DVROOM_INSTALL_PATH=$DIR/vroom-v1.12.0" .. +} + +function tap_test { + echo -------------------------------------------- + echo pgTap test all + echo -------------------------------------------- -echo ------------------------------------ -echo ------------------------------------ -echo "Compiling with G++-$1" -echo ------------------------------------ - -if [ -n "$1" ]; then - update-alternatives --set gcc "/usr/bin/gcc-$1" -fi - - -cd build/ || exit 1 - -cmake -DPOSTGRESQL_BIN=${PGBIN} -DDOC_USE_BOOTSTRAP=ON -DWITH_DOC=ON -DBUILD_DOXY=ON -DBUILD_LATEX=ON -DCMAKE_BUILD_TYPE=Debug -DPROJECT_DEBUG=ON .. -#cmake -DPOSTGRESQL_BIN=${PGBIN} -DDOC_USE_BOOTSTRAP=ON -DWITH_DOC=ON -DBUILD_DOXY=ON -DBUILD_LATEX=ON -DES=ON -DLINKCHECK=ON .. - -#make doc -#time make doxy -make -sudo make install -cd .. - -echo -echo -------------------------------------------- -echo Update signatures -echo -------------------------------------------- -tools/scripts/get_signatures.sh -p ${PGPORT} - -#exit - -echo -------------------------------------------- -echo Execute documentation queries for a particular directories -echo -------------------------------------------- - - -# choose what is going to be tested while developing -for d in ${TESTDIRS} -do - tools/testers/doc_queries_generator.pl -alg ${d} -documentation -pgport ${PGPORT} - #tools/testers/doc_queries_generator.pl -alg ${d} -pgport ${PGPORT} - time tools/developer/taptest.sh ${d} -p ${PGPORT} -done - - -#exit - -######################################################## -# pgTap test all -######################################################## - -dropdb --if-exists -p $PGPORT ___vrp___test___ -createdb -p $PGPORT ___vrp___test___ -echo $PGPORT -tools/testers/pg_prove_tests.sh vicky $PGPORT -dropdb -p $PGPORT ___vrp___test___ - - -################################ -################################ -## checks all the repository -# -# the rest of the script use PGPORT variable -################################ -################################ -echo -echo -------------------------------------------- -echo Update / Verify NEWS -echo -------------------------------------------- -tools/scripts/notes2news.pl -if git status | grep 'NEWS'; then - echo "**************************************************" - echo " WARNING" - echo "the signatures changed, copying generated files" - echo "Plese verify the changes are minimal" - echo "**************************************************" - git diff NEWS -fi - -######################################################## -# Execute documentation queries for the whole project -######################################################## -tools/testers/doc_queries_generator.pl -documentation -pgport $PGPORT -tools/testers/doc_queries_generator.pl -pgport $PGPORT - -cd build -#rm -rf doc/* -make doc -#rm -rf doxygen/* -make doxy -cd .. - -#tools/testers/update-tester.sh + dropdb --if-exists -p $PGPORT ___pgr___test___ + createdb -p $PGPORT ___pgr___test___ + echo $PGPORT + tools/testers/pg_prove_tests.sh vicky $PGPORT + dropdb -p $PGPORT ___pgr___test___ +} +function action_tests { + echo -------------------------------------------- + echo Update signatures + echo -------------------------------------------- + + tools/release-scripts/get_signatures.sh -p ${PGPORT} + tools/release-scripts/notes2news.pl + bash tools/scripts/test_signatures.sh + bash tools/scripts/test_shell.sh + bash tools/scripts/test_license.sh + bash tools/scripts/code_checker.sh + tools/testers/doc_queries_generator.pl -documentation -pgport $PGPORT } -test_compile ${GCC} +function set_compiler { + echo ------------------------------------ + echo ------------------------------------ + echo "Compiling with G++-$1" + echo ------------------------------------ + + if [ -n "$1" ]; then + update-alternatives --set gcc "/usr/bin/gcc-$1" + fi +} + +function build_doc { + pushd build > /dev/null || exit 1 + #rm -rf doc/* + make doc + #make linkcheck + #rm -rf doxygen/* + #make doxy + popd > /dev/null || exit 1 +} + +function build { + pushd build > /dev/null || exit 1 + set_cmake + make -j 16 + #make VERBOSE=1 + sudo make install + popd > /dev/null || exit 1 + +} + +function test_compile { + + set_compiler "${GCC}" + + #install_vroom + build + + echo -------------------------------------------- + echo Execute documentation queries + echo -------------------------------------------- + for d in ${QUERIES_DIRS} + do + #tools/testers/doc_queries_generator.pl -alg "${d}" -documentation -pgport "${PGPORT}" + #tools/testers/doc_queries_generator.pl -alg "${d}" -debug1 -pgport "${PGPORT}" + tools/testers/doc_queries_generator.pl -alg "${d}" -pgport "${PGPORT}" + done + + + echo -------------------------------------------- + echo Execute tap_directories + echo -------------------------------------------- + for d in ${TAP_DIRS} + do + bash taptest.sh "${d}" "-p ${PGPORT}" + done + + #build_doc + #tools/testers/doc_queries_generator.pl -pgport $PGPORT + #exit 0 + + tap_test + action_tests +} +test_compile diff --git a/tools/testers/doc_queries_generator.pl b/tools/testers/doc_queries_generator.pl index 293906708..188d91c36 100755 --- a/tools/testers/doc_queries_generator.pl +++ b/tools/testers/doc_queries_generator.pl @@ -396,7 +396,8 @@ sub createTestDB { #TODO put as parameter my $encoding = "SET client_encoding TO 'UTF8';"; - + + mysystem("$psql $connopts -c \"$encoding CREATE EXTENSION IF NOT EXISTS plpython3u \" $DBNAME"); mysystem("$psql $connopts -c \"$encoding CREATE EXTENSION IF NOT EXISTS postgis $postgis_ver \" $DBNAME"); mysystem("$psql $connopts -c \"$encoding CREATE EXTENSION IF NOT EXISTS pgrouting $pgrouting_ver \" $DBNAME"); mysystem("$psql $connopts -c \"$encoding DROP EXTENSION IF EXISTS vrprouting CASCADE\" $DBNAME"); diff --git a/tools/testers/matrix_new_values.tar.gz b/tools/testers/matrix_new_values.tar.gz index 8eeba8375..d28f24449 100644 Binary files a/tools/testers/matrix_new_values.tar.gz and b/tools/testers/matrix_new_values.tar.gz differ diff --git a/tools/testers/ortoolsdata.sql b/tools/testers/ortoolsdata.sql new file mode 100644 index 000000000..96085ccec --- /dev/null +++ b/tools/testers/ortoolsdata.sql @@ -0,0 +1,56 @@ +DROP SCHEMA IF EXISTS ortools CASCADE; +CREATE SCHEMA ortools; + +DROP TABLE IF EXISTS ortools.knapsack_data CASCADE; +DROP TABLE IF EXISTS ortools.multiple_knapsack_data CASCADE; +DROP TABLE IF EXISTS ortools.bin_packing_data CASCADE; + +--Bin Packing Start +CREATE TABLE ortools.bin_packing_data( + id INTEGER, + weight INTEGER); + +INSERT INTO ortools.bin_packing_data (id, weight) +VALUES +(1, 48), (2, 30), (3, 19), (4, 36), (5, 36), (6, 27), (7, 42), (8, 42), (9, 36), (10, 24), (11, 30); +--Bin Packing End + +-- Multiple Knapsack Start +CREATE TABLE ortools.multiple_knapsack_data( + id INTEGER, + weight INTEGER, + cost INTEGER); + +INSERT INTO ortools.multiple_knapsack_data (id, weight, cost) +VALUES +(1, 48, 10), +(2, 30, 30), +(3, 42, 25), +(4, 36, 50), +(5, 36, 35), +(6, 48, 30), +(7, 42, 15), +(8, 42, 40), +(9, 36, 30), +(10, 24, 35), +(11, 30, 45), +(12, 30, 10), +(13, 42, 20), +(14, 36, 30), +(15, 36, 25); +--Multiple Knapsack End + +--Knapsack Start +CREATE TABLE ortools.knapsack_data( + id INTEGER, + weight INTEGER, + cost INTEGER); + +INSERT INTO ortools.knapsack_data (id, weight, cost) +VALUES +(1, 12, 4), +(2, 2, 2), +(3, 1, 1), +(4, 4, 10), +(5, 1, 2); +--Knapsack End diff --git a/tools/testers/setup_db.sql b/tools/testers/setup_db.sql index 21b5d6a66..9c28222d4 100644 --- a/tools/testers/setup_db.sql +++ b/tools/testers/setup_db.sql @@ -15,6 +15,9 @@ SET client_min_messages = WARNING; CREATE EXTENSION IF NOT EXISTS pgtap; CREATE EXTENSION IF NOT EXISTS vrprouting CASCADE; +CREATE EXTENSION IF NOT EXISTS postgis; +CREATE EXTENSION IF NOT EXISTS pgrouting; +CREATE EXTENSION IF NOT EXISTS plpython3u; BEGIN; @@ -25,5 +28,6 @@ BEGIN; \i no_crash_test.sql \i general_pgtap_tests.sql \i vroomdata.sql + \i ortoolsdata.sql END;