netlogo实现相向行驶的小汽车(共3页).docx
《netlogo实现相向行驶的小汽车(共3页).docx》由会员分享,可在线阅读,更多相关《netlogo实现相向行驶的小汽车(共3页).docx(3页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。
1、精选优质文档-倾情为你奉上在街道上行驶的汽车要求:1. 汽车按照上下行车道行驶2. 汽车的加速度和减速度,通过滑动空间来调节。行驶过程中不发生碰撞事件。3. 能够时时检测汽车在行驶过程中的最大速度和最小速度。4. 绘制某一选定汽车在整个运行期间的速度曲线globals sample-car turtles-own speed speed-limit speed-min to setup clear-all ask patches setup-road setup-cars reset-ticksendto setup-road if (pycor 0) set pcolor white end
2、to setup-cars set-default-shape turtles car crt number-of-cars set color blue set size 1 set shape car setxy random-xcor random-ycor set heading 90 ; set initial speed to be in range 0.1 to 1.0 set speed 0.1 + random-float .9 set ycor 2 set ycor random 2 + 6 set speed 0.1 + random-float .9 set speed
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- netlogo 实现 相向 行驶 小汽车
限制150内