Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pyTSPrf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XCG
pyTSPrf
Commits
6ff17ee8ce2a
Commit
6ff17ee8ce2a
authored
9 years ago
by
Patrice Journoud
Browse files
Options
Downloads
Patches
Plain Diff
suppression de l'argument superflu no_tsp
parent
f5f980497838
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
development.ini.sample
+73
-0
73 additions, 0 deletions
development.ini.sample
pytsprf/osrm/osrmviaroute.py
+5
-4
5 additions, 4 deletions
pytsprf/osrm/osrmviaroute.py
pytsprf/views.py
+2
-3
2 additions, 3 deletions
pytsprf/views.py
with
80 additions
and
7 deletions
development.ini.sample
0 → 100644
+
73
−
0
View file @
6ff17ee8
###
# app configuration
# http://docs.pylonsproject.org/projects/pyramid/en/1.5-branch/narr/environment.html
###
[app:main]
use = egg:pytsprf
pyramid.reload_templates = true
pyramid.debug_authorization = false
pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.default_locale_name = en
pyramid.includes =
pyramid_debugtoolbar
pyramid_tm
sqlalchemy.url = sqlite:///%(here)s/db.sqlite3
osrm.hostname=osrm.recette.xcg.global
osrm.scheme=http
# By default, the toolbar only appears for clients from IP addresses
# '127.0.0.1' and '::1'.
# debugtoolbar.hosts = 127.0.0.1 ::1
###
# wsgi server configuration
###
[server:main]
use = egg:waitress#main
host = 0.0.0.0
port = 6544
###
# logging configuration
# http://docs.pylonsproject.org/projects/pyramid/en/1.5-branch/narr/logging.html
###
[loggers]
keys = root, pytsprf
[handlers]
keys = console, pytsprf
[formatters]
keys = generic
[logger_root]
level = INFO
handlers =
[logger_pytsprf]
level = DEBUG
handlers = pytsprf
qualname = pytsprf
propagate = 0
[handler_pytsprf]
class = FileHandler
args = ('/home/pjournoud/dev/pytsprf_dev/connections.log','a')
level = INFO
formatter = generic
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(asctime)s - %(name)s - %(levelname)s - %(message)s
This diff is collapsed.
Click to expand it.
pytsprf/osrm/osrmviaroute.py
+
5
−
4
View file @
6ff17ee8
...
...
@@ -51,6 +51,7 @@
url
=
"
%s://%s/viaroute?
"
%
(
self
.
scheme
,
self
.
host
,)
# i = 0
i
=
0
npoints
=
len
(
points
)
for
pointi
in
points
:
url
+=
"
loc=%s,%s
"
%
(
pointi
[
0
],
pointi
[
1
],)
...
...
@@ -55,8 +56,8 @@
for
pointi
in
points
:
url
+=
"
loc=%s,%s
"
%
(
pointi
[
0
],
pointi
[
1
],)
#
if (i <
len(
points
)
- 1):
#
url += "?"
#
i+=1
if
(
i
<
n
points
-
1
):
url
+=
"
?
"
i
+=
1
url
+=
"
?compression=false
"
...
...
This diff is collapsed.
Click to expand it.
pytsprf/views.py
+
2
−
3
View file @
6ff17ee8
...
...
@@ -204,7 +204,6 @@
solver
=
TSP
(
points
,
get_distance
,
no_tsp
=
True
,
start
=
start
,
end
=
end
)
...
...
@@ -219,7 +218,7 @@
return
viaroute
.
get_viaroute
(
ordered_points
)
def
connections
_logging
(
request
):
def
log_
connections
(
request
):
"""
This log allows to trace User connections for further
...
...
@@ -242,7 +241,7 @@
# a log allows to trace User connections for further statistical reports
connections
_logging
(
request
)
log_
connections
(
request
)
requestDataDict
=
request
.
json
points
=
convert_to_points
(
requestDataDict
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment