libadalina-analytics 0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- libadalina_analytics-0.0/.gitignore +3 -0
- libadalina_analytics-0.0/.gitlab-ci.yml +16 -0
- libadalina_analytics-0.0/.gitmodules +3 -0
- libadalina_analytics-0.0/LICENSE +21 -0
- libadalina_analytics-0.0/MANIFEST.in +3 -0
- libadalina_analytics-0.0/PKG-INFO +23 -0
- libadalina_analytics-0.0/build.sh +6 -0
- libadalina_analytics-0.0/docs/Makefile +20 -0
- libadalina_analytics-0.0/docs/make.bat +35 -0
- libadalina_analytics-0.0/docs/source/_collections/.gitkeep +0 -0
- libadalina_analytics-0.0/docs/source/_static/.gitkeep +0 -0
- libadalina_analytics-0.0/docs/source/conf.py +84 -0
- libadalina_analytics-0.0/examples/clustering_algorithm.ipynb +291 -0
- libadalina_analytics-0.0/examples/flows_distributions.ipynb +495 -0
- libadalina_analytics-0.0/examples/read_osm_graph.ipynb +279 -0
- libadalina_analytics-0.0/examples/relocation_algorithm.ipynb +369 -0
- libadalina_analytics-0.0/libadalina_analytics/__init__.py +0 -0
- libadalina_analytics-0.0/libadalina_analytics/clustering/__init__.py +0 -0
- libadalina_analytics-0.0/libadalina_analytics/clustering/algorithms/__init__.py +5 -0
- libadalina_analytics-0.0/libadalina_analytics/clustering/algorithms/zoning_algorithm.py +49 -0
- libadalina_analytics-0.0/libadalina_analytics/clustering/algorithms/zoning_model.py +351 -0
- libadalina_analytics-0.0/libadalina_analytics/clustering/algorithms/zoning_model_simple.py +342 -0
- libadalina_analytics-0.0/libadalina_analytics/clustering/models/__init__.py +0 -0
- libadalina_analytics-0.0/libadalina_analytics/clustering/models/adalina_zoning_algorithm_options.py +37 -0
- libadalina_analytics-0.0/libadalina_analytics/clustering/models/adalina_zoning_data.py +404 -0
- libadalina_analytics-0.0/libadalina_analytics/clustering/models/adalina_zoning_distance.py +14 -0
- libadalina_analytics-0.0/libadalina_analytics/clustering/models/adalina_zoning_solution.py +380 -0
- libadalina_analytics-0.0/libadalina_analytics/exceptions/__init__.py +0 -0
- libadalina_analytics-0.0/libadalina_analytics/exceptions/input_file_exception.py +17 -0
- libadalina_analytics-0.0/libadalina_analytics/flows_distribution/__init__.py +0 -0
- libadalina_analytics-0.0/libadalina_analytics/flows_distribution/algorithms/__init__.py +0 -0
- libadalina_analytics-0.0/libadalina_analytics/flows_distribution/algorithms/flows_distribution_algorithm.py +140 -0
- libadalina_analytics-0.0/libadalina_analytics/flows_distribution/algorithms/origin_destination_extractor.py +47 -0
- libadalina_analytics-0.0/libadalina_analytics/flows_distribution/models/__init__.py +0 -0
- libadalina_analytics-0.0/libadalina_analytics/graph_extraction/__init__.py +0 -0
- libadalina_analytics-0.0/libadalina_analytics/graph_extraction/builders/__init__.py +5 -0
- libadalina_analytics-0.0/libadalina_analytics/graph_extraction/builders/graph_builder.py +157 -0
- libadalina_analytics-0.0/libadalina_analytics/graph_extraction/readers/__init__.py +9 -0
- libadalina_analytics-0.0/libadalina_analytics/graph_extraction/readers/open_street_map.py +79 -0
- libadalina_analytics-0.0/libadalina_analytics/graph_extraction/readers/reader.py +48 -0
- libadalina_analytics-0.0/libadalina_analytics/graph_extraction/utils/__init__.py +0 -0
- libadalina_analytics-0.0/libadalina_analytics/graph_extraction/utils/search_address.py +12 -0
- libadalina_analytics-0.0/libadalina_analytics/graph_extraction/writers/__init__.py +11 -0
- libadalina_analytics-0.0/libadalina_analytics/graph_extraction/writers/to_csv.py +103 -0
- libadalina_analytics-0.0/libadalina_analytics/graph_extraction/writers/to_geopackage.py +67 -0
- libadalina_analytics-0.0/libadalina_analytics/graph_extraction/writers/to_shapefile.py +21 -0
- libadalina_analytics-0.0/libadalina_analytics/relocation/__init__.py +0 -0
- libadalina_analytics-0.0/libadalina_analytics/relocation/algorithms/__init__.py +5 -0
- libadalina_analytics-0.0/libadalina_analytics/relocation/algorithms/adalina_algorithms.py +227 -0
- libadalina_analytics-0.0/libadalina_analytics/relocation/algorithms/adalina_model_highs.py +823 -0
- libadalina_analytics-0.0/libadalina_analytics/relocation/algorithms/adalina_relocation_algorithm.py +55 -0
- libadalina_analytics-0.0/libadalina_analytics/relocation/models/__init__.py +13 -0
- libadalina_analytics-0.0/libadalina_analytics/relocation/models/adalina_data.py +664 -0
- libadalina_analytics-0.0/libadalina_analytics/relocation/models/adalina_model_type.py +73 -0
- libadalina_analytics-0.0/libadalina_analytics/relocation/models/adalina_solution.py +431 -0
- libadalina_analytics-0.0/libadalina_analytics/relocation/models/options.py +54 -0
- libadalina_analytics-0.0/libadalina_analytics/relocation/models/relocation_resource.py +6 -0
- libadalina_analytics-0.0/libadalina_analytics/utils/__init__.py +6 -0
- libadalina_analytics-0.0/libadalina_analytics/utils/geometry_formats.py +6 -0
- libadalina_analytics-0.0/libadalina_analytics/utils/timing.py +15 -0
- libadalina_analytics-0.0/libadalina_analytics.egg-info/PKG-INFO +23 -0
- libadalina_analytics-0.0/libadalina_analytics.egg-info/SOURCES.txt +70 -0
- libadalina_analytics-0.0/libadalina_analytics.egg-info/dependency_links.txt +1 -0
- libadalina_analytics-0.0/libadalina_analytics.egg-info/requires.txt +10 -0
- libadalina_analytics-0.0/libadalina_analytics.egg-info/top_level.txt +1 -0
- libadalina_analytics-0.0/pyproject.toml +44 -0
- libadalina_analytics-0.0/requirements.dev.txt +4 -0
- libadalina_analytics-0.0/requirements.docs.txt +5 -0
- libadalina_analytics-0.0/requirements.txt +5 -0
- libadalina_analytics-0.0/setup.cfg +4 -0
- libadalina_analytics-0.0/tests/readers/__init__.py +0 -0
- libadalina_analytics-0.0/tests/readers/test_open_street_map.py +31 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# The Docker image that will be used to build your app
|
|
2
|
+
image: python:3.10-alpine
|
|
3
|
+
create-pages:
|
|
4
|
+
pages:
|
|
5
|
+
# The folder that contains the files to be exposed at the Page URL
|
|
6
|
+
publish: public
|
|
7
|
+
rules:
|
|
8
|
+
# This ensures that only pushes to the default branch will trigger
|
|
9
|
+
# a pages deploy
|
|
10
|
+
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
|
11
|
+
# Functions that should be executed before the build script is run
|
|
12
|
+
before_script:
|
|
13
|
+
- apk add --no-cache make git pandoc gdal-dev gcc libc-dev
|
|
14
|
+
script:
|
|
15
|
+
- pip install -r requirements.dev.txt
|
|
16
|
+
- sphinx-build -b html docs/source public
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 University of Milan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: libadalina-analytics
|
|
3
|
+
Version: 0.0
|
|
4
|
+
Summary: A library for geoenrichment and analytics of geographic data
|
|
5
|
+
Author-email: Marco Casazza <d.marcocasazza@gmail.com>, Alberto Ceselli <alberto.ceselli@unimi.it>, Marco Premoli <marco.premoli@unimi.it>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Classifier: Development Status :: 3 - Alpha
|
|
8
|
+
Classifier: Intended Audience :: Developers
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
+
Requires-Python: ~=3.10
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: libadalina-core==1.0.2
|
|
15
|
+
Provides-Extra: dev
|
|
16
|
+
Requires-Dist: pytest==8.4.1; extra == "dev"
|
|
17
|
+
Requires-Dist: black; extra == "dev"
|
|
18
|
+
Requires-Dist: isort; extra == "dev"
|
|
19
|
+
Requires-Dist: sphinx; extra == "dev"
|
|
20
|
+
Requires-Dist: pydata-sphinx-theme; extra == "dev"
|
|
21
|
+
Requires-Dist: nbsphinx; extra == "dev"
|
|
22
|
+
Requires-Dist: sphinx-collections; extra == "dev"
|
|
23
|
+
Dynamic: license-file
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Minimal makefile for Sphinx documentation
|
|
2
|
+
#
|
|
3
|
+
|
|
4
|
+
# You can set these variables from the command line, and also
|
|
5
|
+
# from the environment for the first two.
|
|
6
|
+
SPHINXOPTS ?=
|
|
7
|
+
SPHINXBUILD ?= sphinx-build
|
|
8
|
+
SOURCEDIR = source
|
|
9
|
+
BUILDDIR = build
|
|
10
|
+
|
|
11
|
+
# Put it first so that "make" without argument is like "make help".
|
|
12
|
+
help:
|
|
13
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
14
|
+
|
|
15
|
+
.PHONY: help Makefile
|
|
16
|
+
|
|
17
|
+
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
18
|
+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
19
|
+
%: Makefile
|
|
20
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
@ECHO OFF
|
|
2
|
+
|
|
3
|
+
pushd %~dp0
|
|
4
|
+
|
|
5
|
+
REM Command file for Sphinx documentation
|
|
6
|
+
|
|
7
|
+
if "%SPHINXBUILD%" == "" (
|
|
8
|
+
set SPHINXBUILD=sphinx-build
|
|
9
|
+
)
|
|
10
|
+
set SOURCEDIR=source
|
|
11
|
+
set BUILDDIR=build
|
|
12
|
+
|
|
13
|
+
%SPHINXBUILD% >NUL 2>NUL
|
|
14
|
+
if errorlevel 9009 (
|
|
15
|
+
echo.
|
|
16
|
+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
|
17
|
+
echo.installed, then set the SPHINXBUILD environment variable to point
|
|
18
|
+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
|
19
|
+
echo.may add the Sphinx directory to PATH.
|
|
20
|
+
echo.
|
|
21
|
+
echo.If you don't have Sphinx installed, grab it from
|
|
22
|
+
echo.https://www.sphinx-doc.org/
|
|
23
|
+
exit /b 1
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
if "%1" == "" goto help
|
|
27
|
+
|
|
28
|
+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
|
29
|
+
goto end
|
|
30
|
+
|
|
31
|
+
:help
|
|
32
|
+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
|
33
|
+
|
|
34
|
+
:end
|
|
35
|
+
popd
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Configuration file for the Sphinx documentation builder.
|
|
2
|
+
#
|
|
3
|
+
# For the full list of built-in configuration values, see the documentation:
|
|
4
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
5
|
+
|
|
6
|
+
import os
|
|
7
|
+
import sys
|
|
8
|
+
import pathlib
|
|
9
|
+
|
|
10
|
+
sys.path.insert(0, os.path.abspath(pathlib.Path(__file__).parent.parent.parent))
|
|
11
|
+
|
|
12
|
+
# -- Project information -----------------------------------------------------
|
|
13
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
|
14
|
+
|
|
15
|
+
project = 'libadalina-analytics'
|
|
16
|
+
copyright = '2025, OptLab, University of Milan'
|
|
17
|
+
author = 'Marco Casazza, Alberto Ceselli, Marco Premoli'
|
|
18
|
+
release = '1.0.0'
|
|
19
|
+
|
|
20
|
+
# -- General configuration ---------------------------------------------------
|
|
21
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
|
22
|
+
|
|
23
|
+
extensions = [
|
|
24
|
+
'sphinx.ext.autodoc',
|
|
25
|
+
'sphinx.ext.autosummary',
|
|
26
|
+
'sphinx.ext.viewcode',
|
|
27
|
+
'sphinx.ext.napoleon',
|
|
28
|
+
'sphinx.ext.intersphinx',
|
|
29
|
+
"sphinxcontrib.collections",
|
|
30
|
+
'nbsphinx'
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
# Napoleon settings
|
|
34
|
+
napoleon_google_docstring = True
|
|
35
|
+
napoleon_numpy_docstring = True
|
|
36
|
+
napoleon_include_init_with_doc = False
|
|
37
|
+
napoleon_include_private_with_doc = False
|
|
38
|
+
napoleon_include_special_with_doc = True
|
|
39
|
+
napoleon_use_admonition_for_examples = False
|
|
40
|
+
napoleon_use_admonition_for_notes = False
|
|
41
|
+
napoleon_use_admonition_for_references = False
|
|
42
|
+
napoleon_use_ivar = False
|
|
43
|
+
napoleon_use_param = True
|
|
44
|
+
napoleon_use_rtype = True
|
|
45
|
+
napoleon_preprocess_types = False
|
|
46
|
+
napoleon_type_aliases = None
|
|
47
|
+
napoleon_attr_annotations = True
|
|
48
|
+
|
|
49
|
+
# Intersphinx settings
|
|
50
|
+
intersphinx_mapping = {
|
|
51
|
+
'python': ('https://docs.python.org/3', None),
|
|
52
|
+
'pandas': ('https://pandas.pydata.org/pandas-docs/stable', None),
|
|
53
|
+
'geopandas': ('https://geopandas.org/en/stable/', None),
|
|
54
|
+
'pyspark': ('https://spark.apache.org/docs/latest/api/python/', None),
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
collections = {
|
|
58
|
+
'notebooks': {
|
|
59
|
+
'driver': 'copy_folder',
|
|
60
|
+
'source': pathlib.Path(__file__).parent.parent.parent / 'examples',
|
|
61
|
+
'target': 'notebooks',
|
|
62
|
+
'ignore': ['*.py', '.sh'],
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
templates_path = ['_templates']
|
|
67
|
+
exclude_patterns = ['_build', '**.ipynb_checkpoints']
|
|
68
|
+
|
|
69
|
+
nbsphinx_execute = 'never' # Do not execute notebooks during build
|
|
70
|
+
highlight_language = 'python'
|
|
71
|
+
|
|
72
|
+
# -- Options for HTML output -------------------------------------------------
|
|
73
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
|
74
|
+
|
|
75
|
+
html_theme = 'pydata_sphinx_theme'
|
|
76
|
+
html_static_path = ['_static']
|
|
77
|
+
|
|
78
|
+
latex_elements = {
|
|
79
|
+
'papersize': 'a4paper',
|
|
80
|
+
'pointsize': '10pt',
|
|
81
|
+
'extraclassoptions': 'oneside',
|
|
82
|
+
'fncychap': r'\usepackage[Bjornstrup]{fncychap}',
|
|
83
|
+
'makeindex': r'\usepackage[columns=1]{idxlayout}\makeindex'
|
|
84
|
+
}
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cells": [
|
|
3
|
+
{
|
|
4
|
+
"metadata": {
|
|
5
|
+
"ExecuteTime": {
|
|
6
|
+
"end_time": "2025-08-16T14:44:48.052498Z",
|
|
7
|
+
"start_time": "2025-08-16T14:44:47.833358Z"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"cell_type": "code",
|
|
11
|
+
"source": [
|
|
12
|
+
"import pandas as pd\n",
|
|
13
|
+
"import pathlib\n",
|
|
14
|
+
"import os\n",
|
|
15
|
+
"\n",
|
|
16
|
+
"base_path = pathlib.Path(os.environ.get(\"SAMPLES_DIR\", \"\"))\n",
|
|
17
|
+
"\n",
|
|
18
|
+
"clustering_df = pd.read_csv(\n",
|
|
19
|
+
" base_path / \"clustering\" / \"G_20_AMELIA_zoning_WKT_32632.csv\",\n",
|
|
20
|
+
" sep=',')"
|
|
21
|
+
],
|
|
22
|
+
"id": "6e6f6399ab5983fb",
|
|
23
|
+
"outputs": [],
|
|
24
|
+
"execution_count": 1
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"metadata": {
|
|
28
|
+
"ExecuteTime": {
|
|
29
|
+
"end_time": "2025-08-16T14:45:49.826601Z",
|
|
30
|
+
"start_time": "2025-08-16T14:44:48.095077Z"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"cell_type": "code",
|
|
34
|
+
"source": [
|
|
35
|
+
"from libadalina_core.sedona_utils import EPSGFormats\n",
|
|
36
|
+
"from clustering.algorithms import clustering_algorithm\n",
|
|
37
|
+
"from clustering.models.adalina_zoning_distance import ClusteringDistance\n",
|
|
38
|
+
"\n",
|
|
39
|
+
"clustering_solution = clustering_algorithm(\n",
|
|
40
|
+
" clustering_df,\n",
|
|
41
|
+
" epsg=EPSGFormats.EPSG32632,\n",
|
|
42
|
+
" k_min=4,\n",
|
|
43
|
+
" k_max=6,\n",
|
|
44
|
+
" distances=[\n",
|
|
45
|
+
" ClusteringDistance(name=\"popolazion\", weight=2, function=\"chebyshev\"),\n",
|
|
46
|
+
" ClusteringDistance(name=\"density\", function=\"euclidean\"),\n",
|
|
47
|
+
" ClusteringDistance(name=\"geometry\"),\n",
|
|
48
|
+
" ],\n",
|
|
49
|
+
")\n",
|
|
50
|
+
"\n",
|
|
51
|
+
"clustering_solution.get_dataframe_to_export().head()"
|
|
52
|
+
],
|
|
53
|
+
"id": "ee24db1241138019",
|
|
54
|
+
"outputs": [
|
|
55
|
+
{
|
|
56
|
+
"name": "stdout",
|
|
57
|
+
"output_type": "stream",
|
|
58
|
+
"text": [
|
|
59
|
+
"Running HiGHS 1.11.0 (git hash: n/a): Copyright (c) 2025 HiGHS under MIT licence terms\n",
|
|
60
|
+
"MIP has 4331 rows; 590 cols; 13367 nonzeros; 590 integer variables (590 binary)\n",
|
|
61
|
+
"Coefficient ranges:\n",
|
|
62
|
+
" Matrix [1e+00, 1e+00]\n",
|
|
63
|
+
" Cost [2e-02, 4e-01]\n",
|
|
64
|
+
" Bound [1e+00, 1e+00]\n",
|
|
65
|
+
" RHS [1e+00, 6e+00]\n",
|
|
66
|
+
"WARNING: User-supplied values fix only 51 / 590 discrete variables, so attempt to complete a feasible solution may be expensive\n",
|
|
67
|
+
"Coefficient ranges:\n",
|
|
68
|
+
" Matrix [1e+00, 1e+00]\n",
|
|
69
|
+
" Cost [2e-02, 4e-01]\n",
|
|
70
|
+
" Bound [1e+00, 1e+00]\n",
|
|
71
|
+
" RHS [1e+00, 6e+00]\n",
|
|
72
|
+
"Presolving model\n",
|
|
73
|
+
"Presolve: Infeasible\n",
|
|
74
|
+
"\n",
|
|
75
|
+
"Src: B => Branching; C => Central rounding; F => Feasibility pump; J => Feasibility jump;\n",
|
|
76
|
+
" H => Heuristic; L => Sub-MIP; P => Empty MIP; R => Randomized rounding; Z => ZI Round;\n",
|
|
77
|
+
" I => Shifting; S => Solve LP; T => Evaluate node; U => Unbounded; X => User solution;\n",
|
|
78
|
+
" z => Trivial zero; l => Trivial lower; u => Trivial upper; p => Trivial point\n",
|
|
79
|
+
"\n",
|
|
80
|
+
" Nodes | B&B Tree | Objective Bounds | Dynamic Constraints | Work \n",
|
|
81
|
+
"Src Proc. InQueue | Leaves Expl. | BestBound BestSol Gap | Cuts InLp Confl. | LpIters Time\n",
|
|
82
|
+
"\n",
|
|
83
|
+
" 0 0 0 0.00% -inf inf inf 0 0 0 0 0.0s\n",
|
|
84
|
+
"\n",
|
|
85
|
+
"Solving report\n",
|
|
86
|
+
" Status Infeasible\n",
|
|
87
|
+
" Primal bound inf\n",
|
|
88
|
+
" Dual bound -inf\n",
|
|
89
|
+
" Gap inf\n",
|
|
90
|
+
" P-D integral 0\n",
|
|
91
|
+
" Solution status -\n",
|
|
92
|
+
" Timing 0.00 (total)\n",
|
|
93
|
+
" 0.00 (presolve)\n",
|
|
94
|
+
" 0.00 (solve)\n",
|
|
95
|
+
" 0.00 (postsolve)\n",
|
|
96
|
+
" Max sub-MIP depth 0\n",
|
|
97
|
+
" Nodes 0\n",
|
|
98
|
+
" Repair LPs 0 (0 feasible; 0 iterations)\n",
|
|
99
|
+
" LP iterations 0 (total)\n",
|
|
100
|
+
" 0 (strong br.)\n",
|
|
101
|
+
" 0 (separation)\n",
|
|
102
|
+
" 0 (heuristics)\n",
|
|
103
|
+
"Presolving model\n",
|
|
104
|
+
"4331 rows, 590 cols, 13367 nonzeros 0s\n",
|
|
105
|
+
"4331 rows, 590 cols, 13367 nonzeros 0s\n",
|
|
106
|
+
"\n",
|
|
107
|
+
"Solving MIP model with:\n",
|
|
108
|
+
" 4331 rows\n",
|
|
109
|
+
" 590 cols (590 binary, 0 integer, 0 implied int., 0 continuous, 0 domain fixed)\n",
|
|
110
|
+
" 13367 nonzeros\n",
|
|
111
|
+
"\n",
|
|
112
|
+
"Src: B => Branching; C => Central rounding; F => Feasibility pump; J => Feasibility jump;\n",
|
|
113
|
+
" H => Heuristic; L => Sub-MIP; P => Empty MIP; R => Randomized rounding; Z => ZI Round;\n",
|
|
114
|
+
" I => Shifting; S => Solve LP; T => Evaluate node; U => Unbounded; X => User solution;\n",
|
|
115
|
+
" z => Trivial zero; l => Trivial lower; u => Trivial upper; p => Trivial point\n",
|
|
116
|
+
"\n",
|
|
117
|
+
" Nodes | B&B Tree | Objective Bounds | Dynamic Constraints | Work \n",
|
|
118
|
+
"Src Proc. InQueue | Leaves Expl. | BestBound BestSol Gap | Cuts InLp Confl. | LpIters Time\n",
|
|
119
|
+
"\n",
|
|
120
|
+
" J 0 0 0 0.00% -inf 2.215701075 Large 0 0 0 0 0.0s\n",
|
|
121
|
+
" 0 0 0 0.00% 0.8924665339 2.215701075 59.72% 0 0 8 122 0.1s\n",
|
|
122
|
+
" C 0 0 0 0.00% 0.9455857403 2.127058346 55.54% 62 20 8 237 0.1s\n",
|
|
123
|
+
" L 0 0 0 0.00% 1.008810593 1.547182779 34.80% 1427 88 8 1252 2.5s\n",
|
|
124
|
+
" 53 1 25 43.16% 1.008810593 1.547182779 34.80% 1013 64 2493 35215 7.6s\n",
|
|
125
|
+
" 230 9 108 66.05% 1.016024304 1.547182779 34.33% 1303 90 8686 68181 12.6s\n",
|
|
126
|
+
" 506 24 240 72.57% 1.018347205 1.547182779 34.18% 2703 101 4951 98204 18.8s\n",
|
|
127
|
+
" 1071 62 495 73.88% 1.032356755 1.547182779 33.28% 2921 107 8945 124851 23.8s\n",
|
|
128
|
+
"\n",
|
|
129
|
+
"Restarting search from the root node\n",
|
|
130
|
+
"Model after restart has 4331 rows, 590 cols (590 bin., 0 int., 0 impl., 0 cont., 0 dom.fix.), and 13367 nonzeros\n",
|
|
131
|
+
"\n",
|
|
132
|
+
" 1736 0 0 0.00% 1.049169002 1.547182779 32.19% 107 0 0 149363 28.7s\n",
|
|
133
|
+
" 1736 0 0 0.00% 1.049169002 1.547182779 32.19% 107 60 6 149538 28.7s\n",
|
|
134
|
+
" 1941 9 96 46.08% 1.049169002 1.547182779 32.19% 2337 102 2671 164422 34.0s\n",
|
|
135
|
+
" 2917 45 561 57.00% 1.049169002 1.547182779 32.19% 1495 102 8351 188454 39.0s\n",
|
|
136
|
+
" 3899 89 1023 57.01% 1.068898115 1.547182779 30.91% 1644 104 9051 211733 44.0s\n",
|
|
137
|
+
" 4782 124 1440 57.03% 1.081764872 1.547182779 30.08% 2993 101 9310 235841 49.0s\n",
|
|
138
|
+
" 5646 149 1855 75.27% 1.081764872 1.547182779 30.08% 4324 109 9144 258096 54.1s\n",
|
|
139
|
+
" 6427 174 2230 75.35% 1.109967053 1.547182779 28.26% 4452 131 9713 280957 59.1s\n",
|
|
140
|
+
" 6615 183 2319 75.35% 1.109967053 1.547182779 28.26% 4426 119 9181 285988 60.0s\n",
|
|
141
|
+
"\n",
|
|
142
|
+
"Solving report\n",
|
|
143
|
+
" Status Time limit reached\n",
|
|
144
|
+
" Primal bound 1.54718277863\n",
|
|
145
|
+
" Dual bound 1.10996705301\n",
|
|
146
|
+
" Gap 28.26% (tolerance: 0.01%)\n",
|
|
147
|
+
" P-D integral 19.8590086477\n",
|
|
148
|
+
" Solution status feasible\n",
|
|
149
|
+
" 1.54718277863 (objective)\n",
|
|
150
|
+
" 0 (bound viol.)\n",
|
|
151
|
+
" 5.80276567537e-14 (int. viol.)\n",
|
|
152
|
+
" 0 (row viol.)\n",
|
|
153
|
+
" Timing 60.00 (total)\n",
|
|
154
|
+
" 0.00 (presolve)\n",
|
|
155
|
+
" 0.00 (solve)\n",
|
|
156
|
+
" 0.00 (postsolve)\n",
|
|
157
|
+
" Max sub-MIP depth 3\n",
|
|
158
|
+
" Nodes 6615\n",
|
|
159
|
+
" Repair LPs 0 (0 feasible; 0 iterations)\n",
|
|
160
|
+
" LP iterations 285988 (total)\n",
|
|
161
|
+
" 123788 (strong br.)\n",
|
|
162
|
+
" 7270 (separation)\n",
|
|
163
|
+
" 15773 (heuristics)\n"
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"data": {
|
|
168
|
+
"text/plain": [
|
|
169
|
+
" ID popolazion \\\n",
|
|
170
|
+
"0 ROBECCHETTO CON INDUNO 47.95 \n",
|
|
171
|
+
"1 NOSATE 6.44 \n",
|
|
172
|
+
"2 BERNATE TICINO 29.41 \n",
|
|
173
|
+
"3 CUGGIONO 80.79 \n",
|
|
174
|
+
"4 TURBIGO 71.06 \n",
|
|
175
|
+
"\n",
|
|
176
|
+
" geometry usable beds personnel \\\n",
|
|
177
|
+
"0 POLYGON ((480748.825 5043027.556, 480748.825 5... NaN NaN NaN \n",
|
|
178
|
+
"1 POLYGON ((477387.977 5043229.078, 477387.977 5... NaN NaN NaN \n",
|
|
179
|
+
"2 POLYGON ((487458.22 5036059.092, 487458.22 503... NaN NaN NaN \n",
|
|
180
|
+
"3 POLYGON ((486991.876 5038856.062, 486991.876 5... NaN NaN NaN \n",
|
|
181
|
+
"4 POLYGON ((480748.826 5043027.557, 480748.826 5... NaN NaN NaN \n",
|
|
182
|
+
"\n",
|
|
183
|
+
" density zoning_Adalina \n",
|
|
184
|
+
"0 0.034325 6 \n",
|
|
185
|
+
"1 0.013081 18 \n",
|
|
186
|
+
"2 0.024243 10 \n",
|
|
187
|
+
"3 0.054359 6 \n",
|
|
188
|
+
"4 0.083216 6 "
|
|
189
|
+
],
|
|
190
|
+
"text/html": [
|
|
191
|
+
"<div>\n",
|
|
192
|
+
"<style scoped>\n",
|
|
193
|
+
" .dataframe tbody tr th:only-of-type {\n",
|
|
194
|
+
" vertical-align: middle;\n",
|
|
195
|
+
" }\n",
|
|
196
|
+
"\n",
|
|
197
|
+
" .dataframe tbody tr th {\n",
|
|
198
|
+
" vertical-align: top;\n",
|
|
199
|
+
" }\n",
|
|
200
|
+
"\n",
|
|
201
|
+
" .dataframe thead th {\n",
|
|
202
|
+
" text-align: right;\n",
|
|
203
|
+
" }\n",
|
|
204
|
+
"</style>\n",
|
|
205
|
+
"<table border=\"1\" class=\"dataframe\">\n",
|
|
206
|
+
" <thead>\n",
|
|
207
|
+
" <tr style=\"text-align: right;\">\n",
|
|
208
|
+
" <th></th>\n",
|
|
209
|
+
" <th>ID</th>\n",
|
|
210
|
+
" <th>popolazion</th>\n",
|
|
211
|
+
" <th>geometry</th>\n",
|
|
212
|
+
" <th>usable</th>\n",
|
|
213
|
+
" <th>beds</th>\n",
|
|
214
|
+
" <th>personnel</th>\n",
|
|
215
|
+
" <th>density</th>\n",
|
|
216
|
+
" <th>zoning_Adalina</th>\n",
|
|
217
|
+
" </tr>\n",
|
|
218
|
+
" </thead>\n",
|
|
219
|
+
" <tbody>\n",
|
|
220
|
+
" <tr>\n",
|
|
221
|
+
" <th>0</th>\n",
|
|
222
|
+
" <td>ROBECCHETTO CON INDUNO</td>\n",
|
|
223
|
+
" <td>47.95</td>\n",
|
|
224
|
+
" <td>POLYGON ((480748.825 5043027.556, 480748.825 5...</td>\n",
|
|
225
|
+
" <td>NaN</td>\n",
|
|
226
|
+
" <td>NaN</td>\n",
|
|
227
|
+
" <td>NaN</td>\n",
|
|
228
|
+
" <td>0.034325</td>\n",
|
|
229
|
+
" <td>6</td>\n",
|
|
230
|
+
" </tr>\n",
|
|
231
|
+
" <tr>\n",
|
|
232
|
+
" <th>1</th>\n",
|
|
233
|
+
" <td>NOSATE</td>\n",
|
|
234
|
+
" <td>6.44</td>\n",
|
|
235
|
+
" <td>POLYGON ((477387.977 5043229.078, 477387.977 5...</td>\n",
|
|
236
|
+
" <td>NaN</td>\n",
|
|
237
|
+
" <td>NaN</td>\n",
|
|
238
|
+
" <td>NaN</td>\n",
|
|
239
|
+
" <td>0.013081</td>\n",
|
|
240
|
+
" <td>18</td>\n",
|
|
241
|
+
" </tr>\n",
|
|
242
|
+
" <tr>\n",
|
|
243
|
+
" <th>2</th>\n",
|
|
244
|
+
" <td>BERNATE TICINO</td>\n",
|
|
245
|
+
" <td>29.41</td>\n",
|
|
246
|
+
" <td>POLYGON ((487458.22 5036059.092, 487458.22 503...</td>\n",
|
|
247
|
+
" <td>NaN</td>\n",
|
|
248
|
+
" <td>NaN</td>\n",
|
|
249
|
+
" <td>NaN</td>\n",
|
|
250
|
+
" <td>0.024243</td>\n",
|
|
251
|
+
" <td>10</td>\n",
|
|
252
|
+
" </tr>\n",
|
|
253
|
+
" <tr>\n",
|
|
254
|
+
" <th>3</th>\n",
|
|
255
|
+
" <td>CUGGIONO</td>\n",
|
|
256
|
+
" <td>80.79</td>\n",
|
|
257
|
+
" <td>POLYGON ((486991.876 5038856.062, 486991.876 5...</td>\n",
|
|
258
|
+
" <td>NaN</td>\n",
|
|
259
|
+
" <td>NaN</td>\n",
|
|
260
|
+
" <td>NaN</td>\n",
|
|
261
|
+
" <td>0.054359</td>\n",
|
|
262
|
+
" <td>6</td>\n",
|
|
263
|
+
" </tr>\n",
|
|
264
|
+
" <tr>\n",
|
|
265
|
+
" <th>4</th>\n",
|
|
266
|
+
" <td>TURBIGO</td>\n",
|
|
267
|
+
" <td>71.06</td>\n",
|
|
268
|
+
" <td>POLYGON ((480748.826 5043027.557, 480748.826 5...</td>\n",
|
|
269
|
+
" <td>NaN</td>\n",
|
|
270
|
+
" <td>NaN</td>\n",
|
|
271
|
+
" <td>NaN</td>\n",
|
|
272
|
+
" <td>0.083216</td>\n",
|
|
273
|
+
" <td>6</td>\n",
|
|
274
|
+
" </tr>\n",
|
|
275
|
+
" </tbody>\n",
|
|
276
|
+
"</table>\n",
|
|
277
|
+
"</div>"
|
|
278
|
+
]
|
|
279
|
+
},
|
|
280
|
+
"execution_count": 2,
|
|
281
|
+
"metadata": {},
|
|
282
|
+
"output_type": "execute_result"
|
|
283
|
+
}
|
|
284
|
+
],
|
|
285
|
+
"execution_count": 2
|
|
286
|
+
}
|
|
287
|
+
],
|
|
288
|
+
"metadata": {},
|
|
289
|
+
"nbformat": 4,
|
|
290
|
+
"nbformat_minor": 5
|
|
291
|
+
}
|