设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8700|回复: 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'5 W7 A6 {: |# f+ ^. t9 S
*/
' I! O  N  a! c! n0 His9 z3 n" h  h, ^) ]
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;' }9 P# W3 M$ g$ D7 N
do
  M* |8 d9 e/ P# b. F8 }, Q        Lan := rootfolder.Internal.Tools.AOLlanguage;
8 H$ M3 @. I- K1 ^$ s        if current = @.Destination -- else return
8 Y, y  t5 \7 e& T% A9 ~        then0 F: X# X6 Z6 X- Z0 v  E: J/ Q$ U
                @.Destination := void;& l( @' M# R1 ^$ s# N# v! y) q$ p
                if @.occupied then
) ?3 y" K6 Y/ g                        part := @.cont;
- Z! Q: B+ X- K% X% @                        @.transpOrder := void;- p6 |3 b. c6 Z4 D& M+ _9 i
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# \2 @  \/ ?: W( i+ G0 Z                                @,root.eventcontroller.simTime);$ Z0 C( Z7 ^4 L2 n0 P
                        @.HasOrder := false;3 A0 v( B+ V6 z2 h) R8 w  e
                        @.DrivingHome := true;
' x5 \# G% X3 r                        rgManager.tryToStartTransOrder;: q. x9 c( o% T, n4 u1 O8 V( F
                        if @.Destination = void3 P2 P4 u- f$ [! f; g
                        then -- no transport order for vehicle @# X; D4 ?: \/ [* ~
                                @.Destination :=
0 j! }5 s# I* \7 |                                rgManager.nearestFreeStation(@,track.~);+ I2 Z1 `) `  {- t
                                newDirection(@);   
" q. ?7 ^1 U) q; M) D  A8 t- _6 x                                if @.Destination /= void then
& x5 J. k4 y3 Y& |# d& R7 k- y                                        @.Destination.NumReservation :=$ K2 ~- P' Q) @$ M- s! R+ b
                                        @.Destination.NumReservation + 1;4 B; g% d0 }! u1 K6 _
                                end;
, f- b) |% x" M* f                                @.CurrIcon := "drivingHome";
% T0 b6 `5 ~: Y, Q. x. p                                @.DrivingHome := true;% d* T# e, d1 z" R3 R9 c$ H5 d
                        end;  q# v0 _% M9 R. q
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 t. v: v6 G0 I
                        part := @.transpOrder;5 E0 A# G9 W% ~6 c) [* i
                        part.move(@);-- load part* V7 T8 a) m& d8 B" ?$ C! g
                        @.CurrIcon := "load";
( n: J; B" U! }& n* E2 `' t: I% G                        GlobalDistObj := part.globDestination;1 T! W" N$ z9 ?
                        assignLObj := rgmanager.rgAssignL;
3 }8 G  {2 S2 V* h  [- I$ e$ P8 f4 d                        row := assignLObj.getRowNo(GlobalDistObj);6 B  R3 O" S" l% C3 x  r
                        if Row = -1 then -- since 70
: Q! B5 D6 O( ^) E& i8 B                                if lan=1 then
9 s# \2 ~; O/ g                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ h) f4 Z+ ^$ ]: S0 j
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
! l& a* z' N# m- U/ W9 z/ `                                else* |& D" f7 E: M/ E# j  Y2 X6 W
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 n; S) o6 A/ {. X3 V- V/ X" A
                                                to_str("in docking station: \"",?.~.name,"\""));                                " X/ n3 V4 X& l- s4 [% Q
                                end;
: ?4 J6 f# X) t' A  B. F# ^: X                        else
" b& q4 Y+ S+ s$ Y# t# y: _" F                                @.Destination := assignLObj[1,row];
2 r$ \4 b* }0 k5 U9 z2 d. ^                        end;                        9 |% t  ~% U7 L' O4 J- f7 r8 @
                        newDirection(@);! D( x1 e2 @3 w7 G$ _
                        @.HasOrder := true;" \0 b* L+ @- t; [& }% W
                end;
5 v  l7 E2 X+ c4 `        end;
" W; W- b) Z4 \0 L6 X. K, Dend;        -- of the method
6 p0 I, ~: m  H! l! Y4 ^0 g$ R
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
/ h) ?: s6 J) c& v6 `% u+ c5 Y
这是AGV_putin中arrive的method。# ^1 W8 q) {) z
& ?- g) s7 h0 X9 D  Z! i- U9 j6 u
当到达物料速度越高时,这个报警更多,
1 G' C$ z2 ^( U: j2 x可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。# _% c  k; d2 Z$ M, J5 V9 @
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?7 h* k) I- D0 p4 q3 y
( Z9 y. |8 F- j. Z2 g9 f
另外一个小建议,就是move,所有的move都可以这样
& j8 q+ X$ @, p5 q+ k. [; tif not move() then debug end& K# \! I1 t, ~( S/ E& E3 J
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
" t0 R6 {& U( p! k) Qplant simulation中的free libraries有AGV模板,
" j, b# R" m/ f* ~里面也有案例。
9 G  a* u$ T3 n) I/ Z我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
3 h" R( {; c0 l- y. u; c7 o; I& e/ I- w+ s) I5 A5 A  h2 @+ w0 g5 F$ \+ b
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
" j0 i  H8 c( c
8 {4 c+ A5 u% @# X' U4 w6 C那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
$ D1 p: m7 K7 g; g" i/ i: a这是AGV_putin中arrive的method。
5 X$ i. x1 Y7 Q$ [2 j! d1 x9 _* s0 }$ J, R( `. D4 R4 I
当到达物料速度越高时,这个报警更多,
. Y- O! q' g4 I4 z9 M& A
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-21 05:48 , Processed in 0.014998 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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