Comments (7)
@zhuang-hao-ming
I have pushed the parallel computing version as ubodt_gen_omp
. Currently only csv
format is supported.
from fmm.
@zhuang-hao-ming
I have never encountered a problem like this. In principle, the number of points within a trajectory should not affect the performance so I guess the reason could be something else.
Would you mind sending me the network and gps data you tested so I can check it further?
My email is [email protected]
from fmm.
@cyang-kth
Thank you for your reply.
I have sent my data to your email.
By the way, I once implemented a version that uses postgis to select candidate points and networkx to do the shortest distance calculation (with cutoff). The efficiency is similar to the result on the screenshot.
So I expect fmm to have good performance on my data and look forward to your good news.
from fmm.
I think that I have figured out the problem. There are two reasons.
(1) Hashtable problem
The primary one is the nhash
configuration setting in your mm_config,xml file.
It defines the number of buckets in the UBODT. In your setting it is 5000.
In your log, there should be one line below
Number of rows read 34114078
Estimated load factor #elements/#tablebuckets 6822.82
*** Warning, load factor is too large.
It implies that each bucket contains 6800 elements on average so each search need to iterate through an array in size of 6800, which is extremely inefficient.
That value should be set as a large prime number.
After I change it to 5178049, the speed is reported as
=============================
MM process finished
Time takes 30.76
Finish map match total points 2276 and points matched 2087
Matched percentage: 0.91696
Point match speed:67.8479pt/s
Clean UBODT
Clean UBODT finished
Cleaning network
Cleaning network finished
------------ Program finished ------------
With 5000 of nhash, the log on my desktop is
=============================
MM process finished
Time takes 52.565
Finish map match total points 2276 and points matched 2087
Matched percentage: 0.91696
Point match speed:39.7032pt/s
Clean UBODT
Clean UBODT finished
Cleaning network
Cleaning network finished
------------ Program finished ------------
The speed increases but is still slow because of the second reason.
(2) Large amount of time spent in reading UBODT
Almost all the 30 seconds are spent in reading UBODT, after I report the time after reading input, the log is
=============================
MM process finished
Time takes 30.85
Time takes excluding input 0.07
Finish map match total points 2276 and points matched 2087
Matched percentage: 0.91696
Point match speed:67.6499pt/s
Point match speed (excluding input): 29814.3pt/s
Clean UBODT
Clean UBODT finished
Cleaning network
Cleaning network finished
------------ Program finished ------------
I think we may need to have a correction on the performance report to really report the matching speed.
from fmm.
Some notes on improving the performance:
- Try binary ubodt instead of csv, which takes much shorter time to read input
- Run parallel program postfixed with
_omp
which is likely to substaintally improve the speed of precomputation and map matching.
The parallel map matching function is recently added to the repo.
I have also implemented a parallel ubodt precomputation program but I need to test and document it. I will upload the codes in the near future.
from fmm.
Thank you very much for your efforts.
What a detailed explanation.
I will experiment on my own and then feed back the results.
from fmm.
Thank you very much for your help.
After changing nhash, performance has improved dramatically.
MM process finished
Time takes 89.843
Finish map match total points 414949 and points matched 396610
Matched percentage: 0.955804
Point match speed:4414.48pt/s
Clean UBODT
Clean UBODT finished
Cleaning network
Cleaning network finished
However, my speed is not as fast as yours.
I think this may be due to my compiler under the windows operating system.
But this speed is already acceptable.
😃
from fmm.
Related Issues (20)
- Could we get (Matched edge index,indices) via command line approach
- can NOT run command "make .." under miniconda3 virtual environment
- Unable to perform python fmm_test.py on Win10 Home (64bit) with cygwin environment HOT 9
- error HOT 1
- Error when trying to execute GPS track / GPS points in CSV file HOT 3
- codes of python (fmm_example.ipynb) cannot output file with ogeom information since the result_config.output_config has no attribute of "write_ogeom"
- cpath and mgeom unmatched HOT 3
- Import error when running fmm_test.py
- make error HOT 2
- How to output duration
- Segmentation fault (core dumped) when constructing Network
- Build Error HOT 3
- cpath has multiple paths
- Strange Matching Results with Circles or Multiple Routes
- cmake报错
- Python API ImportError fmm related
- typedef std::conditional_t HOT 1
- "Cannot find proj.db" issue HOT 1
- build issue - make HOT 2
- CMakeLists.txt doesn't exist HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fmm.