设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6740|回复: 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'/ D  k5 q) f) V! `2 `- r
*/5 {; ?& g- {0 Z  r+ D5 x$ Y
is
( g) _6 M; b5 M/ D* d        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' X/ f6 G4 C" ?1 _: [% v( ddo- D6 S! I1 W: z! `; c7 h0 \, q6 S
        Lan := rootfolder.Internal.Tools.AOLlanguage;" M  Q2 z# }4 `  A# p- f2 X
        if current = @.Destination -- else return
2 r$ w" |# K  L' D4 r3 S' w6 r        then
1 E2 B) ~: P! }( V9 \                @.Destination := void;
' h) C4 e7 s6 h2 T/ M                if @.occupied then
, d* A, l5 O& O                        part := @.cont;
5 m! `! X' k& ]5 x                        @.transpOrder := void;: D1 I% k' o0 n; l& y3 J( h
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' J2 c: V# j$ z& V! S0 m9 i. c6 G: s
                                @,root.eventcontroller.simTime);* v+ _( M# }1 U! i+ ?
                        @.HasOrder := false;
9 F- O) _& F" t9 Y0 |4 p7 q6 @                        @.DrivingHome := true;$ G1 `3 E% H2 ~
                        rgManager.tryToStartTransOrder;
/ I* O3 e  ?- U' D. H& ?5 L( j* r                        if @.Destination = void' z9 ~" k$ {: u$ B! o
                        then -- no transport order for vehicle @8 K8 |9 w2 w( W# V
                                @.Destination :=
5 Q1 l: p. o5 Q) k' A                                rgManager.nearestFreeStation(@,track.~);
, x! x* u* N( l                                newDirection(@);   5 F3 V  O1 F. l
                                if @.Destination /= void then
% y1 j! u0 l0 f3 G* C* @                                        @.Destination.NumReservation :=1 ]$ j  M% v! K2 B9 V% H" b. {
                                        @.Destination.NumReservation + 1;5 ^3 q9 F1 o: h/ Z2 O& u
                                end;8 T9 ?4 k$ t. y) T1 E3 l, e/ p
                                @.CurrIcon := "drivingHome";; d& v/ i7 b; e/ X
                                @.DrivingHome := true;
, `( q% n0 ?$ [                        end;" l2 F1 \8 F0 y) M  H* l  Q9 O
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station, Y8 e6 J3 K( A# O# n
                        part := @.transpOrder;
8 [" E; w% p" L6 \4 v7 A5 L. O                        part.move(@);-- load part
* }! ~" k% ]0 Q2 v                        @.CurrIcon := "load";
( Z" T9 h9 p- Q3 s% T* E1 I1 r$ u                        GlobalDistObj := part.globDestination;
7 i! S% z+ F2 y2 `8 Q* U% `0 \: C                        assignLObj := rgmanager.rgAssignL;
) v9 W5 M9 F0 I: v# ]                        row := assignLObj.getRowNo(GlobalDistObj);; J$ X/ S/ x  X. \
                        if Row = -1 then -- since 70% X2 J& o" a% f+ p- ?' {5 Q
                                if lan=1 then
1 U- y( S5 M) [: ?$ k1 U                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 B1 D$ R( K& J' |0 r0 u                                                to_str("in der Andockstation: \"",?.~.name,"\""));, d. B$ `5 f5 w, r- |$ @4 [' _
                                else5 q4 B" K8 Y0 e. p# J3 Z0 s! x
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" m; e7 |" p2 G" `# i9 r0 H& t6 |                                                to_str("in docking station: \"",?.~.name,"\""));                               
7 q0 M9 Z- f0 S                                end;
6 O* l" c8 X5 o* E3 M2 j" ~" k                        else
. g+ J7 L; B5 X4 g                                @.Destination := assignLObj[1,row];
- M# |2 M5 r* @# ~5 ]' [                        end;                       
; G: D2 a. `( G  \' L* U                        newDirection(@);
4 f) K$ W( D' j6 m2 F8 P6 N8 q                        @.HasOrder := true;/ d; n+ X2 O) h
                end;
5 l: m! I# K% F& W) s, y  s        end;0 Y8 N( ^# l# |$ S5 m) |
end;        -- of the method4 H8 T8 w, s9 P' P! S. K
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
9 X4 g/ t) J4 e1 ]2 {* V3 l, A% R/ l% ]+ y- U9 @
这是AGV_putin中arrive的method。0 w( p# g- t" R" [2 p% V6 ?

* L! d7 v# u, r! e2 X当到达物料速度越高时,这个报警更多,
( y* ?- O2 `$ W可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
0 V7 W. y, W/ H" @程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?3 D$ N: ]% L4 ~- _. i* x

6 J" c) {5 \2 n7 Y& `: U另外一个小建议,就是move,所有的move都可以这样
* A3 [6 K$ f. \% d; r2 S6 uif not move() then debug end
5 R' T- n( h! X8 G$ f4 {这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。1 D3 r7 d- B, d' |( s
plant simulation中的free libraries有AGV模板,
9 h8 a) H/ F; S, n  M9 q里面也有案例。
, m5 J. ^: _4 X& H, G4 ^) }6 k我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。3 F6 P( K+ Y4 O

2 C# m1 N3 d% F: \' j我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
, q& p, X- o. w
2 n3 x5 f; e' u; m; s' L0 @那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
, v/ g5 v* V" _- }, f6 }这是AGV_putin中arrive的method。6 [% v! d* X- v3 H9 X& H( C* \% K

4 Q4 L/ c4 Z/ T  u当到达物料速度越高时,这个报警更多,

" S6 L/ w5 _4 o5 t; C另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-23 17:48 , Processed in 0.016705 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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