设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6631|回复: 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'7 \9 W! E1 y  _! Z
*/1 H7 F4 s" N% A4 p3 d. L  B- M
is* m$ E. ?: W0 z% H, Z# W4 b0 R( v
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 E$ M! N. H5 p" S2 Y) o
do
7 e7 [, B- {  z3 J: q& _# P        Lan := rootfolder.Internal.Tools.AOLlanguage;' X! E% ]% B) j  N
        if current = @.Destination -- else return
9 T5 Z% G6 x& J( b+ F6 H        then
3 e0 d* q& `$ M8 ^: g& s                @.Destination := void;
6 |* r2 H! t$ ?: E* X                if @.occupied then& H. K0 b  f: ^$ @8 G, l
                        part := @.cont;
1 X4 d! }# k, I                        @.transpOrder := void;; o- w3 T" @3 E5 w; M% n; o" L- B/ U5 V3 Q+ h
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& \# d/ D+ O+ w3 f
                                @,root.eventcontroller.simTime);
/ q1 O# w5 I$ P% D' E3 ~$ s                        @.HasOrder := false;
, E  L0 j  [+ _. d                        @.DrivingHome := true;
! t8 I6 q% Q; B6 a: b                        rgManager.tryToStartTransOrder;& V% ^6 h" C- z# Z5 N
                        if @.Destination = void- B5 n1 y" q8 B8 e& @6 M  b
                        then -- no transport order for vehicle @
: y! G5 E% [( E8 w/ F: H& t" s9 Y1 K                                @.Destination :=7 x- `) |2 s5 ~% s; Z' E$ \
                                rgManager.nearestFreeStation(@,track.~);2 R  M  i2 d6 i+ S  l3 D8 u7 w
                                newDirection(@);   9 E3 [6 D% m& {6 C
                                if @.Destination /= void then
9 a* c' H) k4 S7 |9 e                                        @.Destination.NumReservation :=
' N; m9 Z6 q. v- H/ l                                        @.Destination.NumReservation + 1;' k2 ?9 A7 j% @
                                end;$ V. M/ s& ]/ N+ Q+ l
                                @.CurrIcon := "drivingHome";
" I  ?" P. r1 s8 ]6 |* y                                @.DrivingHome := true;9 W" M: y% v% }8 j9 b
                        end;6 A6 P9 C5 i4 f
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 w0 I1 d; x( ~6 J. I9 q/ Z  e
                        part := @.transpOrder;: ^" j6 t& e$ J/ C0 j2 k
                        part.move(@);-- load part
% ~' |$ W# g) R                        @.CurrIcon := "load";' E+ O9 E  q- z# C3 `0 A* D+ Y3 B
                        GlobalDistObj := part.globDestination;
$ z, @+ N* S8 c( [                        assignLObj := rgmanager.rgAssignL;
3 A5 L+ g* ^. t0 x: T4 P0 Y                        row := assignLObj.getRowNo(GlobalDistObj);
+ }+ U$ b8 E2 c' \; z4 ~& h0 A                        if Row = -1 then -- since 704 j9 t$ L- B5 O+ H, K1 s
                                if lan=1 then
% n1 X; V$ a9 y3 \/ A" T# Z2 a' p! L                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ J0 i0 s& C6 n1 Y! K
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
  f7 e3 L" Z2 \; f# j. r2 J                                else: P" V9 |1 f9 x' X: Y6 F, h# Y- X, l
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% q; W1 w( y% Q9 S
                                                to_str("in docking station: \"",?.~.name,"\""));                                4 I- u* H' K$ {/ N. J6 p( ~
                                end;( F& h# I" W2 U0 U
                        else
. ^- U- h, H. X' ?, C                                @.Destination := assignLObj[1,row];
& D7 i7 w( I1 G0 K* C( B, U                        end;                       
. r; D1 F4 d0 {0 c: O+ F                        newDirection(@);
9 ]; t2 _% v0 g/ ?# e                        @.HasOrder := true;9 ^4 Z2 g& k6 G* s2 k
                end;
2 O3 l) l; E3 w6 v4 `" W        end;
4 T4 X* @5 m! G6 ?' H5 S5 s7 D" Fend;        -- of the method
1 i$ w! ^+ z% ]7 q8 M! m- ~* @
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ) V( @! y2 x" ^" O
2 u# o9 I! B( d1 e% b/ K, R1 Q
这是AGV_putin中arrive的method。
( t# s0 V2 P& z/ Q5 Q: a4 b1 ]. d6 [, ^! k5 M3 x- Q5 d
当到达物料速度越高时,这个报警更多,
6 N- l3 K. B6 r: U/ R! d8 d) Y' {可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。9 U" p9 x# T& \) ]" |
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
6 r: r' [  W+ l2 f) P9 j. h
2 _! s: n  L* `另外一个小建议,就是move,所有的move都可以这样  I8 i0 O5 {5 k! @7 Q+ }
if not move() then debug end$ P! ^  r4 e/ v9 |# I
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
: I& ]( J' x' F4 l) V% _- a: Gplant simulation中的free libraries有AGV模板,' P2 V5 n5 N- a& ^  D! j# ?) I& C
里面也有案例。9 B4 k; D8 Q# U
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。6 Y8 z6 W2 G* d' d& |; s8 s

4 w4 N; L2 S& @- K0 X) F7 s我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 6 K- l1 c: v5 k  `7 L) u
% K1 z* B. n$ ~2 s$ G
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 1 H9 [, P, l: b8 E+ q
这是AGV_putin中arrive的method。
7 p# p$ C+ o1 M1 y* X; T5 ?' L, @- r. p4 w5 f- }
当到达物料速度越高时,这个报警更多,
& ~  o. E& E9 p8 N
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-17 12:42 , Processed in 0.018349 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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