设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6127|回复: 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'3 V) [( F9 i4 _; m/ z
*/% J" ?# r2 X9 }! k' L! N$ e
is
- w+ _, ~. i* K2 \$ _4 @        part, GlobalDistObj, assignLObj:object;row,Lan:integer;% i  u! V) t+ i
do! S+ |6 ?9 L# o5 z8 F) W+ E5 t
        Lan := rootfolder.Internal.Tools.AOLlanguage;
3 Z/ p, a) S) h! i; X* Z6 Y        if current = @.Destination -- else return, g: B0 S# y4 X' r
        then4 P" Y! |* I( z+ ?/ u
                @.Destination := void;
9 k7 J6 x; M( S- F8 u$ o) D                if @.occupied then
' s! o' u! v: K/ U% h                        part := @.cont;
2 C1 G7 \- |% x- S, X* {8 m4 g, V+ o                        @.transpOrder := void;
& E# Z/ B# C' x5 f! Q& Q5 B! p                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) H) C2 X; j7 Q$ B- g# G5 z. c4 a                                @,root.eventcontroller.simTime);  K, l5 U6 `- `, O1 r% o7 Z4 w
                        @.HasOrder := false;
$ p) O8 o# ?% U6 s2 k7 ]( f/ Q                        @.DrivingHome := true;
2 J7 j1 P# t! f3 W: Y9 N& Y                        rgManager.tryToStartTransOrder;0 n4 [8 \. X. j- s: U5 j2 G
                        if @.Destination = void3 \$ x2 W- }! k7 a
                        then -- no transport order for vehicle @
, c6 t# O8 G2 d0 X) u! s; g# ], Q                                @.Destination :=) _& \/ M8 w. P. \  y$ k1 y, ^) S
                                rgManager.nearestFreeStation(@,track.~);; l% e7 H/ m( A3 ]4 r1 j0 f. h9 X
                                newDirection(@);   $ ^5 Y7 P7 j2 j
                                if @.Destination /= void then/ M) W* ^) D5 [& a
                                        @.Destination.NumReservation :=
. i0 [/ r4 z! J* C0 t7 C5 m                                        @.Destination.NumReservation + 1;" `' g( e/ F6 \# d4 o1 V, w# p
                                end;: @6 z; M! h# S& u. g
                                @.CurrIcon := "drivingHome";
, F* T6 [9 B0 _1 g, @* o* o                                @.DrivingHome := true;5 j9 `8 x& k5 i" U0 H
                        end;7 n1 n3 b$ T. h2 v- f" x7 {2 L
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 F6 V- D) U* [% C. k4 Z                        part := @.transpOrder;
4 G& m2 u6 b1 f+ }" s; @- C$ f                        part.move(@);-- load part
5 m0 _( n3 x, N- s- ]3 E: y  |                        @.CurrIcon := "load";
$ T- n4 C  ^% [2 J% V3 u                        GlobalDistObj := part.globDestination;+ j8 w8 v8 o0 L" {% o% ]. A
                        assignLObj := rgmanager.rgAssignL;5 @+ v/ n( I' y! C: O2 P: E+ W
                        row := assignLObj.getRowNo(GlobalDistObj);
4 F! K- Z7 ]' N6 O                        if Row = -1 then -- since 70
9 c' X: j: ?* U3 e, I6 u                                if lan=1 then0 C3 T: `) _! O" f  c0 t8 F
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& Y# E; s8 f: D- e
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
* J+ n: J8 w6 i% u, @3 D, ^; h                                else
* m' i8 R" F/ H2 E                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: ~; y( ]) @& [5 ^' A  |
                                                to_str("in docking station: \"",?.~.name,"\""));                               
, F" w  C; e$ H2 u& J. [( i7 [) r                                end;+ |: @- _  B- u7 n( Z
                        else. G8 N; r- k9 U6 \' Y
                                @.Destination := assignLObj[1,row];
6 E8 X% q. w  a- M( S                        end;                       
; l: F/ ?% O8 x3 r( \5 G0 B                        newDirection(@);
/ }+ O. K0 D$ F% B                        @.HasOrder := true;% d. _2 Y0 ~( h1 Z. M( }4 u
                end;4 B% @- }6 s! X' U7 ?* p
        end;
* q3 h# g( W6 \" r1 Zend;        -- of the method0 E4 O3 Y3 g! d+ v) ^
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 / Q$ E: q% |) ^( A
# a% g0 G2 z8 D: q$ t1 M+ ]% `
这是AGV_putin中arrive的method。+ Z$ b5 r3 a, o  |) ^# ]
7 l# H7 Z9 l$ D: i" r3 x
当到达物料速度越高时,这个报警更多,
: r7 }5 o. n) M( g可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。% c# {% \5 A1 b' X, ]
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
- y/ z5 Q# X8 b0 }( l% i* l, s) o' d$ T# J# C4 G, k! A8 L  F
另外一个小建议,就是move,所有的move都可以这样
9 U" S$ ]& }/ N; O, A& H  a2 P! ~- kif not move() then debug end
$ {& _( W# N3 l9 S这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。' B" v" k0 O7 [: K% z9 |
plant simulation中的free libraries有AGV模板,$ d9 n. {  ^8 ^* }0 c" ]
里面也有案例。
) e1 c' m$ t" b' s$ a, H" p3 L我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
9 y- |& `& t7 R1 M
0 U0 P9 N- ~; @- j7 v我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 : K/ i; r- U9 k% p9 ?) E
: ^/ H/ Q, ?7 x) ]- P1 Q# t8 [
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
  M% w# Y3 Y0 R& Q* S这是AGV_putin中arrive的method。) C! F4 J/ Y' J

; Z% X8 x3 l, ?+ L& R当到达物料速度越高时,这个报警更多,

. G! c) }4 }% c5 K1 m另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-20 02:00 , Processed in 0.018333 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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