设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9779|回复: 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'
2 l& h: N$ Y3 \( H) n( Y*/& g! G+ \( s/ q7 _) E& X/ I
is
' _' k6 b( f. c        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# c0 o# c* z6 [' c8 a+ w# u1 `do
% s- H8 E1 E- E( |. g        Lan := rootfolder.Internal.Tools.AOLlanguage;
( }- E5 Z7 h  Q        if current = @.Destination -- else return
+ _  P* y% ^; w8 M2 j* l        then
3 ^9 U+ Y: Z# B  t4 J, q: q! P                @.Destination := void;
/ ~! C5 |; w' G* @8 j8 _6 n7 ~                if @.occupied then
6 `2 \( J/ c9 L3 R! g2 Q                        part := @.cont;7 i( b8 @; q- Z: z/ p
                        @.transpOrder := void;0 O* N4 ^, S8 j% {/ S+ M2 }8 g3 r; A# X
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- l, S1 V1 C% z& \
                                @,root.eventcontroller.simTime);! j& U4 N" _/ ^: R
                        @.HasOrder := false;
  k* y2 q0 c/ O. \                        @.DrivingHome := true;
: C3 y7 f: N6 U' ]! s  I! o                        rgManager.tryToStartTransOrder;. N2 n5 H/ @1 Q/ D
                        if @.Destination = void
4 V- W: r( t& u8 V4 b                        then -- no transport order for vehicle @
* @; A% D( i( Q4 I- U' S4 {! @                                @.Destination :=% i* J- {7 u9 a
                                rgManager.nearestFreeStation(@,track.~);
' U- }$ V: |  x- ~" ?( z                                newDirection(@);   : h7 }# N/ ~1 h  i% K2 `$ f$ y
                                if @.Destination /= void then8 a# A* h6 |" I- V
                                        @.Destination.NumReservation :=
# ~; d- G0 z2 J9 B& H                                        @.Destination.NumReservation + 1;  V, q; q0 E+ Z+ t4 T
                                end;
( `1 W/ J! u6 J* W5 N$ Q3 Q                                @.CurrIcon := "drivingHome";5 a* B' p" {2 d
                                @.DrivingHome := true;. V2 i$ e6 W( M5 _% D+ O! t6 |# {
                        end;) E8 `. F7 x) W
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 z7 e# u& m' k# F$ d5 ^, q& D                        part := @.transpOrder;
$ R7 V; I; H# C' T- j: `                        part.move(@);-- load part: V# z$ @/ ~8 v, a3 q/ c
                        @.CurrIcon := "load";8 v3 ^2 z& M9 r' S: W8 C  m
                        GlobalDistObj := part.globDestination;
) n" {4 w/ I) A                        assignLObj := rgmanager.rgAssignL;
. F6 x4 i+ h# w# H8 J" j                        row := assignLObj.getRowNo(GlobalDistObj);  \- U, J1 J0 o( {& H) U
                        if Row = -1 then -- since 70. d# n1 Z( E, g/ `3 M' y* A
                                if lan=1 then7 H9 o) a5 P- L# U: Q) o
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* P6 z' Y. f! b0 }
                                                to_str("in der Andockstation: \"",?.~.name,"\""));2 I* x0 f! R/ ^  p' ^. Z
                                else
, A3 ^5 b: G; c3 Y: E                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),  z- a$ X1 A8 k
                                                to_str("in docking station: \"",?.~.name,"\""));                                1 b1 E1 N4 n! B8 w$ C. E
                                end;6 p' m# o. p3 o+ }4 b& p4 Z+ N
                        else
% h3 d8 O+ f  c. ?! O/ a                                @.Destination := assignLObj[1,row];8 N7 @9 ^4 u# e. r; z! d- V
                        end;                       
; l/ z" ^/ f6 R' A8 H: a8 t3 u                        newDirection(@);
3 b; M# P" W) }% r* g' x2 p                        @.HasOrder := true;/ Q8 h7 g0 e9 S: R9 F& k* @9 a+ s
                end;- A- }) `4 ^; N  j5 ~
        end;
2 y9 T/ t' V% K. S9 u6 h# Yend;        -- of the method
1 n# P* E2 n9 ~1 J  l4 N' q  d
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 6 g7 G1 C0 F2 g; M3 d4 S. U
( g1 q# C! @4 o% j" _( U& M. Y
这是AGV_putin中arrive的method。
: b: ~0 y# Y0 V" a1 @: L
1 ]5 z  z. z% f0 E5 h# i当到达物料速度越高时,这个报警更多,
3 }. z' L1 g2 B2 j; K可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。' ], P: m3 _, B: [
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?- `! q# R% h0 y0 r. a: d8 ?6 U

0 ?" H# ^, k5 Q6 ^另外一个小建议,就是move,所有的move都可以这样/ B3 n% a; l* n
if not move() then debug end; X  p! u7 k. {
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
! P3 r& E. S, G0 gplant simulation中的free libraries有AGV模板,, d$ y. H, v! i
里面也有案例。
. m" n7 f' z+ d& k我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
7 o  z. f! C: @6 t/ W6 }$ d6 j3 A2 c! B( @& V& p
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 / u) K, J  a8 {; {6 G- u- t
) d* X0 O% D1 [7 o4 ~
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 & z" t/ {; Z, |* H0 D4 }6 K
这是AGV_putin中arrive的method。
: J# ?+ C! |! u0 x- E6 c" T; |# K3 M" F! k6 I% M
当到达物料速度越高时,这个报警更多,
0 H; j- u- ^- l5 q' d. U' h
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-24 12:40 , Processed in 0.027222 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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