- 已有的数据用过没有保存好,要用又要重新安装,重新编程。非常麻烦。
- 下载源数据从这个网站:bstabler/TransportationNetworks
- net file已经转换好了。
- 下面是OD file
- 测试成功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.
- 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. - the next case is Winnipeg, 2836 links
succeed, also I see the memory, 1MB - Chicago sketch 2950links
succeed
1 MB - 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没用。 - 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 - Sydney net 完成输入
怎么调堆栈?属性,连接器,系统,保留大小。 - 75379 link,6.1mb,至少安排5500000的栈空间。
- Sydney(75379) txt file,3.4mb