方法来存储在Matlab中非常大的数据结构 [英] Method to store very large data structures in Matlab

查看:435
本文介绍了方法来存储在Matlab中非常大的数据结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有英格兰6000起点 - 终点位置对。对于每一对,我需要找到从原产地到目的地的最短路径。最短路径算法作为输入底层道路网络和一个OD对各环节的细节(节点的纬度和经度,道路链路长度与不重复ID)。

的底层道路netwrk链接的数量为4091065.我​​读了路网,并将其存储结构的阵列,再presenting一个环节每一个元素并将其保存在一个文件.MAT。正如你所看到的数据的大小变得太大和Matlab耗尽内存。

我会为gratefull方法来让自己解决这个问题。增加内存似乎并没有多大帮助。

感谢


解决方案

  

的最短路径算法需要输入详细信息(纬度节点
  和经度,道路链路长度和各个环节的唯一身份标识)
  底层道路网络和一个OD对。


当然,你可以限制你需要加载路网的数量。所有4091065链接不会被需要 - 如果你从特鲁罗去伦敦的最短路径是不可能通过纽约绕道而行

因此​​,而不是一个单一的文件,你可以写一个preprocessor一个决定,你需要一个给定的OD对并加载到这一点的格式,你需要(可选存储然后存储子集公路网的什么子集在一个* .MAT'文件或一些其他格式,如果你认为你会想尝试对同一数据的算法有一些变化)。

I have 6000 origin-destination location pairs of England. For each pair I need to find the shortest path from a origin to a destination. The shortest path algorithm takes as input the details (node latitude and longitude, road link length and uniques id) of each link of the underlying road network and one OD pair.

The number of links on the underlying road netwrk is 4091065. I read the road network and store it in a array of structures with each element representing one link and save it in a .mat file . As you can see the size of data become too much and Matlab runs out of memory.

I would be gratefull for methods to get myself around this problem. Increasing the memory does not seem to help much.

Thanks

解决方案

The shortest path algorithm takes as input the details (node latitude and longitude, road link length and uniques id) of each link of the underlying road network and one OD pair.

Surely you can limit the amount of the road network you need to load. All 4091065 links aren't going to be needed - if you're going from Truro to London the shortest path is unlikely to take a detour through York.

Therefore, rather than having a single file, you could write a preprocessor that decides what subset of the road network you require for a given OD pair and loads that into the format you require (optionally storing then storing that subset in a '*.mat' file or some other format if you think you'll want to try a few variations of the algorithm on the same data).

这篇关于方法来存储在Matlab中非常大的数据结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆