设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7178|回复: 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'# @, z+ {, p, H6 b, w/ h
*/8 g& X- \( e; ^# `* D6 S" r
is
. o3 R: q+ h& p; t; e; p% r; K% d        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 ^* u1 w( Q7 B6 S9 t7 ado( O& p, s3 o7 E* F) N
        Lan := rootfolder.Internal.Tools.AOLlanguage;
( t! p* F; i$ s4 W: g% h        if current = @.Destination -- else return9 S4 L$ y4 B: k+ Z3 r+ b
        then( Q) y5 E: p/ E3 u1 c9 f
                @.Destination := void;' s% W+ f; B; h# _- C4 t$ V0 x
                if @.occupied then
! u2 K8 L+ n3 ]) x                        part := @.cont;
% ?) ]+ V# |1 O9 a                        @.transpOrder := void;0 L- p$ Z+ s' b0 }* s9 I
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! U7 T3 u- T. [: e) ]& m7 `8 Z
                                @,root.eventcontroller.simTime);
, J) e! x3 e6 A- B                        @.HasOrder := false;7 _) Y: Y& X2 P
                        @.DrivingHome := true;( t$ Q* u" n6 E* ?
                        rgManager.tryToStartTransOrder;
1 i6 X# ]" [+ S& [4 X                        if @.Destination = void
* }; G8 e- x( }4 G" V1 q9 H. T                        then -- no transport order for vehicle @
5 b8 U! R9 K9 W4 |, J7 r                                @.Destination :=( Z# C* T& d8 h! Q/ s& f! j: o5 ?
                                rgManager.nearestFreeStation(@,track.~);6 D7 f% s8 O* l. k# y' x* @/ U  T# J
                                newDirection(@);   $ D) B1 `* ?, P) ?. I
                                if @.Destination /= void then
+ v* D: p7 w6 N; b  K, I/ d                                        @.Destination.NumReservation :=: H! L& u  c5 G0 R# [0 L- b
                                        @.Destination.NumReservation + 1;
2 Z( F+ J, q% q, J  C                                end;6 V2 A5 U  U, C
                                @.CurrIcon := "drivingHome";+ s) J% G; j0 `# J1 y' j& x
                                @.DrivingHome := true;. h) U8 A: m: x& j: p
                        end;. N9 k9 M% l3 F4 i
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; g  v1 @, P4 b/ s9 Y/ O                        part := @.transpOrder;
. \  @6 U# ?: L6 k! _, v                        part.move(@);-- load part
5 L7 U# x* u1 j9 h& e8 y" t+ l                        @.CurrIcon := "load";
6 X' W4 D- X0 P# y6 B                        GlobalDistObj := part.globDestination;. E' M) s; p3 o2 i. X
                        assignLObj := rgmanager.rgAssignL;8 G+ F0 k+ y% B. y* v& M4 T
                        row := assignLObj.getRowNo(GlobalDistObj);! Y, p! w/ \8 u
                        if Row = -1 then -- since 70) g6 B+ R. O4 _+ _
                                if lan=1 then
1 }4 M% _! V$ O% L                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ _! v0 ^+ [0 r; Z                                                to_str("in der Andockstation: \"",?.~.name,"\""));
  w1 a9 S- t: l, z( x! m                                else
; @9 D/ Y1 |# P3 Z6 C                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* x0 G! }' L" V; o6 g& x                                                to_str("in docking station: \"",?.~.name,"\""));                                2 H8 c* x3 q5 Q0 t3 m
                                end;
! A9 ]  Z8 P$ Q, k+ \4 D1 d                        else: s( f4 i' `' O8 \% U
                                @.Destination := assignLObj[1,row];9 s, u- q& Z9 c: |
                        end;                        , z: y- u) I" x3 o+ j: i
                        newDirection(@);
% ?1 \2 ?/ k# Q5 C- ~; p                        @.HasOrder := true;
0 @: D' Q, c* z1 G- J/ k                end;2 B$ o$ R% o( y5 C  v! t
        end;
- F' c& w9 c) a7 l' Z) I% Kend;        -- of the method
6 a5 M' O, L* q$ p# Y! P- o; N
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
5 R$ Y0 b+ x! z+ u! d8 J' p$ f; v9 S* k3 m* c
这是AGV_putin中arrive的method。! n7 F8 A: q- j+ u' g

& }7 M. X) v' j当到达物料速度越高时,这个报警更多,/ y* w! C0 k! y$ t1 w. z! Q
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。# h* S0 N4 E4 y( I- f0 R+ p
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
% Z+ k) K! C: Y3 M; J3 n: o' |. T: I7 |) q7 S! }# f; y! y- ~
另外一个小建议,就是move,所有的move都可以这样
% H1 l6 S% j+ N$ R, e/ cif not move() then debug end
. {8 e+ w: f" L- h( e这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
1 o/ @. U/ T! M# a, V4 F7 ^plant simulation中的free libraries有AGV模板,
4 o2 l3 S. w/ y里面也有案例。
' N  Z# b6 V" d! F( p3 {我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。7 g/ n! ^' Y3 q

4 F- B$ _: D: x9 S+ |; g我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
6 u9 u3 ]$ n8 f- \* V' ^
5 W* K, E  a. X那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
# s5 f: F: i, y( R6 P这是AGV_putin中arrive的method。
9 c: p. Y7 W( I, `$ Y; q0 V
  o) h+ v0 E2 ^当到达物料速度越高时,这个报警更多,
. k  `! H3 X" {# h* o" ?; K: u4 m
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-25 03:04 , Processed in 0.021107 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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