设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7329|回复: 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'% a. O  E* c5 s  _
*/
, t& Z% V1 C- f6 ]is
1 ?8 O1 T" Y6 E) F9 |        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ y# I# @( q5 N9 J7 f" J/ Sdo: A! u0 X. `  E) N/ Z) M
        Lan := rootfolder.Internal.Tools.AOLlanguage;
# T8 Y/ ]) H3 n; M2 a        if current = @.Destination -- else return! x& }4 `+ K2 O7 f* F
        then$ ^! x8 {- ?0 c" n0 u- C0 h8 Q" b7 r
                @.Destination := void;  q! u$ Z: V7 |' U8 S1 i
                if @.occupied then
2 ~$ [. m) |2 j+ Q- N# j                        part := @.cont;/ B) U% W: W7 N# M, h; s
                        @.transpOrder := void;+ x& q  |- K, o2 t5 O+ \/ W
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: P; A; z/ H5 b- x- t+ u: x0 r                                @,root.eventcontroller.simTime);) }4 w& }! t4 W0 o# j9 H# a
                        @.HasOrder := false;! W4 b9 B; _& B6 f3 U6 \  b
                        @.DrivingHome := true;) C' B0 U2 T9 Q2 o+ ^8 k& e
                        rgManager.tryToStartTransOrder;& j: A% U/ N4 x+ H( |, x
                        if @.Destination = void
. `6 Y' r. n0 d                        then -- no transport order for vehicle @" S  ^- H% n8 q- n( y0 V
                                @.Destination :=
- u4 C( q' n6 S- C* E                                rgManager.nearestFreeStation(@,track.~);" P" j* R0 n$ \7 A4 b& t; ?
                                newDirection(@);   
# X- p! ~/ @& z; S                                if @.Destination /= void then" q. |. p) k( o: X) e+ B
                                        @.Destination.NumReservation :=+ l8 u& D8 `& L& q' k/ C- ]( T
                                        @.Destination.NumReservation + 1;6 S4 j) o1 a9 V4 M
                                end;/ [- O* \, r# `- ^3 e
                                @.CurrIcon := "drivingHome";
& c7 a6 T/ G& I( Q0 i8 {$ X; L" m                                @.DrivingHome := true;
4 T/ _! Z1 ]' S9 }3 \4 B! Z: V9 O                        end;5 E! Y* k) R0 B9 z1 e. k- C
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 g  g6 t8 j$ X3 d                        part := @.transpOrder;7 f" J* \7 |) b5 Y9 J9 P! K
                        part.move(@);-- load part
  M5 i  U) i9 i3 x                        @.CurrIcon := "load";* p, S* X& q3 W- T/ ~( W$ b
                        GlobalDistObj := part.globDestination;
7 D! r/ F' R. t4 ?- g9 n8 O( F2 @6 r                        assignLObj := rgmanager.rgAssignL;$ m/ \" D% L. O: b
                        row := assignLObj.getRowNo(GlobalDistObj);
6 X+ y# h9 y- ]+ Q9 Y. G                        if Row = -1 then -- since 70
( w+ y7 c0 D1 n3 q1 K5 q- c. Q                                if lan=1 then3 w6 F% z" m4 K% l, ~/ B6 Y; i
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," y* }" L; O+ d7 C+ \) C! D
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
# v; t  Z* r# N/ @8 e                                else0 \% K, v& o  P1 I! k
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& w: G/ @6 z2 E1 m                                                to_str("in docking station: \"",?.~.name,"\""));                                5 D" \# h/ [! e+ }( E! F2 [) g$ d
                                end;
' Q) b& t, j' ?. Z; ?5 V                        else
- h+ P* _1 `5 @# P1 h+ V, _                                @.Destination := assignLObj[1,row];
, L9 a  W0 J- ^2 O                        end;                        0 W$ G( `" T/ {
                        newDirection(@);' B+ D: b! M, o, u. M3 ]( e; W2 z5 t
                        @.HasOrder := true;
# l) Q: t0 N. N                end;
5 X, c  t% i; |: r4 Z2 K  ?6 }4 B$ o        end;
; p, q( _( Z5 ]% ]end;        -- of the method/ _$ R0 y1 W% i+ n) a! o
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 2 Z1 {, D( [( Y. l
0 _& i$ ?# J' r7 d$ K
这是AGV_putin中arrive的method。* P4 L/ n7 Y8 M8 g. I

* Q  s8 s; p* ?% |" h$ }) ~当到达物料速度越高时,这个报警更多,) h/ p% r2 C) G* V4 z% N/ p
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
% \) A4 \) k/ P5 N; I! Q% y# s) E程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?$ e  y$ y' m1 k' T. R* L

  S& x( F: t6 K2 }另外一个小建议,就是move,所有的move都可以这样
4 ~1 {( n2 B" w! N% n% zif not move() then debug end* {8 O1 L( j7 n4 E
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
7 V' G  }- F: I' _' _plant simulation中的free libraries有AGV模板,
9 z+ n* A3 U/ G3 R1 u里面也有案例。* U; ~& N3 s, S9 c& b; P
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
2 G, t" _$ h! S& u. u: n/ C& H6 k) v# |: y, q
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 2 U4 s3 p9 G' _

2 z( M5 ?$ U' f' e) ?' c那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
% E$ `$ p; a2 Y+ V- K- c这是AGV_putin中arrive的method。' I; C9 B4 @* D% u* b3 c5 F3 l
4 X2 K9 k: E6 z1 M. ?2 D2 E7 c  O
当到达物料速度越高时,这个报警更多,
. c3 [6 B4 w6 p1 \
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-4 12:20 , Processed in 0.023634 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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