设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7849|回复: 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'
  ?, I  \, o* B* h  ^7 `. v5 Z' f4 F*/' `# E, ?; ?7 T
is, ~! l, v  ?( X8 z, E
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% d7 T0 z, X* R2 Ddo5 F- L5 d& x5 v* d6 n
        Lan := rootfolder.Internal.Tools.AOLlanguage;
/ Y7 o0 ^" a- T- Q& t/ {        if current = @.Destination -- else return- l8 K; z, V: I5 U* ~  C# J
        then
5 m' z& [: c  q( D3 p% s                @.Destination := void;! S2 ~/ T2 P1 r9 H# Q; S
                if @.occupied then" i  d& b0 x* ], K) e
                        part := @.cont;
! r5 w0 r. D; h! |                        @.transpOrder := void;
9 e2 a+ `5 r- z$ |' m8 x0 M                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ c- C! _/ K4 [+ H7 O. V
                                @,root.eventcontroller.simTime);
- _2 R8 I& d: o* z, M                        @.HasOrder := false;# q( m( h# t1 ~) E  D
                        @.DrivingHome := true;6 \2 P2 b7 E: Q7 W% t& U
                        rgManager.tryToStartTransOrder;
, z3 q1 |  @4 T! g1 R                        if @.Destination = void
; z. Q- v2 B* p                        then -- no transport order for vehicle @; g4 Y( [+ E+ b& A- ?( Y
                                @.Destination :=
  A( ^- X; s5 E2 K                                rgManager.nearestFreeStation(@,track.~);
* R2 V) O: q2 r0 r. Y* z& H                                newDirection(@);   
/ x- S" ?$ m" O# K                                if @.Destination /= void then
- z2 D0 N+ U3 d& I                                        @.Destination.NumReservation :=: f" ^; h% s& m7 e
                                        @.Destination.NumReservation + 1;
: b# ?- l$ j/ @3 S7 {                                end;
$ x( X6 E9 G4 M! w0 u2 i, J- N. ?- N                                @.CurrIcon := "drivingHome";/ q2 B7 C+ }/ \. P5 K, G3 s
                                @.DrivingHome := true;5 ]2 P$ ]9 ~. y" u0 m+ A1 G. e
                        end;
/ S+ h( F7 e5 A' C                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( I. E- A' r8 v1 K( p                        part := @.transpOrder;+ V* L. ~, w0 ~: |0 J7 m1 W$ H5 k
                        part.move(@);-- load part
# F6 b3 z* o: F+ Y$ ^- Q0 i                        @.CurrIcon := "load";$ B  A5 k% [, h
                        GlobalDistObj := part.globDestination;3 P' i! Z; Z& u1 [
                        assignLObj := rgmanager.rgAssignL;
& z8 m! o$ c" \$ i- u                        row := assignLObj.getRowNo(GlobalDistObj);4 j. u+ d3 n1 P  `1 x* i
                        if Row = -1 then -- since 70% P" v" G" V3 l0 j: s8 h0 l
                                if lan=1 then& t: M% d! C9 u9 {/ ?; T# Q
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) S* x1 k) f6 R* u* u6 X% G                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ M: f$ \% g! v% A5 R5 g# M
                                else4 c+ L/ `% R# J0 W7 J# ^
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) B5 Y: p  {  V+ }4 Y
                                                to_str("in docking station: \"",?.~.name,"\""));                               
: ?2 w, i$ Z7 b0 w& c: j  ~" a1 G. B1 C                                end;" z6 a5 n; E# ?  V: s
                        else) Q) `" o" x# U5 \8 B# m4 @- R
                                @.Destination := assignLObj[1,row];
5 }1 M: j& i3 P6 P0 ^, |                        end;                       
5 ]; m: J8 g* K& g) G) g                        newDirection(@);8 L2 L2 {; ~% k1 I! f- W$ q2 z: S$ N
                        @.HasOrder := true;+ t, \! t& W; M$ ^+ f( [# M! M
                end;$ R% a) l2 {7 y8 d. j, u
        end;
3 L8 [) |- @7 [9 {4 ~end;        -- of the method
$ G7 A( `" h( a: N1 S
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ) j- n- z7 M+ d$ \- w* c  v
! n% E& }/ a) Q. M% r! u
这是AGV_putin中arrive的method。
4 S: t9 w/ f) X+ O; h3 Q. d- z
  [( L0 @2 S% \: L$ P1 X当到达物料速度越高时,这个报警更多,9 ~- s" D* |3 c1 o# r5 G
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。6 x/ v# b1 }: _, n6 e5 F
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?& {; W. l, e* @/ S) y2 \* L, p% a
8 s! `" v6 ?+ C  p! M
另外一个小建议,就是move,所有的move都可以这样' l, t; a9 S9 G% N
if not move() then debug end# m% ]& B. N$ w5 ~7 [, ^. a
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。! X" T) O: }$ O7 P+ I5 M
plant simulation中的free libraries有AGV模板,+ K5 k0 f4 K4 M4 `5 E  z( E
里面也有案例。
+ Z0 }9 p9 S# ~. m5 R" Y我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。6 ~% ?) S' }& I
0 t( r/ v1 `0 W, w3 g" x: |' t
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 5 z, {% ]" M5 Z$ w/ }: d

9 c/ ]# {+ i: ~! ?9 O' s, [7 a) |. r% {那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
1 D& i9 A' w( X. J  J% `' S3 \这是AGV_putin中arrive的method。
; m- v7 o, x+ Y1 ^, [1 b$ u* y" `3 W" d5 J* a+ N% R
当到达物料速度越高时,这个报警更多,
$ p- }) J+ S% V) `0 y# n' f- f
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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