设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6507|回复: 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'# u3 }; I. L8 X% Q3 I+ y
*/0 T( t" x; }9 u
is) v% s& T1 `+ z5 D% w
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 H, S. R% o& Udo! J* l3 x' i6 Z+ c0 {
        Lan := rootfolder.Internal.Tools.AOLlanguage;
6 G1 r' A( X( q2 b* V3 \        if current = @.Destination -- else return
" \1 B" B/ |' ~6 S* l% L/ k        then% V2 a/ I8 j/ J( ?8 d9 b& p
                @.Destination := void;
; v/ V% x* ?7 W2 r; H* g( M/ E                if @.occupied then; |8 y% G3 i! l7 a5 V
                        part := @.cont;5 _. }- F2 f- |; y1 t% c. R1 p7 O4 c
                        @.transpOrder := void;/ {% c- t4 Z% U/ C& F- _  M/ T# ]
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 N7 [0 O+ v1 P4 l8 M+ ~" r                                @,root.eventcontroller.simTime);
; ]2 B: Y3 ?) B: X% @                        @.HasOrder := false;/ `! m6 S( S5 v. ~
                        @.DrivingHome := true;
, ^: t% M" v* N$ |$ i3 y# `                        rgManager.tryToStartTransOrder;- |/ j) T2 E# @1 r. Y6 z
                        if @.Destination = void+ E7 \$ i9 p! O3 n' z2 `% @" i
                        then -- no transport order for vehicle @
: n5 L! B4 d: t# [7 {* k3 P                                @.Destination :=, w+ ?4 s4 ]9 W  [" Y% j. U4 t. ~
                                rgManager.nearestFreeStation(@,track.~);
0 W* h6 P: `. b$ }) c  e                                newDirection(@);   
. }2 G, R5 h0 j2 X9 @  {, y6 W7 U                                if @.Destination /= void then
( U# W- c* q# n. G% K9 p+ C: o: ?* N                                        @.Destination.NumReservation :=
5 S2 }: W1 j' @2 O                                        @.Destination.NumReservation + 1;, k$ r8 `6 R7 J8 |
                                end;# t4 b  m7 z9 G4 _8 W9 V
                                @.CurrIcon := "drivingHome";* A2 @( y2 s+ L
                                @.DrivingHome := true;
2 {4 a  I* l( @* ~0 x                        end;
2 A7 I1 E: P" ?8 Y                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 F; F+ k; n) C7 g                        part := @.transpOrder;
; Q5 J0 x$ Y: Q6 v# D                        part.move(@);-- load part5 h0 E; l5 `& W4 j* ~8 a
                        @.CurrIcon := "load";
* Y1 D, n8 n3 e. D                        GlobalDistObj := part.globDestination;
0 R5 _9 N( T. ?. `! {3 T3 ?2 }$ q                        assignLObj := rgmanager.rgAssignL;  Y( N' _* W5 F  O: Y
                        row := assignLObj.getRowNo(GlobalDistObj);9 l" b' D: K7 K  ~) A) F
                        if Row = -1 then -- since 70: B8 q0 h! S- m* p
                                if lan=1 then
' W3 g: v: d" O  U* ^$ T                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 s9 z: T$ d6 {1 e+ P2 N7 A                                                to_str("in der Andockstation: \"",?.~.name,"\""));# r5 m  B9 H. c: d- f
                                else2 B" F  v( i! X6 j8 d
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& u, W8 D4 t. R8 d  r5 D5 r9 [; o                                                to_str("in docking station: \"",?.~.name,"\""));                               
2 |: g( e! C3 m$ Y) E) J                                end;6 @$ T8 n* E8 S4 d( b
                        else5 @5 U3 A$ V" N5 m- _' K1 G' M
                                @.Destination := assignLObj[1,row];5 z7 O) h; E9 f  [9 S: D2 S
                        end;                        1 }8 ]7 z+ l, A/ W3 [  I* `7 c$ D
                        newDirection(@);
' E0 j+ t- F8 A0 h2 a) r) k9 G                        @.HasOrder := true;' T9 w* C  v, `: O) v, R
                end;9 Z3 i4 a1 S7 a( i
        end;
* d5 h5 C' u( u2 `& A, y' P0 Vend;        -- of the method
% o& {0 J+ N+ S) z
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 5 x5 Q) D* m# z0 Z7 ?

/ N# d8 I! k& O这是AGV_putin中arrive的method。
. [$ n* G; P9 f
" e! U" c/ L0 ?  x当到达物料速度越高时,这个报警更多,4 ]9 j" y- I+ e9 ^/ }+ [
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。! a6 O+ y6 s* ^# U
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?) Z/ k- _) U4 n) a) ]. y

9 P: x; E1 n( r& s8 p另外一个小建议,就是move,所有的move都可以这样! y9 K$ a, B& h& x, O) M
if not move() then debug end' K7 s" y+ I3 K; C4 O# B
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
4 T/ ?; o$ x* ~  l! tplant simulation中的free libraries有AGV模板,/ }# ]$ [  t: ?& ?
里面也有案例。
: V( x$ R' T2 L. e1 X; X我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。4 D( t# _  @2 R) F

: E  F8 Z! d3 D4 L5 N6 a我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
' r/ G4 @* V3 A' P- G0 G4 @9 {. N$ w! H4 w( b$ U
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 6 H1 p1 z3 `* X* A
这是AGV_putin中arrive的method。
& ~6 d! Y  i& C6 W, H% F) p) `
& F5 p. M) t- ^; D6 _1 L当到达物料速度越高时,这个报警更多,

. N  h6 u) n- _另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-10 03:22 , Processed in 0.017987 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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