使用C#程式語言開發(fā),並執(zhí)行於.NET Framework下;是研習「蟻拓尋優(yōu)法」不可或缺的軟體工具。系統(tǒng)使用ACO (Ant Colony Optimization)演算公式模擬螞蟻的覓食行徑抉擇。使用者可以設定費洛蒙和食物氣味強度等相關參數(shù)以及動態(tài)設定障礙物的位置和形狀,研習螞蟻覓食的最短路徑形成過程。研習各種參數(shù)設定對螞蟻覓食行為的影響,了解費落蒙機制對蟻拓尋優(yōu)化法的影響。本系統(tǒng)可支援柔性計算教學,研習蟻拓優(yōu)化法中人工螞蟻的隨機搜尋模式和啟發(fā)式法則設計原理。
標簽: 程式
上傳時間: 2013-12-24
上傳用戶:anng
在室內(nèi)環(huán)境中可結合式子母機器人系統(tǒng),子機為一多功能平臺,可放置各種家庭所需之設備,而母機為一輪式機器人,經(jīng)由兩者的結合,可提供高機動性與多功能的服務。在結合的技術面,傳統(tǒng)的吸塵器機器人與充電站之間的導航系統(tǒng)使用紅外線感測作為依據(jù),當兩者間有障礙物阻擋時,紅外線感測器導航系統(tǒng)將會失效。因此本系統(tǒng)利用聲源方向做為機器人決定移動方向的依據(jù),由於聲波傳遞的特性,即使在有障礙物的情況下,依然可以有效地偵測。此外,在移動的過程中,本系統(tǒng)利用光流偵測法判斷是否遭遇障礙物或是利用Support Vector Machine分類判斷與聲源之間為是否有障礙物的阻隔;若發(fā)現(xiàn)前方有障礙物,則啟動避障策略,用有效的方式繼續(xù)往目標移動。最後,當母機接近子機時,可根據(jù)多種紅外線感測器資訊進行子母機器人的結合,結合成功後,母機將可搭載子機成為一自由行動之機器人。
標簽: 系統(tǒng)
上傳時間: 2013-12-19
上傳用戶:mhp0114
幫助系統(tǒng)工程師,設計者,管理者在電視廣播上可以順利的傳輸類比訊號至數(shù)位訊號之基礎技術
上傳時間: 2014-01-07
上傳用戶:lht618
基于VB實現(xiàn)PC機與單片機的串行通訊 隨著計算機技術尤其是單片微型機技術的發(fā)展,人們已越來越多地采用單片機來對一些工業(yè)控制系統(tǒng)中如溫度、流量和壓力等參數(shù)進行檢測和控制。PC機具有強大的監(jiān)控和管理功能,而單片機則具有快速及靈活的控制特點,通過PC機的RS-232串行接口與外部設備進行通信,是許多測控系
上傳時間: 2014-01-02
上傳用戶:秦莞爾w
Kullanı lan bazı matlab bilgileri Matlabda kodlar mfile lara yazı lı p kaydedilebilir. Ü st menüden, file, new, mfile. Command windowa yazdı kları nı zı kaydedemezsiniz. Yazdı ğ ı nı z kodu ç alı ş tı rabilmeniz iç in ç alı ş tı ğ ı nı z current directory nin altı na kaydetmelisiniz. Current directory i dosyanı n bulunduğ u yere de gö türebilirsiniz
標簽: 305 bilgileri kaydedile Matlabda
上傳時間: 2014-01-06
上傳用戶:miaochun888
檔案傳輸協(xié)定(FTP)為目前相當普遍與廣泛使用之網(wǎng)路 應用。然而在傳統(tǒng)檔案傳輸協(xié)定之設計下,資料 傳輸透過Out-of-Band(OOB)之機制,意即透過控制頻道(control channel)傳輸指令 ,而實際資料 傳輸則另外透過特定之通訊埠以及TCP連 線,進行 傳送。如此一來 可確保資料 傳輸之可靠與穩(wěn)定性,但另一方面則會造成傳輸率 (throughput)效能低落 。因此,在本計劃中,我們透過使用SCTP協(xié)定並利 用多重串 流 (multi-stream)機制,達到以In-Band機制達成Out-of-Band傳輸之相同效果。在本研究之最後亦透過於開放原始碼系統(tǒng)實作並實際量 測,証
上傳時間: 2013-12-10
上傳用戶:2467478207
此為msp430系列adc的通用程序庫,為西安電子科技大學測控系謝楷老師所寫,通用性。模塊性很強。適合所有430系列使用,僅需更改包含文件
上傳時間: 2017-08-23
上傳用戶:磊子226
大三上學期自己編寫的VB計算器,來自四川大學測控系,高亮亮18380141003 郵箱731396170@qq.com
上傳時間: 2016-06-22
上傳用戶:風為裳的風
實驗源代碼 //Warshall.cpp #include<stdio.h> void warshall(int k,int n) { int i , j, t; int temp[20][20]; for(int a=0;a<k;a++) { printf("請輸入矩陣第%d 行元素:",a); for(int b=0;b<n;b++) { scanf ("%d",&temp[a][b]); } } for(i=0;i<k;i++){ for( j=0;j<k;j++){ if(temp[ j][i]==1) { for(t=0;t<n;t++) { temp[ j][t]=temp[i][t]||temp[ j][t]; } } } } printf("可傳遞閉包關系矩陣是:\n"); for(i=0;i<k;i++) { for( j=0;j<n;j++) { printf("%d", temp[i][ j]); } printf("\n"); } } void main() { printf("利用 Warshall 算法求二元關系的可傳遞閉包\n"); void warshall(int,int); int k , n; printf("請輸入矩陣的行數(shù) i: "); scanf("%d",&k); 四川大學實驗報告 printf("請輸入矩陣的列數(shù) j: "); scanf("%d",&n); warshall(k,n); }
上傳時間: 2016-06-27
上傳用戶:梁雪文以
#include <malloc.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define NULL 0 #define MaxSize 30 typedef struct athletestruct /*運動員*/ { char name[20]; int score; /*分數(shù)*/ int range; /**/ int item; /*項目*/ }ATH; typedef struct schoolstruct /*學校*/ { int count; /*編號*/ int serial; /**/ int menscore; /*男選手分數(shù)*/ int womenscore; /*女選手分數(shù)*/ int totalscore; /*總分*/ ATH athlete[MaxSize]; /**/ struct schoolstruct *next; }SCH; int nsc,msp,wsp; int ntsp; int i,j; int overgame; int serial,range; int n; SCH *head,*pfirst,*psecond; int *phead=NULL,*pafirst=NULL,*pasecond=NULL; void create(); void input () { char answer; head = (SCH *)malloc(sizeof(SCH)); /**/ head->next = NULL; pfirst = head; answer = 'y'; while ( answer == 'y' ) { Is_Game_DoMain: printf("\nGET Top 5 when odd\nGET Top 3 when even"); printf("\n輸入運動項目序號 (x<=%d):",ntsp); scanf("%d",pafirst); overgame = *pafirst; if ( pafirst != phead ) { for ( pasecond = phead ; pasecond < pafirst ; pasecond ++ ) { if ( overgame == *pasecond ) { printf("\n這個項目已經(jīng)存在請選擇其他的數(shù)字\n"); goto Is_Game_DoMain; } } } pafirst = pafirst + 1; if ( overgame > ntsp ) { printf("\n項目不存在"); printf("\n請重新輸入"); goto Is_Game_DoMain; } switch ( overgame%2 ) { case 0: n = 3;break; case 1: n = 5;break; } for ( i = 1 ; i <= n ; i++ ) { Is_Serial_DoMain: printf("\n輸入序號 of the NO.%d (0<x<=%d): ",i,nsc); scanf("%d",&serial); if ( serial > nsc ) { printf("\n超過學校數(shù)目,請重新輸入"); goto Is_Serial_DoMain; } if ( head->next == NULL ) { create(); } psecond = head->next ; while ( psecond != NULL ) { if ( psecond->serial == serial ) { pfirst = psecond; pfirst->count = pfirst->count + 1; goto Store_Data; } else { psecond = psecond->next; } } create(); Store_Data: pfirst->athlete[pfirst->count].item = overgame; pfirst->athlete[pfirst->count].range = i; pfirst->serial = serial; printf("Input name:) : "); scanf("%s",pfirst->athlete[pfirst->count].name); } printf("\n繼續(xù)輸入運動項目(y&n)?"); answer = getchar(); printf("\n"); } } void calculate() /**/ { pfirst = head->next; while ( pfirst->next != NULL ) { for (i=1;i<=pfirst->count;i++) { if ( pfirst->athlete[i].item % 2 == 0 ) { switch (pfirst->athlete[i].range) { case 1:pfirst->athlete[i].score = 5;break; case 2:pfirst->athlete[i].score = 3;break; case 3:pfirst->athlete[i].score = 2;break; } } else { switch (pfirst->athlete[i].range) { case 1:pfirst->athlete[i].score = 7;break; case 2:pfirst->athlete[i].score = 5;break; case 3:pfirst->athlete[i].score = 3;break; case 4:pfirst->athlete[i].score = 2;break; case 5:pfirst->athlete[i].score = 1;break; } } if ( pfirst->athlete[i].item <=msp ) { pfirst->menscore = pfirst->menscore + pfirst->athlete[i].score; } else { pfirst->womenscore = pfirst->womenscore + pfirst->athlete[i].score; } } pfirst->totalscore = pfirst->menscore + pfirst->womenscore; pfirst = pfirst->next; } } void output() { pfirst = head->next; psecond = head->next; while ( pfirst->next != NULL ) { // clrscr(); printf("\n第%d號學校的結果成績:",pfirst->serial); printf("\n\n項目的數(shù)目\t學校的名字\t分數(shù)"); for (i=1;i<=ntsp;i++) { for (j=1;j<=pfirst->count;j++) { if ( pfirst->athlete[j].item == i ) { printf("\n %d\t\t\t\t\t\t%s\n %d",i,pfirst->athlete[j].name,pfirst->athlete[j].score);break; } } } printf("\n\n\n\t\t\t\t\t\t按任意建 進入下一頁"); getchar(); pfirst = pfirst->next; } // clrscr(); printf("\n運動會結果:\n\n學校編號\t男運動員成績\t女運動員成績\t總分"); pfirst = head->next; while ( pfirst->next != NULL ) { printf("\n %d\t\t %d\t\t %d\t\t %d",pfirst->serial,pfirst->menscore,pfirst->womenscore,pfirst->totalscore); pfirst = pfirst->next; } printf("\n\n\n\t\t\t\t\t\t\t按任意建結束"); getchar(); } void create() { pfirst = (struct schoolstruct *)malloc(sizeof(struct schoolstruct)); pfirst->next = head->next ; head->next = pfirst ; pfirst->count = 1; pfirst->menscore = 0; pfirst->womenscore = 0; pfirst->totalscore = 0; } void Save() {FILE *fp; if((fp = fopen("school.dat","wb"))==NULL) {printf("can't open school.dat\n"); fclose(fp); return; } fwrite(pfirst,sizeof(SCH),10,fp); fclose(fp); printf("文件已經(jīng)成功保存\n"); } void main() { system("cls"); printf("\n\t\t\t 運動會分數(shù)統(tǒng)計\n"); printf("輸入學校數(shù)目 (x>= 5):"); scanf("%d",&nsc); printf("輸入男選手的項目(x<=20):"); scanf("%d",&msp); printf("輸入女選手項目(<=20):"); scanf("%d",&wsp); ntsp = msp + wsp; phead = (int *)calloc(ntsp,sizeof(int)); pafirst = phead; pasecond = phead; input(); calculate(); output(); Save(); }
標簽: 源代碼
上傳時間: 2016-12-28
上傳用戶:150501