98年全國(guó)大學(xué)生數(shù)學(xué)建模競(jìng)賽B題“水災(zāi)巡視問(wèn)題”,是一個(gè)推銷員問(wèn)題,本題有53個(gè)點(diǎn),所有可能性大約為exp(53),目前沒(méi)有好方法求出精確解,既然求不出精確解,我們使用模擬退火法求出一個(gè)較優(yōu)解,將所有結(jié)點(diǎn)編號(hào)為1到53,1到53的排列就是系統(tǒng)的結(jié)構(gòu),結(jié)構(gòu)的變化規(guī)則是:從1到53的排列中隨機(jī)選取一個(gè)子排列,將其反轉(zhuǎn)或?qū)⑵湟浦亮硪惶?能量E自然是路徑總長(zhǎng)度。具體算法描述如下:步1: 設(shè)定初始溫度T,給定一個(gè)初始的巡視路線。步2 :步3 --8循環(huán)K次步3:步 4--7循環(huán)M次步4:隨機(jī)選擇路線的一段步5:隨機(jī)確定將選定的路線反轉(zhuǎn)或移動(dòng),即兩種調(diào)整方式:反轉(zhuǎn)、移動(dòng)。步6:計(jì)算代價(jià)D,即調(diào)整前后的總路程的長(zhǎng)度之差步7:按照如下規(guī)則確定是否做調(diào)整:如果D0,則按照EXP(-D/T)的概率進(jìn)行調(diào)整步8:T*0.9-->T,降溫
標(biāo)簽: 大學(xué)生 數(shù)學(xué)建模 巡視 競(jìng)賽
上傳時(shí)間: 2015-03-14
上傳用戶:himbly
車牌定位---VC++源代碼程序 1.24位真彩色->256色灰度圖。 2.預(yù)處理:中值濾波。 3.二值化:用一個(gè)初始閾值T對(duì)圖像A進(jìn)行二值化得到二值化圖像B。 初始閾值T的確定方法是:選擇閾值T=Gmax-(Gmax-Gmin)/3,Gmax和Gmin分別是最高、最低灰度值。 該閾值對(duì)不同牌照有一定的適應(yīng)性,能夠保證背景基本被置為0,以突出牌照區(qū)域。 4.削弱背景干擾。對(duì)圖像B做簡(jiǎn)單的相鄰像素灰度值相減,得到新的圖像G,即Gi,j=|Pi,j-Pi,j-1|i=0,1,…,439 j=0,1,…,639Gi,0=Pi,0,左邊緣直接賦值,不會(huì)影響整體效果。 5.用自定義模板進(jìn)行中值濾波 區(qū)域灰度基本被賦值為0。考慮到文字是由許多短豎線組成,而背景噪聲有一大部分是孤立噪聲,用模板(1,1,1,1,1)T對(duì)G進(jìn)行中值濾波,能夠得到除掉了大部分干擾的圖像C。 6.牌照搜索:利用水平投影法檢測(cè)車牌水平位置,利用垂直投影法檢測(cè)車牌垂直位置。 7.區(qū)域裁剪,截取車牌圖像。
上傳時(shí)間: 2013-11-26
上傳用戶:懶龍1988
Implemented BFS, DFS and A* To compile this project, use the following command: g++ -o search main.cpp Then you can run it: ./search The input is loaded from a input file in.txt Here is the format of the input file: The first line of the input file shoud contain two chars indicate the source and destination city for breadth first and depth first algorithm. The second line of input file shoud be an integer m indicate the number of connections for the map. Following m lines describe the map, each line represents to one connection in this form: dist city1 city2, which means there is a connection between city1 and city2 with the distance dist. The following input are for A* The following line contains two chars indicate the source and destination city for A* algorithm. Then there is an integer h indicate the number of heuristic. The following h lines is in the form: city dist which means the straight-line distance from the city to B is dist.
標(biāo)簽: Implemented following compile command
上傳時(shí)間: 2014-01-01
上傳用戶:lhc9102
基于事件驅(qū)動(dòng)的串口通訊控件 消息幀數(shù)據(jù)格式: 1 0 A B X X 其中 10 為消息標(biāo)識(shí), AB表示文本長(zhǎng)度,L=A*100+B XX為配位字符,任意 控制幀數(shù)據(jù)格式 0 1 A B M N 其中 01為控制標(biāo)識(shí), AB為請(qǐng)求標(biāo)識(shí) MN為附加標(biāo)識(shí) 11表示請(qǐng)求對(duì)方接收文件,M表示描述字串中文件名子串的長(zhǎng)度 N表示描述字串中文件大小子串的長(zhǎng)度 10通知對(duì)方放棄傳輸 00通知文件傳輸完畢 01請(qǐng)求對(duì)方發(fā)送數(shù)據(jù), MN為10請(qǐng)求發(fā)送下一個(gè) MN為00請(qǐng)求重發(fā) 數(shù)據(jù)幀數(shù)據(jù)格式 0 0 A B M N 其中 00 為數(shù)據(jù)標(biāo)識(shí), AB表示數(shù)據(jù)長(zhǎng)度,L=A*100+B MN為校驗(yàn),M*100+N=A+B
標(biāo)簽: 100 幀 數(shù)據(jù)格式 10
上傳時(shí)間: 2015-10-06
上傳用戶:拔絲土豆
B樹及其B+樹的實(shí)現(xiàn)代碼,支持模版(數(shù)據(jù)類型,M值)
上傳時(shí)間: 2016-02-22
上傳用戶:jhksyghr
A* sudo sudo/* B* adduser script adduser C* rmuser script rmuser E* tout tout/* F* dumdum dumdum G* lostfile lostfile H* Mkfl.localsys Makefile.localsys I* spacegripe spacegripe J* sendmail.cf sendmail.cf N* remote remote.c O* distributed conrol distrib/* P* hosts and name server makerevhosts Q* xargs xargs/*
標(biāo)簽: adduser script rmuser sudo
上傳時(shí)間: 2016-03-29
上傳用戶:gxrui1991
高斯-塞德爾迭代法算法: 設(shè)方程組AX=b 的系數(shù)矩陣的對(duì)角線元素 ,M為迭代次數(shù)容許的最大值, 為容許誤差。 ① 取初始向量 ,令k=0 ② 對(duì) 計(jì)算 ③ 如果 ,則輸出 ,結(jié)束;否則執(zhí)行④, ④ 如果 ,則不收斂,終止程序;否則 ,轉(zhuǎn)②。
上傳時(shí)間: 2014-01-22
上傳用戶:集美慧
5.22④ 假設(shè)系數(shù)矩陣A和B均以三元組表作為存儲(chǔ)結(jié)構(gòu)。 試寫出滿足以下條件的矩陣相加的算法:假設(shè)三元組表A 的空間足夠大,將矩陣B加到矩陣A上,不增加A、B之外 的附加空間,你的算法能否達(dá)到O(m+n)的時(shí)間復(fù)雜度?其 中m和n分別為A、B矩陣中非零元的數(shù)目。
上傳時(shí)間: 2013-12-13
上傳用戶:coeus
DESCRIPTION : BIN to seven segments converter -- segment encoding -- a -- +---+ -- f | | b -- +---+ <- g -- e | | c -- +---+ -- d -- Enable (EN) active : high -- Outputs (data_out) active : low
標(biāo)簽: DESCRIPTION converter segments encoding
上傳時(shí)間: 2016-08-17
上傳用戶:ainimao
3.畫橢圓ellipse 4.利用ellipse and rectangle 畫圖 5.一個(gè)最優(yōu)美的圖案 6.輸入3個(gè)數(shù)a,b,c,按大小順序輸出 :輸入數(shù)組,最大的與第一個(gè)元素交換,最小的與最后一個(gè)元素交換,輸出數(shù)組。 7.有n個(gè)整數(shù),使其前面各數(shù)順序向后移m個(gè)位置,最后m個(gè)數(shù)變成最前面的m個(gè)數(shù)
標(biāo)簽: ellipse rectangle and 橢圓
上傳時(shí)間: 2016-11-16
上傳用戶:royzhangsz
蟲蟲下載站版權(quán)所有 京ICP備2021023401號(hào)-1