设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6814|回复: 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'/ B' `5 y, f( s( i4 b. O: h) _
*/4 R  d/ F2 U- a& N
is
( R0 w$ Y$ @+ v        part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 e+ z3 i( ~' j: R, l
do
7 Y9 N$ ^7 e0 G# u+ U  Z- o        Lan := rootfolder.Internal.Tools.AOLlanguage;: N5 f5 @7 b# l% o
        if current = @.Destination -- else return  b7 ^# |$ R5 n; N- d- s4 t4 O
        then
5 D- h: m$ y. W                @.Destination := void;
4 a7 K. ~; y+ |; C* [                if @.occupied then
' U" e( @5 k0 _8 h& w% i4 \0 [; i& @                        part := @.cont;
7 A$ y3 S/ ?. e$ N- f0 x                        @.transpOrder := void;8 u  Y- A6 ?% |) S
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! e& u1 `. H; h# {9 ~                                @,root.eventcontroller.simTime);
+ G$ J( Z6 D& g; C+ o9 x                        @.HasOrder := false;) b1 ]" c- }2 Q+ Z! B
                        @.DrivingHome := true;1 y8 F6 L5 J) B3 _! m
                        rgManager.tryToStartTransOrder;$ r" B- F' Y& |% }" |& @1 c
                        if @.Destination = void; d$ Z0 N9 b4 j8 _/ F
                        then -- no transport order for vehicle @
; u; B: N/ c. v9 \: R                                @.Destination :=9 L; W8 M( U$ c
                                rgManager.nearestFreeStation(@,track.~);7 T- m+ g5 `, N  a3 ?. z- {
                                newDirection(@);   
* a" D; [' v  }7 B& W+ b                                if @.Destination /= void then
6 u+ }2 ]' N: _                                        @.Destination.NumReservation :=
5 H  Y* k! {; l$ P7 Y                                        @.Destination.NumReservation + 1;8 }( x$ b, |7 F
                                end;3 D3 v% a" K9 h8 C: s
                                @.CurrIcon := "drivingHome";
; O5 Z* N7 @! I( n7 {+ ~                                @.DrivingHome := true;9 X) L) l- D7 v! B7 M" I; ^% C
                        end;
, F3 Y6 k8 Q/ i& h+ @                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: Z: K1 l" h- }                        part := @.transpOrder;
! B- f+ k; u3 B& D& K                        part.move(@);-- load part$ L. k" N; S& u/ O* F7 |
                        @.CurrIcon := "load";
/ E+ d' K5 P' D/ `, B                        GlobalDistObj := part.globDestination;
( Q9 @) R* s6 x2 w9 @3 a/ V                        assignLObj := rgmanager.rgAssignL;
: F9 a& J7 ]8 L- c: b" t                        row := assignLObj.getRowNo(GlobalDistObj);5 h1 Y# h* l# _* \
                        if Row = -1 then -- since 70% T- L8 a3 c1 e7 s: ~
                                if lan=1 then
# Q% o- K# {1 g" }, R                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 p* \0 w4 i; w2 K$ ]" m                                                to_str("in der Andockstation: \"",?.~.name,"\""));% d2 c2 c- D9 X( M* ?
                                else
4 P/ S* d. r, n9 v& h                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 X0 n/ Z% N7 g) b& k; `; ~/ G. Y9 ~' K
                                                to_str("in docking station: \"",?.~.name,"\""));                               
6 v0 C: q% a1 d4 O' O0 m                                end;
0 U0 q- k' a, }' u( T4 i                        else" L7 X7 E2 e* m+ H* I2 g) L4 Y1 E- j
                                @.Destination := assignLObj[1,row];( @8 V( l1 D# R3 j( T9 p
                        end;                        9 D6 n3 k. E  n1 o, G
                        newDirection(@);
  a- h( S8 g- z* @                        @.HasOrder := true;! \5 I, J+ s& I
                end;
3 }3 G* r9 u' n( k7 s, X        end;
  ^' F! c- H, ~! E% h. |end;        -- of the method
0 V1 t5 ]( A3 u+ W0 m) W  k
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
7 I$ r, P# Q, u7 Z/ M
' j. N* k- b* K  ]% \7 _' F, X这是AGV_putin中arrive的method。
% R8 }, Q1 m- F( h6 @! b( s" \$ ?/ _
当到达物料速度越高时,这个报警更多,5 f" R8 E8 J! ?1 E
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。5 g! B# }' }6 k  A3 T
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
3 ~6 n" }3 w& r; H! c. F, a/ l5 H( _8 K. q3 D
另外一个小建议,就是move,所有的move都可以这样
3 @7 r& _: ]) S4 U! h8 W8 V) Xif not move() then debug end
/ B9 @& Q9 k* \( ?+ T3 D5 \这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
! E" @9 m5 i3 }) _  [plant simulation中的free libraries有AGV模板,
+ @# k2 F* j4 |( r, J里面也有案例。' A% g% K3 p/ {4 q3 Q8 T
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。# ^) k2 E3 V4 l
$ [7 N, [* P% ]5 J- @7 E. N
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 & x$ r/ F  ~0 k& U$ Q4 g( \2 r

. [: ~6 @  \/ G# Q. y, R  z% [那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 8 L4 ^7 a0 z5 T3 v6 A  ^
这是AGV_putin中arrive的method。
* p- V& t1 ?9 r# f0 T5 n# i
; W. v. Q" M0 W当到达物料速度越高时,这个报警更多,
0 G- @9 B4 `) S0 ^
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-28 05:37 , Processed in 0.028791 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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