设为首页收藏本站

最大的系统仿真与系统优化公益交流社区

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5948|回复: 9

[求助] 用AGV模板发生了以下错误,请解!

  [复制链接]
发表于 2011-11-5 16:38:28 | 显示全部楼层 |阅读模式
问题在哪里?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
 楼主| 发表于 2011-11-14 10:37:54 | 显示全部楼层
没有解决,再顶一下。
 楼主| 发表于 2011-11-17 11:03:27 | 显示全部楼层
/* called by:        entrance ctrl of the object 'track'% b6 j% [- v* ]# y, I: K) u
*/" F( Y4 k. Z1 L9 L' ~! B8 z
is1 ?3 n% ?( `, b5 `# U
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 U5 s$ y8 M& r1 B
do. W; E4 x/ w( x+ x0 Z
        Lan := rootfolder.Internal.Tools.AOLlanguage;9 ~8 P- R; c( u' |! t1 l4 w4 E+ L4 D
        if current = @.Destination -- else return
, a1 Q1 W; ~* ]2 h        then
6 |8 l$ b2 D( ]. l8 G, H                @.Destination := void;
  J2 K5 U. G& W1 Z" n5 ?- P1 ?' y% ^, [                if @.occupied then/ h  Z* L8 `, D  _
                        part := @.cont;
/ V8 F4 |4 I2 p* S) n! Q% Y- x6 g8 E                        @.transpOrder := void;2 @. o6 b2 Q6 @2 K! S# |
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( @/ h* w+ B) `2 |                                @,root.eventcontroller.simTime);
1 K9 y" u7 c+ V" Y8 s                        @.HasOrder := false;4 X, u& H1 y" w; Z2 B9 G$ e
                        @.DrivingHome := true;/ b$ ]% {& i4 L6 h% ]4 b# e
                        rgManager.tryToStartTransOrder;
8 \7 `8 [1 t, c. z                        if @.Destination = void
1 o2 e1 G2 C, k0 s6 v/ H                        then -- no transport order for vehicle @
1 [- O; l6 j" T0 b: B                                @.Destination :=+ s# E: z1 x* I5 E8 p$ h8 t# g0 G
                                rgManager.nearestFreeStation(@,track.~);, O" X& N5 O) v& ?$ I" b
                                newDirection(@);   
% \, x, y+ q% R. v5 Y# @, y: R+ _  j                                if @.Destination /= void then
2 H$ S2 L0 A/ d. }                                        @.Destination.NumReservation :=& ^+ [  |2 t5 w
                                        @.Destination.NumReservation + 1;) L6 }3 |" i. Z+ |/ U8 ?1 V
                                end;7 L* @; e# w) S$ Q
                                @.CurrIcon := "drivingHome";6 ~# M& X- @/ I5 T; y
                                @.DrivingHome := true;
" L9 D" w2 E: X6 @" s0 s                        end;: F( w" A8 n6 M6 Z
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: n3 Z% B7 [/ {, l7 z                        part := @.transpOrder;
) h! u  i" }9 l/ D& @                        part.move(@);-- load part: I' _- Q! w; a$ U% }8 d9 N
                        @.CurrIcon := "load";7 _& c* s" F6 K; _( {. ?2 n
                        GlobalDistObj := part.globDestination;
5 V! ~; a; c, b4 W/ E" U( T: |' T% `                        assignLObj := rgmanager.rgAssignL;9 P- m3 Y% J* m6 j' x
                        row := assignLObj.getRowNo(GlobalDistObj);: X5 H7 s6 @2 w2 n: t! g
                        if Row = -1 then -- since 70: G" j+ W6 T7 D) s8 s
                                if lan=1 then
: Q+ W9 R4 x# q2 `( W                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ Z% ]0 m& T, U% e9 {3 A9 S                                                to_str("in der Andockstation: \"",?.~.name,"\""));7 _( W" X4 ]3 K; c/ T4 P% @. f
                                else
" k: {+ |' u- ?+ x4 Z                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 R3 b6 I( ]! D+ V& l) _, r                                                to_str("in docking station: \"",?.~.name,"\""));                               
' f1 ^2 q; H# H! f8 A) m$ s% v/ y                                end;
- a- E) P& q2 v0 J) n                        else5 M6 B6 D; w7 ]3 x$ T
                                @.Destination := assignLObj[1,row];1 ?& ?* M' B( E. x# m1 D
                        end;                        2 a9 T' B& d' j) @3 d
                        newDirection(@);5 h! Z6 |# Y- ^  O- Y
                        @.HasOrder := true;
( u7 t: f, G% B* V3 e                end;9 u* R  R/ }0 l2 p, V1 l: u: d
        end;
4 Q$ f9 F2 U' e  M/ @( oend;        -- of the method
7 j1 l* n# D0 l2 q" D. ?3 z
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
# P/ _" G1 O% M+ S+ ~: e; g
$ \$ @) K7 ~, {" U$ N4 F/ R7 m- O这是AGV_putin中arrive的method。
* X- z) M; R+ q8 k
" }+ K  J: d9 U7 z$ M' R' A/ k当到达物料速度越高时,这个报警更多,# ?' `/ V7 @* w. O, g4 x5 T
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
+ C0 K+ o9 \" s: B( V8 c程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?3 c6 e: M" v+ B! R
7 ~7 j) P+ V& U: }- a" G" H( }4 M
另外一个小建议,就是move,所有的move都可以这样( y0 b4 b; ^9 U( Q4 e
if not move() then debug end  t9 B; c+ R$ t& s
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
/ }* [( w5 S8 h6 Iplant simulation中的free libraries有AGV模板,. `. g$ o, a+ B! |
里面也有案例。; E3 g2 q0 y' [( I0 r3 Q
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。% w5 T6 [3 O- z( R/ F3 P
& z) [- y0 C" [7 k* ^# `8 U- _
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 " F' E. \7 F! p* p7 g
5 N6 z& W" ]9 W# K7 W6 F% m+ f. Y5 w
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 , Y7 M4 B& d& s( D: o
这是AGV_putin中arrive的method。5 Z' u  e% ^6 T1 i4 A

& C9 Y2 S  ~. A9 m$ l4 e, X$ ]8 H当到达物料速度越高时,这个报警更多,

" C3 \0 X4 i7 `) i7 `, ^: L6 i! d另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|SimulWay 道于仿真   

GMT+8, 2026-1-5 17:14 , Processed in 0.023506 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表