- 已有的數(shù)據(jù)用過沒有保存好娜遵,要用又要重新安裝估灿,重新編程麦向。非常麻煩子檀。
- 下載源數(shù)據(jù)從這個網(wǎng)站:bstabler/TransportationNetworks
- net file已經(jīng)轉(zhuǎn)換好了祷膳。
- 下面是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不是字節(jié),因為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 完成輸入
怎么調(diào)堆棧咖气?屬性挨措,連接器,系統(tǒng)崩溪,保留大小浅役。 - 75379 link,6.1mb伶唯,至少安排5500000的椌跫龋空間。
- Sydney(75379) txt file,3.4mb