数据预处理-link data and stack overflow

  1. 已有的数据用过没有保存好,要用又要重新安装,重新编程。非常麻烦。
  2. 下载源数据从这个网站:bstabler/TransportationNetworks
  3. net file已经转换好了。
  4. 下面是OD file
  5. 测试成功fopen_s and fscanf_s的用法
FILE *fp1, *WriteFile;
errno_t err,err2;//*difference
//difference is: err=fopen_s(&fp1....!=0
//critical: !=0
if ((err = fopen_s(&fp1,"C:\\net.txt", "r")) != 0) {
        printf("can not opennet.txt");
        getchar();
        return;
    }
int a = 0;
// fscanf_s....
fscanf_s(fp1, "%d", &a);
printf("%d\n",a);

C:\TEST\SourceNet\, put in the deeper folder, succeed
1 2 25900.20064 6 6 0.15 4 0 0 1 ;
input only one line, succeed
input two lines, succeed.
output is also succeed.
test the siouxfalls is also succeed.
test the whole 76 links, succeed.
so, the whole code is saved.

  1. SixousFalls completed, the next case is Anaheim
    we just need to set a parameter: how many links are there
    and change the file name
    succeed.
  2. the next case is Winnipeg, 2836 links
    succeed, also I see the memory, 1MB
  3. Chicago sketch 2950links
    succeed
    1 MB
  4. Austin 18961 links
    6000, 1.3MB
    10000,1.6MB
    12000,1.7
    14000, 1.9
    15000,stackoverflow
    stack 保留
    32768,1000,968kb
    2000,1mb
    3000,1.1mb
    5000, failed
    627680
    5000,1.3MB
    999999
    10000,1.6MB
    999999不是字节,因为999999byte=976kb,小于1MB
    9999999
    15000,1.9mb
    18961,2.2mb
    succeed
    stack commit 尝试999999没用。
  5. next is Sydney net
    Sydney net has 75379 links
    9999999 7
    1000, 992kb
    5000,1.2MB
    10000,1.6MB
    15000,1.9mb
    18961,2.2mb, succeed
    20000,2.3mb
    25000,2.6mb
    30000,3.0mb
    35000,3.3mb
    40000,3.6mb
    45000,4.0mb
    50000,4.3mb
    55000,4.7mb
    60000,5.0mb
    65000,5.4mb
    70000,5.7mb
    75000,6.1mb
    75379,6.1mb,5500000
  6. Sydney net 完成输入
    怎么调堆栈?属性,连接器,系统,保留大小。
  7. 75379 link,6.1mb,至少安排5500000的栈空间。
  8. Sydney(75379) txt file,3.4mb

你可能感兴趣的:(数据预处理-link data and stack overflow)