设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8474|回复: 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'
& Z4 N5 m! p: |) {+ m*/
3 J1 i% T. e9 k5 e5 v4 Qis
& q5 @/ z% v3 y        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& i% F9 R4 t# R1 _6 Z2 @do
& L) e/ j! V2 D* u; q6 t  [        Lan := rootfolder.Internal.Tools.AOLlanguage;1 s6 h+ i, x3 k( h, s+ k- x
        if current = @.Destination -- else return
, m( N# e6 E4 j        then: w* K( F' g7 z2 G% s) M
                @.Destination := void;2 h. R3 K/ Z: G4 b# L& R5 S$ W
                if @.occupied then
7 d, q! a& f6 n1 q                        part := @.cont;( e$ q4 `# x7 o! r( B
                        @.transpOrder := void;7 q: z& x! W5 P
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& a7 G. Y. T( b7 D                                @,root.eventcontroller.simTime);) o# ^0 W" W+ X! Z# G3 u; e6 Q, W0 d
                        @.HasOrder := false;; r  A. _+ J  j) Z
                        @.DrivingHome := true;
1 E1 |$ F) n! ?1 s" ?                        rgManager.tryToStartTransOrder;
/ }, x4 E' b6 L                        if @.Destination = void, y# K; ~- ~' s3 N( d
                        then -- no transport order for vehicle @) }/ i2 Q1 w. u9 G
                                @.Destination :=9 D* t4 ^" n* g
                                rgManager.nearestFreeStation(@,track.~);- P- @/ R) K# D6 d$ \& c" `& [' H
                                newDirection(@);   
/ v# H  O8 m7 E# H                                if @.Destination /= void then
/ o; l6 J; d, e* p                                        @.Destination.NumReservation :=
! B8 |7 p9 a! A" X- q' z                                        @.Destination.NumReservation + 1;7 I4 \: K/ b" C9 G, }2 f) j( I3 x3 j3 T
                                end;
8 f. J7 C) P, w6 `                                @.CurrIcon := "drivingHome";! f4 L" x% S/ B' Y' j3 S
                                @.DrivingHome := true;
! G7 x. W) T; b7 N8 x                        end;
; o0 w/ K, V4 ?. o                else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 C% m4 h: a( ~: W6 x; K; `
                        part := @.transpOrder;% z0 I, ~$ h7 Z1 W
                        part.move(@);-- load part
7 G9 H1 a7 f7 y4 r2 c' N                        @.CurrIcon := "load";' B  j1 L( h7 \
                        GlobalDistObj := part.globDestination;
" Z. m  ~$ N: }  p                        assignLObj := rgmanager.rgAssignL;
- I( d% {/ O/ |                        row := assignLObj.getRowNo(GlobalDistObj);- O' {) ^( k: Z
                        if Row = -1 then -- since 70; g: p* k# I% K
                                if lan=1 then% b! |3 I+ d$ r9 b. U  N3 l3 R; U
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 Z* W, R- g8 }, b6 b
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
# X6 \* E$ S3 g2 c3 q" i                                else
  d0 ]! e! v$ Z2 J9 P) A/ K+ O                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ @9 R5 M/ A1 ~
                                                to_str("in docking station: \"",?.~.name,"\""));                                - H+ s/ f0 Q1 i1 P+ T- m
                                end;8 F: x2 H% f  O  x
                        else- c! a- g+ ?( K; J1 `7 ^
                                @.Destination := assignLObj[1,row];
; e7 U9 ~: D; N# o) d2 p/ n                        end;                       
( q& G: c$ G4 Q$ U                        newDirection(@);
2 }$ y* ?4 r- A/ F+ }: N/ {                        @.HasOrder := true;* n# H3 [- [+ M) x# ]
                end;
. T: L! c4 |0 W7 G! i0 O; N; G        end;
7 W1 w8 v: U' `* j& [end;        -- of the method; ~# V3 P5 U8 a7 Z0 T
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
; }/ q  n+ _1 b& V  ~5 @
0 ?4 j# h$ a0 w3 x9 E5 n5 u这是AGV_putin中arrive的method。
* g  Z" f5 {$ K/ D$ V" q  D0 `6 O5 W' B, l% T( A4 a
当到达物料速度越高时,这个报警更多,
, G/ u, J  v0 f& ]7 }- R  t5 Q9 q可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。9 b3 y' c/ C4 _# |" Y/ M; c& {
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?% ?& \1 Y# z1 \3 S% H
9 }7 l, ]- V! g. B0 O- i+ v
另外一个小建议,就是move,所有的move都可以这样! X) H& R9 t, F5 F
if not move() then debug end
) N' f& P, b% `这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。/ C& a0 k; ?0 J( v
plant simulation中的free libraries有AGV模板,
" n8 {, a# ~$ b5 ~里面也有案例。# G* I6 |1 q& A; [  }
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。- S1 ^  y: u7 K% R. S. t$ l" Q. E

! x8 a9 e/ q0 p& T我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 / n, _) J4 v9 J( G3 \/ q

0 |: ~8 v* `1 r0 s! E5 Z2 [那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
) p* q5 Q2 Q4 K9 m* i这是AGV_putin中arrive的method。6 |, e$ k3 L/ U6 N- z" \. u7 \! H- \

" w3 v6 m( {3 z3 w当到达物料速度越高时,这个报警更多,

5 f" _# P4 x8 p0 }另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-6 06:16 , Processed in 0.018235 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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