设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6366|回复: 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'6 C3 s- {* F* c; f- n+ O
*/
" [+ f& F8 k) P2 G' }7 K: eis: I) H: t( P' f) ~; t  D
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
  C( T, U% L9 mdo4 ?1 J: _1 H* t
        Lan := rootfolder.Internal.Tools.AOLlanguage;
8 [/ m# L/ A' i! ^) K! c6 M        if current = @.Destination -- else return& U) M! g1 U/ p% H1 ]0 ~: F: H
        then
7 g! Y1 B# Q) J2 ]* b+ {                @.Destination := void;( n, c. A! {. \" w. T" Y
                if @.occupied then
# J$ T: W# L! r% [9 m9 K                        part := @.cont;
) P- W( C$ j- F; i! \; C9 q6 H                        @.transpOrder := void;
# o) F% @5 o. ~, Z! T2 E; u                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ r- ^. R, a6 |$ v$ \2 Y- x                                @,root.eventcontroller.simTime);
& }2 x7 w+ S1 O6 M                        @.HasOrder := false;
6 n" E( r, i& w4 D8 w( H& v. w7 a. G                        @.DrivingHome := true;. b. W9 U2 l. F' B7 S
                        rgManager.tryToStartTransOrder;* f) p/ Q5 r1 S. `
                        if @.Destination = void
* u5 \1 T2 K( b, w  v" }" O                        then -- no transport order for vehicle @1 F8 F7 g! P* B: q  P5 B
                                @.Destination :=
2 G4 C% O7 ]6 ], c" T                                rgManager.nearestFreeStation(@,track.~);
3 m" J1 V) @  b7 n$ t: j+ q                                newDirection(@);   
. r" L. T3 p7 ^+ |                                if @.Destination /= void then. n6 z  {! N( H: {  e5 ?
                                        @.Destination.NumReservation :=
* K8 m3 x. M; p0 J+ w+ h                                        @.Destination.NumReservation + 1;
4 }! j, _: P0 k' D% u$ l                                end;
8 `+ g  ]; v1 J% X                                @.CurrIcon := "drivingHome";
0 _. P  T4 P6 a4 L$ I# D: N                                @.DrivingHome := true;
+ w( F2 C/ n8 q                        end;
1 o0 _- Y' z7 V: v                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( N- a2 @9 W( A9 d: s  E                        part := @.transpOrder;: Q+ V4 z1 g2 n, S7 V) V) |. y6 @8 N
                        part.move(@);-- load part- J2 e9 X7 J( R2 c% ^8 i: a! B7 C" u
                        @.CurrIcon := "load";, |0 Z4 N5 _, J2 \. y7 j% P
                        GlobalDistObj := part.globDestination;! L$ N4 f7 j% \( W
                        assignLObj := rgmanager.rgAssignL;
4 Q! l1 P. _; i" a                        row := assignLObj.getRowNo(GlobalDistObj);# [& A; p5 i$ D$ @
                        if Row = -1 then -- since 70# P% o: R6 ^  I1 w9 V
                                if lan=1 then
' L5 [: A" c# U9 u4 y- p                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& ]+ e! Q1 S: k/ M5 I8 m$ Y( D                                                to_str("in der Andockstation: \"",?.~.name,"\""));
/ k8 W. Z- E/ ?  s                                else% g! R6 I# C/ c2 M$ Y
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 |& e/ R+ f/ M2 j                                                to_str("in docking station: \"",?.~.name,"\""));                               
) ]1 y" H+ h2 a; p$ @" ^                                end;) J' o0 a& e5 `. [
                        else9 u) O. k4 E) f6 _
                                @.Destination := assignLObj[1,row];8 l4 a# M) h* C% E5 D
                        end;                       
6 y5 H0 [  i/ c+ L7 ?6 b7 i                        newDirection(@);
9 e% f( ?; `4 f5 J: w                        @.HasOrder := true;, g4 ^' T/ m3 \4 _+ y$ F  g
                end;
: ?. g+ r0 `/ t8 n- Z6 C        end;) P, G2 |+ b* @6 Q/ O/ q; W
end;        -- of the method
( R3 d4 K' l; ^) C
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
! x/ r, s5 ~6 _* G7 I) n. Y; s+ l" I+ Z7 V% P; r/ [! n' L
这是AGV_putin中arrive的method。
& o1 @4 g6 B! u% `8 k0 C  ?- v& D6 z# {+ _% Z6 G
当到达物料速度越高时,这个报警更多,
# W( P3 P# I$ ^7 `2 J" B7 H可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。# F7 n6 E4 U/ V- Z: a
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
+ M0 w$ ]8 L- O2 J& j. T# ^! e
! t9 o  U- @' [  ?0 x/ N2 u" h另外一个小建议,就是move,所有的move都可以这样
8 W6 d+ S) m. c4 D2 Zif not move() then debug end
* q4 e" U- K- l1 P, L这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
' w' r# I) x  i2 K7 J+ ~* s9 Yplant simulation中的free libraries有AGV模板,, f/ Q' n9 S4 g/ [, K$ e8 f
里面也有案例。$ ~# |& s( n5 l* R$ z
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。6 p2 u4 R) R" |! X! y. T

' A$ V( p2 }% C( J- d) B- S我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 9 B- u4 X/ O8 f8 F

! G' d8 q) \1 S0 D6 ~' f' a那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
' u* \0 B; r# n3 E; x3 t! c3 ^这是AGV_putin中arrive的method。
7 x6 j# g2 ]; |' [& q/ \- u5 o8 u+ g* b4 o5 o. c# c% M4 B
当到达物料速度越高时,这个报警更多,
0 S% Q4 X' S2 l) h
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-2 01:47 , Processed in 0.020814 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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