设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5991|回复: 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'
' G* s7 g- |& X# ?/ y, b*/
3 ?; a* P  l5 v1 [is& L5 R: \. n; b( \( Z; ^6 q
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;, |  _, ]7 m9 T& I
do
# |0 E+ s0 ^" S6 P% j- a% ]# R- P        Lan := rootfolder.Internal.Tools.AOLlanguage;0 t5 f) v9 C5 O% Z0 X5 j$ y
        if current = @.Destination -- else return
  d+ J9 |, S7 t& @) Q+ W7 z        then
! |# O' F; Q) m. t                @.Destination := void;
- J; ~5 g! z* k                if @.occupied then, s. c; |8 J) o6 @2 R3 z4 f
                        part := @.cont;2 ^- A4 ]1 T: n/ b
                        @.transpOrder := void;
3 d0 A# I2 n! I- _                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; {; ]. W5 N  ~8 C4 x; {9 Z
                                @,root.eventcontroller.simTime);
0 w3 K% t/ V$ h4 k) q3 n1 N4 ]                        @.HasOrder := false;! o8 u5 t1 w/ n/ ^& \
                        @.DrivingHome := true;
4 I' z1 G' i( R7 k7 x                        rgManager.tryToStartTransOrder;+ j/ c! \, |' n8 X' Z  |" G
                        if @.Destination = void
: P1 |: Z, R2 o1 G                        then -- no transport order for vehicle @8 e$ n+ v$ I. u% C' ~2 n
                                @.Destination :=) W+ ]: G% o2 V. ~
                                rgManager.nearestFreeStation(@,track.~);
7 |" b( O- P( N% ^! W* T                                newDirection(@);   * G6 B/ e& U2 [! c8 S0 ]/ L
                                if @.Destination /= void then
( t( d4 `/ y9 }" l  X/ w0 ?                                        @.Destination.NumReservation :=
6 J$ z) w' x/ D; ^                                        @.Destination.NumReservation + 1;, L4 R3 x9 P% R0 D& r" P4 a, u
                                end;
& E. q  g' a" p/ k8 x* S                                @.CurrIcon := "drivingHome";
" d" B- W0 o2 Y                                @.DrivingHome := true;* `: u) W. V0 N! k3 \5 D! Y( \( P
                        end;
; k' c5 L$ f9 B3 F% o! [/ G: K  r; Z: N                else -- the vehicle @ is empty, both vehicle and part are in the same dock station: ?4 P, L* i% M2 s+ A8 A
                        part := @.transpOrder;# {7 O! ~4 g2 }
                        part.move(@);-- load part
+ J* M  t5 ]9 N. N                        @.CurrIcon := "load";' \% S+ T# P+ L' m, u
                        GlobalDistObj := part.globDestination;% Z$ ?% m5 q2 [# c: M' Z; I8 c
                        assignLObj := rgmanager.rgAssignL;
" _- Y% q/ E; a; `2 _7 ~5 O" |- B                        row := assignLObj.getRowNo(GlobalDistObj);
+ }9 [- x7 ?  g: f! o1 w+ a2 ^                        if Row = -1 then -- since 70
8 y: g' b3 D  k                                if lan=1 then
: A" Q6 B  `4 x2 H# i  i/ ?                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# D! l$ _+ n) {' |# z
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
! O3 Z3 W  Y3 L9 w# C3 W+ ^                                else$ Y+ I* O3 w$ U; _2 t1 W
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," [, Q+ X& ~5 n) J6 W* V7 h3 q
                                                to_str("in docking station: \"",?.~.name,"\""));                               
7 l3 @. B. O$ Y9 z+ ?                                end;
7 N$ C) X5 A/ _                        else
& U( Y- \( |5 f1 S! W, H                                @.Destination := assignLObj[1,row];5 G8 g* C( U+ r) W# N2 c/ R" H
                        end;                       
$ P4 V! V: O# l% K# q6 P8 k                        newDirection(@);
0 ]8 ^7 a9 b) s" \                        @.HasOrder := true;& U* J1 u8 ]4 [: Z; ~  g# S
                end;
9 P- a- K+ j$ `8 x4 Y: ~        end;7 T2 |$ R  r; \- U# R6 h
end;        -- of the method
* q) a) Z) s2 J: ^% A7 s+ ]" c
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
/ p1 b, @+ x+ u2 G7 i4 x6 H6 T/ ^0 p% i  m
这是AGV_putin中arrive的method。
$ Q2 y6 k" e* i: O/ Q# ]6 a0 X+ x: {8 w$ y. s4 P6 [& }, d/ k  C
当到达物料速度越高时,这个报警更多,
* U: y" W/ o0 s) S( f6 u5 D可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
# k0 j  W% E$ g- O$ R# Y程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; Q" c$ ^# {7 p! P( x- r, d

& M$ i# F$ y" p! G# a$ l另外一个小建议,就是move,所有的move都可以这样1 U" _& r4 \% B* T2 o& L8 U
if not move() then debug end
, [- e. f6 l- ]这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。9 k6 m9 M( I) N$ y
plant simulation中的free libraries有AGV模板,
9 I2 y9 l  N$ T2 a里面也有案例。
  H7 z# K' k2 S我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
1 @2 X. Q4 {9 x) t3 l7 j. [6 o  B* M1 E6 |
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
$ Z0 H3 l! i) l0 r6 k& N0 }3 K9 J, K& \6 q/ x6 d6 G! \, t
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 # `" `- {9 ~2 T' ?0 |) T
这是AGV_putin中arrive的method。
# S- I8 y! h6 @' O
2 x- d8 I4 ^/ ~) k6 B2 j. }当到达物料速度越高时,这个报警更多,

6 i2 l# H$ X, ^& X" X9 K6 B另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-11 18:35 , Processed in 0.021686 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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