Lucifer님의 프로필Lucifer사진블로그리스트 도구 도움말

Lucifer

人生一世 草木一秋

部分名单

获奖名单(转载自http://www.shumo.com/npmcm/2009/2009.html)中国数学建模

1037804安徽财经大学回旋李宏亮王晓明二等奖
1037802安徽财经大学晋宗义徐中生李璐二等奖
1035701安徽大学陶志富徐慧洪振木二等奖
1140705北方民族大学刘运涛王波胡光敏二等奖
1000507北京工业大学蔡华元文雯宋阳阳二等奖
1000622北京航空航天大学廖冉周循胡爽二等奖
1000415北京交通大学王抒张田申昊二等奖
1000411北京交通大学张羽书陈欣郭辉二等奖
1000802北京科技大学铁铮李晓洁苏婕妤二等奖
1000707北京理工大学佟松龄周凯王冬二等奖
1194108长安大学吴初娜张春虎孙治华二等奖
1015006大连交通大学常静姜斐马朋云二等奖
9006810第二炮兵工程学院刘伯宁李马戍范锐锐二等奖
9006803第二炮兵工程学院刘博武健张金巍二等奖
9006801第二炮兵工程学院李明雨李德龙郑重二等奖
1014505东北大学潘娟娟梁海明张微二等奖
1014506东北大学孔维健唐艳杰侯兴华二等奖
1014508东北大学印雨刘爱丽李秋婷二等奖
1018805东北电力大学刘洋吴希牛新宇二等奖
1022501东北林业大学吴红波尹鹏达孙广山二等奖
1025530东华大学扈聪彭乐乐乔海洋二等奖
1025502东华大学朱武韩璐张武斌二等奖
1025537东华大学牛凤芹王娜邱琳强二等奖
1025523东华大学顾雪霏陈良朱苞蕾二等奖
1025507东华大学傅彧哲曹赟陈亮二等奖
1025506东华大学薛严冬李效白赵洋二等奖
1025521东华大学严伟锋付银萍武江伟二等奖
1025517东华大学杨春吕晓洲张民二等奖
1025535东华大学陈凌晖游佳敏朱星垠二等奖
1025539东华大学陈成陈波史冬冬二等奖
1025503东华大学李莺莺何富祥郭崇滨二等奖
1025529东华大学罗曼曹祺乔奕二等奖
1028654东南大学胡永舜施飞陈雄二等奖
1028630东南大学李喆安媛媛龚挺二等奖
1028637东南大学张艳芳郝圆圆刘万福二等奖
1028644东南大学张艳张鹏张维维二等奖
1028605东南大学谢豪党建郭林二等奖
1028631东南大学霍元恺吴金铃肖俊二等奖
1028657东南大学朱忆邱雷宋康二等奖
1028603东南大学王骏李传佑杨俊二等奖
1028602东南大学姚瑞孙元凯王晓建二等奖
1038602福州大学廖尚斌唐陈兴阮小温二等奖
1191103广东工业大学辜方清杨俊杰张苏弦二等奖
1060301广西师范学院韦师苏韩胡莎莎二等奖
9000224国防科技大学瞿师曾向荣袁金平二等奖
9000235国防科技大学吴振东陆宏亮黄訸二等奖
9000243国防科技大学党朝辉许睿谢堂涛二等奖
9000203国防科技大学叶良丰裴敏艳李为二等奖
9000226国防科技大学林磊金松昌潘威二等奖
9000207国防科技大学胡俊黄兵超林挺强二等奖
9000211国防科技大学梁政米海波邓镭二等奖
9000201国防科技大学饶彬何密粘永健二等奖
9000236国防科技大学张毅郭晓威林新晔二等奖
9000242国防科技大学刘吉英黄石生王泽龙二等奖
9000255国防科技大学魏悦川戎宜生张浪二等奖
9000209国防科技大学任洪广刘聪刘晓东二等奖
9000249国防科技大学庞晨蔡蕾王璐璐二等奖
9000245国防科技大学刘盛云吕亮李渊二等奖
9000250国防科技大学吕品张冬松陈芳园二等奖
9000239国防科技大学周竞文李虎沈洁二等奖
9000253国防科技大学易伟王海波宁希二等奖
1021304哈尔滨工业大学郑甲宏郭文飞王浩威二等奖
1021313哈尔滨工业大学林超郝松匡运生二等奖
9004406海军工程大学王建鄢景张硕二等奖
9004410海军工程大学马强俞建钟德欢二等奖
9004409海军工程大学胡献君邓荣陈琛二等奖
9004402海军工程大学谌双双胡科强朱瑶二等奖
9004407海军工程大学李旺李大伟侯政良二等奖
9004401海军工程大学袁添鸿腾辰王鹏二等奖
9004509海军航空工程学院马国欣赵均伟郑小洪二等奖
9004524海军航空工程学院陈中华陈文潘特铁二等奖
9004523海军航空工程学院纪纲殷昊赵大玮二等奖
9004511海军航空工程学院张原文天柱易波二等奖
9004508海军航空工程学院顾新锋黄宇罗木生二等奖
9004502海军航空工程学院陈昭男杜保周建军二等奖
1058902海南大学向炎春周潜冯守川二等奖
1035909合肥工业大学朱士蓉丁津津张骏二等奖
1035906合肥工业大学李忠泽李智慧陈欣二等奖
1035904合肥工业大学陈家银王宝杨姜伟二等奖
1035903合肥工业大学牛励诚张锦秀熊平闯二等奖
1035913合肥工业大学胡小荣毛沙彭张林二等奖
1035901合肥工业大学徐启敏梁坤耿伟二等奖
1029401河海大学王飞刘巧玲石环环二等奖
1047506河南大学范文涛赵杰刘仁涛二等奖
9002703后勤工程学院张恒李敏王冰二等奖
9002702后勤工程学院王希科雷猛余彬二等奖
1050001湖北工业大学黄毅田浩马乐乐二等奖
1053205湖南大学毛超郑林林刘利国二等奖
1053405湖南科技大学高明柯李益平李平二等奖
1053401湖南科技大学郭斌郭智胡杏二等奖
1005403华北电力大学张鹏阙慧敏宋卫艳二等奖
1007901华北电力大学(保定)赵亮杜秋实刘影二等奖
1007903华北电力大学(保定)陈盈今夏阳陈博二等奖
1007904华北电力大学(保定)黎邓根王玲赵高帅二等奖
1005414华北电力大学(北京)李国栋徐希望杨瑛二等奖
1040405华东交通大学廖文娟丁文俊郭顺利二等奖
1026908华东师范大学熊嫔华王文雅陈畅一二等奖
1026916华东师范大学郑丁丁江流朱伟二等奖
1026922华东师范大学张通王彪李路二等奖
1026924华东师范大学张治华陈雯邓中伟二等奖
1026905华东师范大学林源清孟瑶张亚婕二等奖
1056102华南理工大学王剑华刘亮李慧娟二等奖
1056109华南理工大学周友华徐健杨立圣二等奖
1056104华南理工大学吴永欢李毅辰石有滴二等奖
1056402华南农业大学陈勇彬陈钦喜龙健颜二等奖
1056403华南农业大学官金兰郭昌洪陈志强二等奖
1050402华中农业大学高峰程敏章周林二等奖
1051101华中师范大学毛洪振李桂愉蒋愉二等奖
1018301吉林大学杨茂陈鸿帅徐凤二等奖
1055913暨南大学陈旭单玉张艳辉二等奖
1055917暨南大学徐慕蓉郑旭莫庆平二等奖
1029901江苏大学金鹏赵琛烜潘道远二等奖
1042103江西财经大学吴群徐小丽李剑春二等奖
9002101解放军电子工程学院周青松焦传海祝本玉二等奖
9002103解放军电子工程学院王一张阳汪华兴二等奖
9002104解放军电子工程学院巫军卫王喜风陈衍玲二等奖
9000611解放军理工大学王建宝江勋林卢本胜二等奖
9000601解放军理工大学韩寒魏志虎汤小明二等奖
9000628解放军理工大学哈瑶周凯陈则达二等奖
9000617解放军理工大学王世强徐波黄牧二等奖
9000603解放军理工大学余晓晗张建照范章君二等奖
9000610解放军理工大学李竹王晓伟张文毅二等奖
9000626解放军理工大学李皖杨战杰赵延来二等奖
9000609解放军理工大学陈继飞张悦方鹏飞二等奖
9001102解放军西安通信学院陈猛吕鑫于茜二等奖
9001101解放军西安通信学院李波丁小勇张杰二等奖
9000513解放军信息工程大学于俊杰张峰陈嘉勇二等奖
9000522解放军信息工程大学陈健王超管士勇二等奖
9000506解放军信息工程大学郑娜娥刘军搏沈智翔二等奖
9000532解放军信息工程大学杨辉陈令羽田江鹏二等奖
9000501解放军信息工程大学胡德秀易鸣张宝奇二等奖
9000516解放军信息工程大学张建业邓松漆雪梅二等奖
9000523解放军信息工程大学杨晓晖申丝茗周庆勇二等奖
9000525解放军信息工程大学董明陈正生张清华二等奖
9000524解放军信息工程大学刘伟平孙文杨凡二等奖
9000504解放军信息工程大学李鹏亢宁杨森二等奖
9000512解放军信息工程大学贾继兵张洪波刘成城二等奖
9000533解放军信息工程大学张顺邢洪智吴昊天二等奖
9000527解放军信息工程大学黄瑞阳徐立刘灿由二等奖
9000519解放军信息工程大学周百鹏葛国栋郑丽清二等奖
9005211空军工程大学李明辉张黎侯文林二等奖
9005204空军工程大学曾祥能姬伟杰钟卫军二等奖
9005212空军工程大学杜继永刘月徐嵩二等奖
9005205空军工程大学周进登徐海洋吕文平二等奖
9005201空军工程大学胡雷刚王邑王燊燊二等奖
9005216空军工程大学高乾张启亮刘伟二等奖
9005210空军工程大学吝科周二虎黄聪会二等奖
9005213空军工程大学导弹学院许河秀邹志刚瞿珏二等奖
1067402昆明理工大学马福华李村董会升二等奖
1073108兰州理工大学张赋李伟王敏二等奖
1014701辽宁工程技术大学董伟魏海燕邢翠二等奖
1014612辽宁科技大学付鹏先谭家国李兹焕二等奖
1014606辽宁科技大学何欣单辉白茹雪二等奖
1190206南昌大学姚靖靖周汉心肖婧二等奖
1190205南昌大学王名发李灵丁雄勇二等奖
1029105南京工业大学王佳栋孙田李威威二等奖
1028715南京航空航天大学彭卫吕剑张霞二等奖
1031911南京师范大学刘佰琼杨洋刘忠华二等奖
1031903南京师范大学李志保李铭高毅平二等奖
1031906南京师范大学丁鹏胡洪宋倩倩二等奖
1029308南京邮电大学刘英峰欧庆波宋丽娟二等奖
1029306南京邮电大学杨英军孙培培蓝超二等奖
1029310南京邮电大学刘晖姬雷顾莹二等奖
1029307南京邮电大学陈辰戴晨阳李麟川二等奖
9001402炮兵学院李义文孙汉卿王志伟二等奖
1000308清华大学马超郑彬彬田玉龙二等奖
1000303清华大学吕鹏孙光赵宝柱二等奖
1000310清华大学王伟能林喜王醒二等奖
1190607青岛大学徐昊谢康张旭二等奖
1190609青岛大学黄振兴秦楠刘进二等奖
1042608青岛科技大学张宁韩玉群范丹丹二等奖
1042609青岛科技大学丁亭亭迟鹏伟于建云二等奖
1042602青岛科技大学路京磊刘美洁孙书衡二等奖
1042607青岛科技大学陈方杰高道伟黄照华二等奖
1042601青岛科技大学郑金增周桂利陈淑蓉二等奖
1042604青岛科技大学刘彦龙神克超宋传胜二等奖
1042610青岛科技大学刘祥鹏刘文杰仲伊二等奖
1042605青岛科技大学刘邵星李晓龙陈策二等奖
1044601曲阜师范大学乔世一李彤彤岳增慧二等奖
1044609曲阜师范大学朱洪利王培郭婷婷二等奖
1193403三峡大学陈伟刘敏张虎二等奖
1193402三峡大学易佳郭翠梅彭巍二等奖
1038407厦门大学刘恒铿郑荔丽刘礼锋二等奖
1038406厦门大学宋智军吴彩琴陈希二等奖
1038410厦门大学龚汉杰吕钊钘黄学共二等奖
1038404厦门大学张小玲甄庆凯林春敏二等奖
1042266山东大学张永孟凡敏杨君军二等奖
1042274山东大学于洪鹏庞大钧姜阳光二等奖
1042250山东大学钟世民张慧万顺二等奖
1042233山东大学张紫平李蕾张成梁二等奖
1042239山东大学崔迎宾李建生刘晓明二等奖
1042226山东大学付凯苏虎王艳丽二等奖
1042262山东大学商敬铜王秀荣贾开瑜二等奖
1042420山东科技大学王希会张建贾进彪二等奖
1042412山东科技大学刘维会于向博徐芳芳二等奖
1056005汕头大学蔡建坤鲁鑫二等奖
1027215上海财经大学陈晓芹陈益鑫陆慧蔚二等奖
1027211上海财经大学殷波赵恒项素艳二等奖
1190303上海大学苏英陈柳文清芝二等奖
1024803上海交通大学吴嘉虹吴金桥郭文爽二等奖
1025204上海理工大学秦毅薛美花栾昕竹二等奖
1025219上海理工大学王辉王芳芳涂映薇二等奖
1191205首都经济贸易大学焦巍巍岳洋康宏二等奖
1190105四川大学成磊峰张坤李永华二等奖
1028505苏州大学秦聪卢封亦俞维思二等奖
1028501苏州大学焦玉洁张媛媛卞凯二等奖
1028503苏州大学袁学帅殷宇李宁宁二等奖
1005606天津大学赵伟民王学珍卞小娇二等奖
1006003天津理工大学李莉苹胡素蕊樊秀梅二等奖
9001007通信指挥学院陶晓宇何建平潘浩二等奖
1024730同济大学周江袁婷张健伟二等奖
1024713同济大学崔玮朱艳赵新源二等奖
1024738同济大学张志飞夏荣艳唐蔚二等奖
1024732同济大学唐扬扬李广宇张姗姗二等奖
1024705同济大学周毅张兆祥孙彤二等奖
1024747同济大学林铌忠程志强匡佩二等奖
1024708同济大学陈琛丁瑞蔡茂二等奖
1024736同济大学叱诚郑仕文李明睿二等奖
1024709同济大学沈威徐超聂功武二等奖
1024719同济大学富秋实边晓婧贾旭二等奖
1048608武汉大学曾晨卫小艳李伦二等奖
1048602武汉大学游炯张红英陈奕云二等奖
1048606武汉大学孔世超王广兴彭振阳二等奖
1048605武汉大学马龙杨彦丹李诚二等奖
1049602武汉工业学院孔小江盛晓州徐泰燕二等奖
1049601武汉工业学院甘海涛曾森文源二等奖
1191502武汉科技大学苏志祁夏敦行金凡二等奖
1049701武汉理工大学刘文刘海明蔡葵玉二等奖
1070104西安电子科技大学贠大庆邱津姜飞二等奖
1069811西安交通大学孙永乐刘天彦李涛二等奖
1069810西安交通大学孟超贺兴华苏利二等奖
1069808西安交通大学周青张鹏飞王昊二等奖
1069812西安交通大学张川蒋路雷加淮二等奖
1069902西北工业大学张培沈贺陈洪波二等奖
1069903西北工业大学李乐项新梅谢芳全二等奖
1069901西北工业大学刘帅强赵晓凯姚远二等奖
1074201西北民族大学闫海春丁丽丽贾田田二等奖
1065101西南财经大学武化宗蒋瑶李秀萍二等奖
1065106西南财经大学陈龙英庞珏嗣文家成二等奖
1063505西南大学蒋琴熊芳童锦俊二等奖
1061313西南交通大学刘天豪米蓉王勇二等奖
1061304西南交通大学臧天磊邹大云黄飞二等奖
1061301西南交通大学于贺威吴涛陈崇双二等奖
1061307西南交通大学刘勇蒋伟顾博川二等奖
1061310西南交通大学文晓东钱瑶赵明二等奖
1061303西南交通大学彭昕唐伟郁家杰二等奖
1061311西南交通大学赵军刘盾张钧波二等奖
1061312西南交通大学刘培刚张书瑞黄如君二等奖
1061900西南科技大学周龙平孙波古朝建二等奖
9005514徐州空军学院刘国良赵理想常宁二等奖
9005511徐州空军学院王朋振郑绪武李海广二等奖
1067304云南大学王宁邦胡猛舒江叶二等奖
k000009浙江大学张仲斐代鹏徐欣欣二等奖
1033707浙江工业大学程荣李秉焱欧艳强二等奖
1033813浙江理工大学曾祥慧朱宝湘倪传庆二等奖
1033806浙江理工大学包金哲洪惠芬裘杰二等奖
1034502浙江师范大学戴灿华王明瑶施伦二等奖
1049103中国地质大学(武汉)杨燕丽杨艳林邹艳二等奖
8322102中国航天科工集团公司第二研究院谢伟敬陈加韩哲二等奖
8322107中国航天科工集团公司第二研究院王剑冰陈洋张美薇二等奖
8322106中国航天科工集团公司第二研究院左军涛孙运吉张志健二等奖
1035810中国科学技术大学安庆贤李劭郁汪磊二等奖
1035802中国科学技术大学詹磊杨非牛允佳二等奖
1029005中国矿业大学石学军蒋建牛成虎二等奖
8510103中国气象科学研究院王佳刘羽郭妙二等奖
1000202中国人民大学刘志洋杨峰姚一旻二等奖
1110502中国人民武装警察部队学院于涛王平孙青辉二等奖
1141407中国石油大学(北京)江杰黄力徐林静二等奖
1141403中国石油大学(北京)刘念董萍祁彬彬二等奖
k000003中科院自动化研究所胡朝辉周光有张宝贵二等奖
1194303中南财经政法大学李睿郝宇明金鹏飞二等奖
1194213中南大学杨晓辉杨立丁燕二等奖
1194212中南大学黄文静封娟刘世杰二等奖
1194206中南大学任孝平陈钢郭璠二等奖
1194209中南大学陈孔阳何志敏蒋文明二等奖
1194217中南大学龙海辉张志琴王磊二等奖
1194208中南大学余宏志师彬曾令平二等奖
1194214中南大学范成林徐宇锋廖谨二等奖
1194202中南大学徐勤武李龙王劦二等奖
1055809中山大学陈古典杨文臣唐巍二等奖
1003403中央财经大学张任李石保杨振刚二等奖
1005204中央民族大学胡洪胜苏鑫王运松二等奖
1061805重庆交通大学陈明磊于鹏辉黄美灵二等奖
1061801重庆交通大学王慧维李浩周逸二等奖
9004110装甲兵工程学院唐志武于屏岗郭骏豪二等奖
9004104装甲兵工程学院王强韦志强曾令伟二等奖

尘埃落定

出结果了,哈哈 ,国赛二等。比上次好,比较欣慰。每天盼星星盼月亮的,这下一年不要上那几个网站了。这叫季节性登陆。

天冷拉

前天一天翻译了一天的论文。昨天一天赶了一天的实验结果,下午去提改装车,晚上回来翻译论文。今天上午报账,看了牙,中午谈了论文的事情。
好冷啊,手脚冰凉!

INS

GPS坐标系转换的问题看了几天的文章,了解的差不多了。接下来看组合导航的内容。希望能找到突破点进行研究!

好累

1、今天修改了gps的程序,希望明天能把车开回来的路上采集点儿数据。
2、修改了智能系统学报的一篇文章,一个月投了居然就优先发表了,奇怪。就是不能ei检索,有点儿遗憾,还需努力。
3、评审了一篇学报的文章,写的比较烂,拒了。
4、今天返回了专著的意见,需要交换修改,我修改第四章,改了n多图题和表题。眼睛都花了。
5、明天下午开大会,说是搞什么整风,晕哟。
6、晚上回来继续修改专著,好久没看外语书了,忙不过来啊根本就。回来了就好累,眼睛直打转转,不知道最近怎么搞的。

这几天下大雨,温度直线下降,冷就一个字。


Three Countries

诸葛亮终于要北伐了,听着那悲怆的音乐,已经知道的结果,让人不禁潸然泪下。

今日

今日没做什么事,八点一刻到实验室:
开三台电脑一起跑程序
写明天要讲的ppt,交给师兄
写11月3号要讲的ppt
收到控制决策的修改意见,开始修改五六十条参考文献
修改了整整一天!


水煮肉片

收到了控制与决策的稿费,哈哈,终于过了青黄不接的时期了。

fatal error

%%%%%%%%%%%%%%%%%%%%%%怪不得每次的都一样!!原来在这里,就把力的效果去掉了,只用到了前两项!
        temp_result = next_x_and_y(x,y,actorkandf(i,1),actorkandf(i,2)); %输入当前的(x,y)坐标和移动方向矢量 得到移动的下一个位置
        temp_dis(i,1) = temp_dis(i,1)+Dis(x,y,temp_result(1,1),temp_result(1,2));%temp_dis 用于记录每个节点移动的路程
        actor(i,1) = temp_result(1,1);  %temp_result 为计算出的新的位置
        actor(i,2) = temp_result(1,2);

%%%%%%%%%%%%%%
function f=next_x_and_y(x,y,d_x,d_y)
%输入点的坐标(x,y)和方向矢量(d_x,d_y)
step =0.009;
cos_theta = d_x/sqrt(d_x^2+d_y^2);
sin_theta = d_y/sqrt(d_x^2+d_y^2);

delta_x = step*cos_theta;
delta_y = step*sin_theta;

result(1,1) = x+delta_x;
result(1,2) = y+delta_y;

clear step;
clear cos_theta;
clear sin_theta;
clear delta_x;
clear delta_y;
f=result;

virtual force MATLAB code

%entry point
r=30*0.8*sqrt(3);    %100为通信距离 r为应满足条件的距离
len1 = size(actor);  %actor的长度
number=0; % 记录迭代次数的变量
temp_dis = zeros(len1(1,1),1);%temp_dis 用于记录每个节点移动的路程 在 run.m中进行累加记录的

while(1)  %当不再有相邻的点时停止
    main;     %调用main函数
    for i=1:len1(1,1)       %在actor里面循环
       if countneighbour(actor(i,1),actor(i,2),actor,r)~=0
          flag = 1;
          break; %还有邻居立刻跳出当前循环
       else 
          flag = 0;   %停止结束标志
       end  
    end
    
    if flag == 0
        break;
    end
    number = number+1; %记录迭代次数
    clear i;
    clear flag;
end

sum = sum(temp_dis) %节点移动总距离
clear  temp_dis;
clear  len1;
clear  i;
clear  flag;
number %迭代次数
circleplot;   %移动结束后画最终覆盖范围

%main
len = size(actor);%actor的长度
for i=1:len(1,1)  %在actor里面循环
    x=actor(i,1); 
    y=actor(i,2);
    if countneighbour(x,y,actor,r) ~=0  %邻居不为0,则计算合力和斜率,记入actorkandf
        %neighbor = findneighbour(x,y,actor,r); %neighbor里面存着(actor(i,1),actor(i,2))点的所有邻居
        %fandk = computefandk(x,y,neighbor,r,actor);  %fandk里面存着所有邻居对(x,y)的f和方向矢量
        fandk = findneighbour(x,y,actor,r); %将上述两个过程合并为一个函数,都在findneighbour里面完成
        finalkandf = final_kandf(fandk); %根据fandk求出合力大小方向
        clear fandk;

        actorkandf(i,1) = finalkandf(1,1); % 方向矢量
        actorkandf(i,2) = finalkandf(1,2); % 方向矢量
        actorkandf(i,3) = finalkandf(1,3); % 力的大小
        clear finalkandf;
        
        temp_result = next_x_and_y(x,y,actorkandf(i,1),actorkandf(i,2)); %输入当前的(x,y)坐标和移动方向矢量 得到移动的下一个位置
        temp_dis(i,1) = temp_dis(i,1)+Dis(x,y,temp_result(1,1),temp_result(1,2));%temp_dis 用于记录每个节点移动的路程
        actor(i,1) = temp_result(1,1);  %temp_result 为计算出的新的位置
        actor(i,2) = temp_result(1,2);
        %hold on;
        %plot(actor(i,1),actor(i,2)) %画节点移动的路径 
        clear temp_result;
    else %对于没有邻居的节点,力大小和斜率均为0
        actorkandf(i,1) = 0; %方向矢量
        actorkandf(i,2) = 0; %方向矢量
        actorkandf(i,3) = 0; %力大小为0
    end
    clear x;
    clear y;
    clear actorkandf;
end

clear i;

%findneighbour
function  f=findneighbour(x,y,z,r)
%(x,y)为输入点
%z为输入所有点数组
%r为通信半径
%寻找(x,y)的所有邻居
len = size(z);
j=1;
for i=1:len(1,1)
    if x~=z(i,1) && y~=z(i,2)
        if Dis(x,y,z(i,1),z(i,2))<=r    %则z(i,1),z(i,2)为邻居
             temp_f = abs((r-Dis(x,y,z(i,1),z(i,2)))/2); %求与邻居的力; 力1
             result(j,1) = x-z(i,1);   
             result(j,2) = y-z(i,2); %表示z(i)对(x,y)的矢量
             result(j,3) = temp_f;   %第三列代表力的大小
             j=j+1;
        end
    end
end
clear temp_f;
clear len;
clear j;
f=result;

%countneighbour
function  f=countneighbour(x,y,z,r)
%(x,y)为输入点
%z为输入所有点数组
%r为通信半径
%寻找(x,y)的所有邻居的个数
len = size(z);
result=0;%无邻居
for i=1:len(1,1)
    if x~=z(i,1) && y~=z(i,2)
        if Dis(x,y,z(i,1),z(i,2))<=r 
            result=1; %有邻居
            break;
        end
    end
end
clear len;
clear i;
f=result;

%next_x_and_y
function f=next_x_and_y(x,y,d_x,d_y)
%输入点的坐标(x,y)和方向矢量(d_x,d_y)
step =0.1;
cos_theta = d_x/sqrt(d_x^2+d_y^2);
sin_theta = d_y/sqrt(d_x^2+d_y^2);

delta_x = step*cos_theta;
delta_y = step*sin_theta;

result(1,1) = x+delta_x;
result(1,2) = y+delta_y;

clear step;
clear cos_theta;
clear sin_theta;
clear delta_x;
clear delta_y;
f=result;

%anotherf
function f=anotherf(x1,y1,f1,x2,y2,f2)
%已知f和斜率,计算合力的斜率
sin_theta1 = y1/sqrt(x1^2+y1^2);
cos_theta1 = x1/sqrt(x1^2+y1^2);
sin_theta2 = y2/sqrt(x2^2+y2^2);
cos_theta2 = x2/sqrt(x2^2+y2^2);

temp_f_x = f1*cos_theta1+f2*cos_theta2;  %x方向力的分量
temp_f_y = f1*sin_theta1+f2*sin_theta2;  %y方向力的分量
clear sin_theta1;
clear cos_theta1;
clear sin_theta2;
clear cos_theta2;
f = sqrt(temp_f_x^2+temp_f_y^2);

% final_kandf
function  f=final_kandf(x)
% x为fandk数组,第一二列为该力的方向矢量 ,第三列为力的大小
%输出合力大小
len = size(x);
if(len(1,1)==0)
    return;
else
    if len(1,1)==1 %只有一个邻居时候
        finalkandf(1,1) = x(1,1);   %力的方向矢量
        finalkandf(1,2) = x(1,2);   %力的方向矢量
        finalkandf(1,3) = x(1,3);   %力大小
    else
        if len(1,1)==2   %只有两组
            finalkandf(1,1) = x(1,1) + x(2,1) ;% x方向矢量相加
            finalkandf(1,2) = x(1,2) + x(2,2) ;% y方向矢量相加
            finalkandf(1,3) = anotherf(x(1,1),x(1,2),x(1,3),x(2,1),x(2,2),x(2,3)); %合力大小
        else %大于两组
            finalkandf(1,1) = x(1,1) + x(2,1) ;% x方向矢量相加
            finalkandf(1,2) = x(1,2) + x(2,2) ;% y方向矢量相加
            finalkandf(1,3) = anotherf(x(1,1),x(1,2),x(1,3),x(2,1),x(2,2),x(2,3)); %合力大小
            for i=3:len(1,1)
                finalkandf(1,1) = finalkandf(1,1)+ x(i,1);
                finalkandf(1,2) = finalkandf(1,2)+ x(i,2);
                finalkandf(1,3) = anotherf(finalkandf(1,1),finalkandf(1,2),finalkandf(1,3),x(i,1),x(i,2),x(i,3));%力大小
            end
        end
    end
end
clear len;
clear i;
f=finalkandf;

前提那段程序的matlab代码,做了些优化,现在算320个点也不会死机了,哈哈

haha

http://www.qxl.no/
Website like taobao or eaby shop in Norway.

CSingleLock

   In order to use the synchronization classes CSemaphore, CMutex, CCriticalSection, and CEvent, you must create either a CSingleLock or CMultiLock object to wait on and release the synchronization object.
   Use CSingleLock when you only need to wait on one object at a time. 
   Use CMultiLock when there are multiple objects that you could use at a particular time.
   To use a CSingleLock object, call its constructor inside a member function in the controlled resource's class. Then call the IsLocked member function to determine if the resource is available. If it is, continue with the remainder of the member function. If the resource is unavailable, either wait for a specified amount of time for the resource to be released, or return failure. After use of the resource is complete, either call the Unlock function if the CSingleLock object is to be used again, or allow the CSingleLock object to be destroyed.
   CSingleLock objects require the presence of an object derived from CSyncObject. This is usually a data member of the controlled resource's class.

Take our program for example:
"
CMainFrame* pThis = (CMainFrame*)pParam;
CSingleLock sLock(&pThis->m_mutex);
sLock.Lock();
. . .
. . .
sLock.Unlock();
"

UTC Time and GPS

    格林尼治標準時間(旧譯格林尼治平均時間或格林威治標準時間;英文:Greenwich Mean Time,GMT)是指位於英國倫敦郊區的皇家格林威治天文台的標準時間,因為本初子午線被定義在通過那裡的經線。理论上来说,格林尼治标准时间的正午是指当太阳横穿格林尼治子午线时(也就是在格林尼治上空最高点时)的时间。由于地球在它的橢圓軌道裡的運動速度不均匀,这个时刻可能和實際的太阳时相差16分钟。由於地球每天的自转是有些不规则的,而且正在缓慢减速,因此,格林尼治时间已经不再被作为标准时间使用。现在的标准时间,是由原子鐘報時的協調世界时(UTC)。
    协调世界时,又称世界标准时间,简称UTC,从英文“Coordinated Universal Time”/法文“Temps Universel Cordonné”而来。
中国位于东八区,所以要比这个时间早八个小时,也就是说,全球标准时间是5日0点时,中国是5日的8点,而美国部分地区还处于4日的黄昏。
    為了使民用的精確度提昇,科學界發展另一種技術,稱為差分全球定位系統(Differential GPS),簡稱DGPS。亦即利用附近的已知參考座標點(由其它測量方法所得),來修正 GPS 的誤差。再把這個即時(real time)誤差值加入本身座標運算的考慮,便可獲得更精確的值。
GPS有2D导航和3D导航分,在卫星信号不够时无法提供3D导航服务,而且海拔高度精度明显不够,有时达到10倍误差。但是在经纬度方面经改进误差很小。卫星定位仪在高楼林立的地区捕捉卫星信号要花较长时间。(From:维基百科)

笔记

开始研究GPS!
struct GPFPD 
{       //FPD定位定向消息集
CString m_GPSWeek; //当前的星期数
CString m_GPSTime; //本周日起当前的秒数
CString m_Heading; //偏航角(-360度)
CString m_Pitch; //俯仰角(-90~度)
CString m_Roll; //横滚角(-180-180度)
CString m_Latitude; //纬度(-90~度)
CString m_Longitude;    //经度(-180~度)
CString m_Altitude;     //高度(m)
CString m_Ve;           //东向速度(m/s)
CString m_Vn;           //北向速度(m/s)
CString m_Vu;           //天向速度(m/s)
CString m_BaseLine;     //基线长度(m)
CString m_NSV1;         //天线卫星数
CString m_NSV2;         //天线卫星数
CString m_GpsStatus;    //GPS状态
};
struct GPHPR
{
//HPR姿态精简消息集
CString m_GPSTime; //自本周日至当前的秒数
CString m_Heading; //偏航角-360度
CString m_Pitch;   //俯仰角-90~度
CString m_Roll;    //横滚角-180-180度
};
struct GPGGA
{
//GPS定位信息
CString m_UTCTime;       // UTC时间
CString m_Latitude;      //纬度
CString m_LatitudeOrien; //纬度半球(N)北半球(S)南半球
CString m_Longitude;     //经度
CString m_LongitudeOrien;//经度半球(E)东经W(西经)
CString m_FS;            //GPS状态
CString m_NoSV;          //卫星数量(-12)
CString m_HDOP;          //HDOP水平精度因子(.5-99.9)
CString m_msl;           //海拔高度
CString m_mslUnit;       //单位(m)
CString m_Altref;        //地球椭球面相对大地水准面的高度
CString m_AltrefUnit;    //单位(m)
CString m_DiffAge;       //差分时间(s)从最后一次接收到差分信号开始的秒数
CString m_DiffStation;   //差分站ID号(-1023)若不是差分定位则为空
};
struct GPLLA
{
//LLA位置精简消息集
CString m_GPSTime;   //自本周日至当前的秒数
CString m_Latitude;  //纬度(-180~度)
CString m_Longitude; //经度(-180~度)
CString m_Altitude;  //高度(单位米)
};
struct GPHPD
{
//GPS定位定向消息集
CString m_GPSWeek;   //自-1-6至当前的星期数(接收机时间)
CString m_GPSTime;   //星期内的毫秒数(接收机时间)
CString m_Heading;   //偏航角-360度
CString m_Pitch;     //俯仰角-90~度
CString m_Track;     //地速相对真北方向的夹角(-359.99度)
CString m_Latitude;  //纬度(WGS84)
CString m_Longitude; //经度(WGS84)
CString m_Altitude;  //高度(WGS84)
CString m_Ve;        //东向速度(m/s)
CString m_Vn;        //北向速度(m/s)
CString m_Vu;        //天向速度(m/s)
CString m_Ae;        //两次测量值之间的东向速度差(m/s)
CString m_An;        //两次测量值之间的北向速度差(m/s)
CString m_Au;        //两次测量值之间的天向速度差(m/s)
CString m_BaseLine;  //基线长度(m)
CString m_NSV1;      //前天线可用星数
CString m_NSV2;      //后天线可用星数
};
struct GPGLL
{
//GLL经纬度和时间以及定位状态信息
CString m_Latitude;      //纬度
CString m_LatitudeOrien; //纬度半球(N)北半球(S)南半球
CString m_Longitude;     //经度
CString m_LongitudeOrien;//经度半球(E)东经W(西经)
CString m_UTCTime;       //UTC时间(hhmmss)时分秒格式
CString m_Valid;         //定位状态
CString m_Mode;          //模式指示
};
struct GPIMU
{
//IMU输出数据
CString m_Type;  //类型及量程
CString m_Timer; //计时器  32bit
CString m_GyroX; //陀螺仪X轴角速度(度/s)
CString m_GyroY; //陀螺仪Y轴角速度(度/s)
CString m_GyroZ; //陀螺仪Z轴角速度(度/s)
CString m_AccX;  //加速度计X轴加速度(单位:g)
CString m_AccY;  //加速度计Y轴加速度(单位:g)
CString m_AccZ;  //加速度计Z轴加速度(单位:g)
CString m_Tpr;   //温度(单位:摄氏度)
};
struct GPGSV
{
    //GPS卫星分布
CString m_NoMsg; //GSV语句的总数
CString m_MsgNo; //本句GSV的编号
CString m_NoSv;  //可见卫星的总数(-12)
CString m_sv1;   //PRN码第一组卫星伪随机噪声码(-32)
CString m_elv1;  //第一组卫星仰角(-90度)
CString m_az1;   //第一组卫星方位角(-359度)
CString m_cno1;  //第一组卫星信噪比(-99dB)
CString m_sv2;   //第二组卫星伪随机噪声码
CString m_elv2;  //第二组卫星仰角
CString m_az2;   //第二组卫星方位角
CString m_cno2;  //第二组卫星信噪比
CString m_sv3;   //第三组卫星伪随机噪声码
CString m_elv3;  //第三组卫星仰角
CString m_az3;   //第三组卫星方位角
CString m_cno3;  //第三组卫星信噪比
CString m_sv4;   //第四组卫星伪随机噪声码
CString m_elv4;  //第四组卫星仰角
CString m_az4;   //第四组卫星方位角
CString m_cno4;  //第四组卫星信噪比
};
struct GPGSA
{
//GPS精度因子值以及可用卫星
CString m_SMode; //模式手动/自动
CString m_FS;    //定位类型没有定位/2D定位/3D定位
CString m_sv1;   //伪随机噪声码(PRN码,正在用于解算位置的卫星号1-32)
CString m_sv2;   //伪随机噪声码
CString m_sv3;   //伪随机噪声码
CString m_sv4;   //伪随机噪声码
CString m_sv5;   //伪随机噪声码
CString m_sv6;   //伪随机噪声码
CString m_sv7;   //伪随机噪声码
CString m_sv8;   //伪随机噪声码
CString m_sv9;   //伪随机噪声码
CString m_sv10;  //伪随机噪声码
CString m_sv11;  //伪随机噪声码
CString m_sv12;  //伪随机噪声码
CString m_PDOP;  //PDOP位置精度因子(.5-99.9)
CString m_HDOP;  //HDOP水平精度因子(.5-99.9)
CString m_VDOP;  //VDOP垂直精度因子(.5-99.9)
};
struct GPRMC
{
//RMC推荐定位信息
CString m_UTCTime;       //UTC时间hhmmss格式
CString m_Status;        //定位状态有效定位/无效定位
CString m_Latitude;      //纬度
CString m_LatitudeOrien; //纬度半球(N)北半球(S)南半球
CString m_Longitude;     //经度
CString m_LongitudeOrien;//经度半球(E)东经W(西经)
CString m_Spd;           //地面速率(.0-999.9节)
CString m_cog;           //地面航向(.0-359.9度,以真北为参考基准)
CString m_UTCDate;       //UTC日期ddmmyy格式
CString m_mv;            //磁偏角(.0-180.0度)
CString m_mvE;           //磁偏角方向E(东)/W(西)
CString m_Mode;          //模式指示
};
struct GPVTG
{
//VTG地面速度信息
CString m_cogt;  //以真北为参考基准的地面航向~359度
CString m_T;     //固定字段T
CString m_cogm;  //以磁北为参考基准的地面航向~359度
CString m_M;     //固定字段M
CString m_sog;   //地面速率(.0-999.9节)
CString m_N;     //固定字段N
CString m_kph;   //地面速率(.0-1851.8KM/H)
CString m_K;     //固定字段K
CString m_Mode;  //模式指示
};
struct GPZDA
{
//ZDA时间和日期
CString m_UTCTime; //UTC时间hhmmss.ss 0.1秒格式
CString m_UTCDay;  //UTC时间日1-31
CString m_UTCMonth;//月     1-12
CString m_UTCYear; //年     四位数字
CString m_ltzh;    //本地时区不支持固定
CString m_ltzn;    //本地分区不支持固定
};
struct GPHDT
{
//HDT定向信息
CString m_Heading; //偏航角0-360度
CString m_True;
};

The error of manifest

Today night , i am beginning to check our project 's code GPS/INS .And at the beginning ,i am attracted by the program 's XP style.First look at the following code ,it is XML file.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 
<assemblyIdentity 
    version="1.0.0.0" 
    processorArchitecture="X86" 
    name="Microsoft.Windows.XXXDemo"
    type="win32" 
/> 
<description>Your Demo Program </description> 
<dependency> 
    <dependentAssembly> 
        <assemblyIdentity 
            type="win32" 
            name="Microsoft.Windows.Common-Controls" 
            version="6.0.0.0" 
            processorArchitecture="X86" 
            publicKeyToken="6595b64144ccf1df" 
            language="*" 
        /> 
    </dependentAssembly> 
</dependency> 
</assembly>


Save to a file named: "XXXDemo.manifest",and find your mfc project which resource file named"XXX.rc". Open it with editplus and add "1 24 'XXXDemo.manifest'" to the last line of the file,then compile your program ,then you can find your program have change into XP style.

Main function

int _tmain(int argc, _TCHAR* argv[])
{
CNode actor[Node_Max_Num]; 
        CReadFile readfile;
CForce force;
CNode node;
int i,flag,number,temp_flag,temp_number,max_number;

number = 0;
temp_flag = 0;  
temp_number = 0;
        max_number = 0 ;
readfile.ReadSimulationFile(actor);

        while(1)
{
flag = 0;
float actorkandf1[Node_Max_Num];
float actorkandf2[Node_Max_Num];
float actorkandf3[Node_Max_Num];
float actorkandf4[Node_Max_Num];
float actorkandf5[Node_Max_Num];

for(i=0;i<Node_Max_Num;i++)
{
flag = flag + actor[i].countneighbour(actor);
}
if(flag == 0)
{
cout<<flag<<endl; 
break;
}
else
cout<<flag<<endl; 
if(flag != temp_flag)
{
temp_number = 0; 
temp_flag = flag;
temp_number++;   
}
else
{
temp_number++;   
if(max_number < temp_number)
max_number = temp_number;
}
number++;
node.compute_next_xy_run(actorkandf3,actorkandf4,actor);
}
readfile.WriteFile(actor);
return 0;
}

改代码完工!

纪念一下,累死我了,好久没写c++了,费死劲了。。不过运行效率不是一般的好!MATLAB果然算的慢啊。人还是不能太懒了。step为最小值0.03的时候内存一直就稳定在1384k左右,怎么matlab看的看到就1.5G没了。。
#define Node_Max_Num 160
#define FILENAME  "160.txt"
#define STEP 0.05;
class CNode
{
public:
  CNode(void);
  float Dis(float x2, float y2);
  void next_x_and_y(CNode *node,float d_x,float d_y);
  int countneighbour(CNode *z);
  void findneighbour(CNode *z,CNode *result);
  void compute_next_xy_run(float *actorkandf3,float *actorkandf4, CNode *actor);
  float virtual_force_1(CNode z);//与z的虚拟力1
  float virtual_force_2(CNode z);//虚拟力2
  float virtual_force_3(CNode z,CNode *actor);//虚拟力3
  float virtual_force_4(CNode z);//虚拟力4
private:
  ~CNode(void);
  float step;
  float r;
  float x;
  float y;
  float dis_theshold;
  float w_r;
  float w_a;
};
class CForce
{
public:
  CForce(void);
  float another_f(float x1,float y1,float f1,float x2,float y2 ,float f2);
  void computefandk(CNode node,int len,CNode *z,float *result1,float *result2,float *result3);//求当前点node 与 邻居的虚拟力
  void final_kandf(CNode node,int len,float *fandk1,float *fandk2,float *fandk3,float *finalkandf1,float *finalkandf2,float *finalkandf3);
  void computevirtual_main(CNode *actor ,float *actorkandf1,float *actorkandf2,float *actorkandf3,float *actorkandf4,float *actorkandf5);
public:
  ~CForce(void);
};
class CReadFile
{
public:
  CReadFile(void);
  int ReadSimulationFile(CNode *Node);
  void WriteFile(CNode *Node);
public:
  ~CReadFile(void);
};
//CNode类
CNode::CNode(void)
{
step = (float)STEP;
r=(float)(30*0.8*1.732);
x=0;
y=0;
dis_theshold = (float)(0.2*r);
w_r = 1;
w_a = 5;
}
CNode::~CNode(void)
{
}
float CNode::Dis(float x2, float y2)
{
//求与(x2,y2)两点的距离
float distance;
distance = sqrt((y2-y)*(y2-y)+(x2-x)*(x2-x));
return distance;
}

void CNode::next_x_and_y(CNode *node, float d_x, float d_y)
{
//计算移动下一个位置,node(x,y)为当前x,y ,d_x,d_y为输入方向矢量
float cos_theta,sin_theta,delta_x,delta_y;
cos_theta = d_x/sqrt(d_x*d_x+d_y*d_y);
sin_theta = d_y/sqrt(d_x*d_x+d_y*d_y);
delta_x = step*cos_theta;
delta_y = step*sin_theta;
node->x = node->x + delta_x;
node->y = node->y + delta_y;
return;
}
int CNode::countneighbour(CNode *z)
{
//z为输入所有点数组
//r为通信半径
//寻找(x,y)的所有邻居的个数
        int i,result;
result=0;
for(i=0;i<Node_Max_Num;i++)
{
if (x!=z[i].x && y!=z[i].y)
if (Dis(z[i].x,z[i].y)<=r)  //出过错 result=result+1;
}
return result;
}
void CNode::findneighbour(CNode *z, CNode *result)
{
//z为输入所有点数组 ,寻找(x,y)的所有邻居
int i,j;
j=0;
for(i=0;i<Node_Max_Num;i++)
{
if(x!=z[i].x && y!=z[i].y)
if(Dis(z[i].x,z[i].y)<=r)
{
result[j].x = z[i].x;
result[j].y = z[i].y;
j++;
}
}
return;
}
void CNode::compute_next_xy_run(float *actorkandf3,float *actorkandf4, CNode *actor)
{
int i;
for(i=0;i<Node_Max_Num;i++)
{
if(actorkandf4[i]!=0)
{
next_x_and_y(&(actor[i]),actorkandf3[i],actorkandf4[i]);
}
}
return;
}
float CNode::virtual_force_1(CNode z)
{
return abs(r - Dis(z.x,z.y));
}
float CNode::virtual_force_2(CNode z)
{
return abs(2*r-Dis(z.x,z.y))/r;//虚拟力2
}
float CNode::virtual_force_3(CNode z ,CNode *actor)
{
//z.countneighbour(actor)  x,y邻居z的度数
//自身的度数 this->countneighbour(); 
return z.countneighbour(actor)*(this->countneighbour(actor))/(Dis(z.x,z.y)*Dis(z.x,z.y));
}
float CNode::virtual_force_4(CNode z)
{
if (Dis(z.x,z.y) < dis_theshold )
return w_r*((1/Dis(z.x,z.y)) - (1/ dis_theshold));
else if (Dis(z.x,z.y) == dis_theshold)
return 0;
else if (r<=Dis(z.x,z.y))
return 0;
else
return w_a*(Dis(z.x,z.y)-dis_theshold);
}
//CForce类
CForce::CForce(void)
{
}
CForce::~CForce(void)
{
}
float CForce::another_f(float x1,float y1,float f1,float x2,float y2 ,float f2)
{
    //%已知f和斜率,计算合力的斜率
    float f,sin_theta1,cos_theta1,sin_theta2,cos_theta2,temp_f_x,temp_f_y;
    sin_theta1 = y1/sqrt(x1*x1+y1*y1);
    cos_theta1 = x1/sqrt(x1*x1+y1*y1);
    sin_theta2 = y2/sqrt(x2*x2+y2*y2);
    cos_theta2 = x2/sqrt(x2*x2+y2*y2);
    temp_f_x = f1*cos_theta1+f2*cos_theta2;  //x方向力的分量 
    temp_f_y = f1*sin_theta1+f2*sin_theta2;  //y方向力的分量
    f = sqrt(temp_f_x*temp_f_x+temp_f_y*temp_f_y);
    return f;
}
void CForce::computefandk(CNode node,int len ,CNode *z, float *result1,float *result2,float *result3)
{
    //node(x,y)为输入点,z为邻居点,r为通信距离,len为邻居长度
    int i;
for(i=0;i<len;i++)
{
result1[i] = node.x - z[i].x;
result2[i] = node.y - z[i].y;
result3[i] = node.virtual_force_1(z[i]); //求与z[i]的虚拟力1
//result3[i] = node.virtual_force_2(z[i]); //求与z[i]的虚拟力2
//result3[i] = node.virtual_force_3(z[i],z); //求与z[i]的虚拟力3
//result3[i] = node.virtual_force_4(z[i]); //求与z[i]的虚拟力4
}
}
void CForce::final_kandf(CNode node,
 int len,
float *fandk1,
float *fandk2,
 float *fandk3, 
float *finalkandf1,
float *finalkandf2,
float *finalkandf3)
{
if(len ==1)
{
finalkandf1[0] = fandk1[0];
finalkandf2[0] = fandk2[0];
finalkandf3[0] = fandk3[0];
}
else if (len == 2)
{
finalkandf1[0] = fandk1[0]+fandk1[1];
finalkandf2[0] = fandk2[0]+fandk2[1];
finalkandf3[0] = another_f(fandk1[0],fandk2[0],fandk3[0],fandk1[1],fandk2[1],fandk3[1]);
}
else if (len>2)
{
finalkandf1[0] = fandk1[0]+fandk1[1];
finalkandf2[0] = fandk2[0]+fandk2[1];
finalkandf3[0] = another_f(fandk1[0],fandk2[0],fandk3[0],fandk1[1],fandk2[1],fandk3[1]);
for(int i=2;i<len;i++)
{
finalkandf1[0] = finalkandf1[0] + fandk1[i];
finalkandf2[0] = finalkandf2[0] + fandk2[i];
finalkandf3[0] = another_f(finalkandf1[0],finalkandf2[0],finalkandf3[0],fandk1[i],fandk2[i],fandk3[i]);
}
}
return;
}
void CForce::computevirtual_main(CNode *actor, 
 float *actorkandf1,
float *actorkandf2,
float *actorkandf3,
float *actorkandf4,
float *actorkandf5)
{
int i;
for(i=0;i<Node_Max_Num;i++)
{
int len;
len = actor[i].countneighbour(actor);//计算邻居表的长度
if(len!=0)
{
float fandk1[Node_Max_Num];
float fandk2[Node_Max_Num];
float fandk3[Node_Max_Num];
float finalkandf1[1];
float finalkandf2[1];
float finalkandf3[1];

CNode neighbor[Node_Max_Num];
actor[i].findneighbour(actor,neighbor);
computefandk(actor[i],len,neighbor,fandk1,fandk2,fandk3);                           final_kandf(actor[i],len,fandk1,fandk2,fandk3,finalkandf1,finalkandf2,finalkandf3);
actorkandf1[i] = actor[i].x;
actorkandf2[i] = actor[i].y;
actorkandf3[i] = finalkandf1[0];
actorkandf4[i] = finalkandf2[0];
actorkandf5[i] = finalkandf3[0];
}
else
{
//对于没有邻居的节点,力大小和斜率均为0
actorkandf1[i] = actor[i].x;
actorkandf2[i] = actor[i].y;
actorkandf3[i] = 0;
actorkandf4[i] = 0;
actorkandf5[i] = 0;
}
}
}
//CReadFile类
CReadFile::CReadFile(void)
{
}
CReadFile::~CReadFile(void)
{
}
int CReadFile::ReadSimulationFile(CNode *Node) //读取仿真文件
{
ifstream fin; 
CString   strLine;   
CString str;
int index_x,index_y;
index_x = 0;
index_y = 0;
char Buffer[1024];
char FileName[]= FILENAME;

fin.open(FileName);
while(!fin.eof())   
{   
        ZeroMemory(Buffer,1024);    //一行的东西都存到Buffer中,每次换行时都清空 
fin.getline(Buffer,1024);

if(Buffer[0] == '#')        //忽视注释行
{
  continue;
}
else if(Buffer[0] == '$' && Buffer[1] == 'n' && Buffer[2] == 'o' && Buffer[3] == 'd' && Buffer[4] == 'e' && Buffer[5] == '_' && Buffer[6] == '(')
{
//初始坐标行
                        int index;      //index用于标志一行的循环,一行的长度为strLine.GetLength()
        int len=0;
for(index=0;index<1024;index++)
{
if(Buffer[index]!='\0')
len++; //  len为该行的长度
}
for(index=0;index<1024;index++)
{
if(Buffer[index]=='X')
{
//Buffer[index+3]  就是X坐标的开始  len-index-3 这么长的坐标
int i;
char xdim[20];
CString xxx;
for(i=0;i<len-index-3;i++)
xdim[i]=Buffer[index+3+i];
if(i<=20)
xdim[i]='\0';
Node[index_x].x = atof(xdim);
index_x++;
break;
}
if(Buffer[index]=='Y')
{
//Buffer[index+3]  就是X坐标的开始  len-index-3 这么长的坐标
int i;
char xdim[20];
CString xxx;
for(i=0;i<len-index-3;i++)
xdim[i]=Buffer[index+3+i];
if(i<=20)
xdim[i]='\0';
Node[index_y].y = atof(xdim);
index_y++;
break;
}
}
}
}
fin.close();
return 0;
}

void CReadFile::WriteFile(CNode *Node)
{
ofstream fout;
int i;
fout.open("finalactor.txt");
    for(i=0;i<Node_Max_Num;i++)
{
fout<<Node[i].x<<"   "<<Node[i].y<<endl;
}
fout.close();
return;
}

Out of memory

下午开始计算160个节点,步长为0.1时,matlab就出现了out of memory的错误。在网上搜索了一番,倒也有相关的解决办法,试了一圈都不管用。实验室的电脑是Intel2140 1.60GHz+1G memory 笔记本是T2250 1.73GHz+1.5G memory,两个跑起来都不含糊的出错,反正就是一到用2G内存的时候必定报错。
如下原因:
   Windows XP Professional and Windows Server 2003 Memory Support:The maximum amount of memory that can be supported on Windows XP Professional and Windows Server 2003 is 4 GB.(Except:Windows Server 2003,Enterprise Edition supports 32 GB of physical RAM;Windows Server 2003, Datacenter Edition supports supports 64 GB of physical RAM)The virtual address space of processes and applications is still limited to 2 GB unless the /3GB switch is used in the "Boot.ini" file.The following example shows how to add the /3GB parameter in the Boot.ini file to enable application memory tuning:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINNT="????" /3GB
From:
http://www.microsoft.com/whdc/system/platform/server/PAE/PAEmem.mspx
http://hi.baidu.com/lingzi1860/blog/item/0a708f6d130d46f3421694fa.html/cmtid/05d02058551995d59c8204de
   可是我按照这样的方式修改了再进系统,就发现所有的程序都打不开了,报错什么无效的映像文件。奇怪,莫非要我改用vc来算?Matlab真是bug啊

Virtual memory

At noon , it's so hard to finish my program , however my machine is crash down because of poor memory.
So angry and i change the virtual memory to 8G.And this time ,my machine is not slow at all!

cygwin gnuplot

http://www.cygwin.com/
It is cozy today and i went to the above website to see something about cygwin and gnuplot,then i find a good plot tools. Gnuplot has distributed newest version,we can download from the following website  http://sourceforge.net/projects/gnuplot/files/ one of them is gnuplot tools under windows platform,so convenience.
I install the newest cygwin and download gnuplot from www.cygwin.cn at once, the speed of network in the lab is so fast, and as soon as i eat lunch ,it has install 97%.

看看ipv6高清电视

winxp下安装ipv6协议栈:ipv6 install
运行:netsh int ipv6 isa set rout 202.197.48.29
运行:ipv6 if
若能看到2001:250:4400:开头的IPv6地址,说明隧道连接成功。

maxNumCompThreads

Today after i revise our paper in modeling contest. and i rewrite my paper about virtual force and node deployment. I found that the formula of virtual forces do not impact on the coverage performance , in reverse , the step the node moves every time is the main factor.
When i use n=160 and step =0.1m then the compute time is very long , sometimes i need to wait  the whole night for a result.. The core cpu is not so nice that the corporate said .If we use one processing unit ,it is still slow .

I found that matlab support multiprocessing . The follow is relative function. 
N = maxNumCompThreads returns the current maximum number of computational threads N.
LASTN = maxNumCompThreads(N) sets the maximum number of computational threads to N, and returns the previous maximum number of computational threads, LASTN.
maxNumCompThreads('automatic') sets the maximum number of computational threads using what the MATLAB software determines to be the most desirable. It additionally returns the previous maximum number of computational threads, LASTN.
All this in implicit multiprocessing and if we want to run separate processes on one or many machines, it needs explicit multiprocessing.

And first my matlab is 2007a on my machine in the lab, i didn't find the above function, then i change for a 2008version, and this error disappear. 

cluster computing

I am a computer science student,but i am not a real one. Since i have read the master degree. I found i have lost my passion on new fresh things about computer science.Now i can only concentrate on how to write paper and other boring things. Out of my major and i am feeling so regrettable.
This noon i begin to l learn to use putty ,which is SSH software, a free implementation of Telnet and SSH for Win32 and Unix platforms.(http://www.chiark.greenend.org.uk/~sgtatham/putty/)
Transport  document ,we can use FileZilla,which can be download from(http://filezilla-project.org/).
   When log on to the server,input: matlab ,then we can startup it and begin interaction status . It easy,but if we want to run a batch of compute missions,it is so troubled. Now we can write code into '.m'file and upload to server with FileZila tools.Next,input the following order:
maltab < test.m, when it finishes and will quit matlab automatically. 
   In this modeling contest ,we use cluster computing and obviously enhance our team's speed of solving problems. So i am urgent to study this technology.
 

嘿~被我看到了吧

00Counter.com