设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8110|回复: 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'* l* e5 {8 f5 V2 m3 I# c
*/3 z) j+ s+ z$ B
is2 u; K6 w. i9 W1 ~4 G
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 r& p* c" E  g& \2 Pdo
$ ]2 F/ d' F. _* q" y# q- d  ~2 v        Lan := rootfolder.Internal.Tools.AOLlanguage;$ `- R2 R7 l& K7 f1 G) P9 ^
        if current = @.Destination -- else return
5 S# b4 |& j% U  W8 i* L/ }% y        then
" U3 S, k  f# o9 m  V, @& `                @.Destination := void;6 I% [( p9 W* V9 Z
                if @.occupied then- W6 \( [5 y( s. s/ o
                        part := @.cont;
3 M5 J) }4 d& N                        @.transpOrder := void;. L$ _' J# m/ g9 j) E' v$ G
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ Q9 b# H. }( y- M, u* |& y& O                                @,root.eventcontroller.simTime);
5 i6 j, D0 }1 a! C0 X3 ?                        @.HasOrder := false;
, L" Y' v# N$ S/ ~8 w6 T                        @.DrivingHome := true;- ~6 o' h# O0 u. p) H9 P: N% @6 o
                        rgManager.tryToStartTransOrder;$ {1 |' D) P7 n/ }/ Q
                        if @.Destination = void( `# F& c  Z4 a) p1 x: K
                        then -- no transport order for vehicle @9 b9 A/ k  q4 Y) t) ?
                                @.Destination :=' k, L5 e, d" b- ]0 R$ k1 H0 a1 N
                                rgManager.nearestFreeStation(@,track.~);! Y. s5 g) m/ L1 W
                                newDirection(@);   
2 _. T2 d' A- r3 p' M* Q' r# m                                if @.Destination /= void then
& y5 e9 U& o9 l, V7 u  H                                        @.Destination.NumReservation :=% g& N9 Z: s8 ~1 C9 z# e
                                        @.Destination.NumReservation + 1;
, x+ ~+ g& y7 ?: b5 g& m' D                                end;
# X" F, x$ a' \2 f                                @.CurrIcon := "drivingHome";
+ \2 S0 P1 S1 J, B/ n                                @.DrivingHome := true;
) ]) q# a. q) l3 s                        end;
) R4 e9 l" {/ U1 X& W3 Z                else -- the vehicle @ is empty, both vehicle and part are in the same dock station# \9 ]* X5 e+ p8 E1 |- {
                        part := @.transpOrder;
: L, K/ ?" s* A                        part.move(@);-- load part
2 l8 A# Z: {, L0 ]                        @.CurrIcon := "load";
/ [! L# M7 n" W+ @  [" M7 e9 t& r                        GlobalDistObj := part.globDestination;
3 W% B' z$ [9 y- S. [" [                        assignLObj := rgmanager.rgAssignL;
0 d" B8 e, u. A                        row := assignLObj.getRowNo(GlobalDistObj);9 {, z2 W9 ?) v8 M8 ^
                        if Row = -1 then -- since 70& D2 h/ z  ^( J: c0 D
                                if lan=1 then0 U6 P2 U* e& R% P" b2 o
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 ]/ W7 G/ s) u" ]! W
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
( U9 O) Y! w( n. y' C                                else
) I+ j3 c0 r! ~' C0 A                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 c; j5 i$ r4 _+ t                                                to_str("in docking station: \"",?.~.name,"\""));                                ) G3 |9 z: |% L. D
                                end;
: g8 l. B6 N) a8 K                        else* D! @( i% \1 z) C: G! F. H
                                @.Destination := assignLObj[1,row];/ Z$ z- k9 y+ I& w  C
                        end;                       
' b" ^/ R9 A* E! V( `                        newDirection(@);
  e, G3 F& K/ u5 T                        @.HasOrder := true;
  G9 j5 P, }& r& ^2 s% \" E                end;/ V" V- x! E, b- x9 x! V2 }8 y
        end;
9 _6 i7 w* S! [1 d' `end;        -- of the method! w% @$ |9 F/ `5 u2 f+ n) a
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
. s% b8 ?  n5 r0 `0 d6 U+ R" r/ ]" }  w6 Q
这是AGV_putin中arrive的method。/ y$ B2 x# L5 ~4 s5 t: }# w& R
' ^" M' e( |4 _' ~8 Y1 B8 i
当到达物料速度越高时,这个报警更多,
4 Z- R; J" `+ K3 R; l! ~- w+ a# [" I可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
8 Q. b$ D4 x9 j# @! O8 F  [程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?$ `: J6 [8 B4 B1 j* Z" Z: p

6 I! X& ~8 M: L8 ]另外一个小建议,就是move,所有的move都可以这样
$ C8 C) u- k5 O9 a5 Nif not move() then debug end
& u2 }  ]8 Y# t' i; o& D这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。7 U! h! O+ C0 G) \. O
plant simulation中的free libraries有AGV模板,
+ l$ e( O4 ^5 e1 ~里面也有案例。
- O5 f8 P: ?# M: b1 y我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
5 e; u9 c) `5 H% y1 F
. i4 Y/ }9 t* z# s$ U0 f3 }  i. w) Y3 r我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 + M- Y7 {, b/ h, W: b
" v5 V) J0 X( L3 X- v& @& {
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 # L4 _( K: J2 l9 w( @
这是AGV_putin中arrive的method。
. @: n8 Y+ X$ K+ Y: q) d
* a% A1 y5 D# ~5 ?- I当到达物料速度越高时,这个报警更多,

# y7 q, z# }  b) i另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-15 08:48 , Processed in 0.021049 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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