设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8221|回复: 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'
) D% X( ~/ b  ]( d, p2 I*/
7 g6 E, Y, o; a+ t9 Jis) y$ N7 s$ \; Z( Y
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;& r( g4 R+ z/ k3 f
do
: F" N  y2 C% t2 R. s7 Y8 D4 Y        Lan := rootfolder.Internal.Tools.AOLlanguage;
* s2 {/ o3 n* ~3 A6 J" V        if current = @.Destination -- else return" M- |& B. V$ O- T6 y
        then: r# U' c6 x) c- m8 C2 O8 A
                @.Destination := void;
+ ~' V  e, ~1 }: }5 v9 U( _                if @.occupied then0 y" N" W9 Z, f4 |9 l$ L2 a; J
                        part := @.cont;
- }7 [; x' _$ g% c2 r                        @.transpOrder := void;
- H. b3 f) e( U% g                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; s6 l0 d9 ^; c4 Q                                @,root.eventcontroller.simTime);$ c' C, h2 c4 v7 i1 \9 T: S: X
                        @.HasOrder := false;
8 y# C8 T2 e) s/ Z" R1 P                        @.DrivingHome := true;
  f, s2 b% y! y+ C+ f                        rgManager.tryToStartTransOrder;
2 i1 Q, ?% f# g( s1 @  E                        if @.Destination = void
6 v! e' b! U% }: W                        then -- no transport order for vehicle @
; ^/ Q: R" L, c: f. {1 F1 z                                @.Destination :=4 R% u4 l/ k. ~! o
                                rgManager.nearestFreeStation(@,track.~);; S4 o* |: Y6 N1 R% k: q
                                newDirection(@);   
6 E( P( E, ^/ b: W  D                                if @.Destination /= void then3 R" y5 N6 m3 q6 S
                                        @.Destination.NumReservation :=
9 }+ u0 I/ e3 Z9 t                                        @.Destination.NumReservation + 1;
' p1 h2 n. |' t" C3 M4 l                                end;8 ~2 ]+ k2 E, C  ^( Z
                                @.CurrIcon := "drivingHome";
: {; I" v, J1 i8 t/ V6 Y                                @.DrivingHome := true;) Q& L' z# l  f& i: v
                        end;. h5 \" ?8 B( U2 b
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% S6 I# b' P, p6 {                        part := @.transpOrder;( b9 H5 D4 y$ Y$ T, q
                        part.move(@);-- load part
: l, z& G; B! }6 I, [2 N0 W4 D                        @.CurrIcon := "load";+ H. ?! i8 U9 n- @$ p: s. W
                        GlobalDistObj := part.globDestination;$ O3 k+ Y5 ~7 h& Z# n" O4 s
                        assignLObj := rgmanager.rgAssignL;  N1 m3 y' \4 |+ e# s. h( \! c
                        row := assignLObj.getRowNo(GlobalDistObj);$ U  s; w2 m" D& U3 `0 K
                        if Row = -1 then -- since 70
& a2 _' u6 u( F$ f& n! |' h7 j                                if lan=1 then
% D7 D0 ?" z9 F                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 E- B; {+ K# ~3 C2 s7 k2 Z! s
                                                to_str("in der Andockstation: \"",?.~.name,"\""));3 H1 f' M4 x+ h4 x
                                else5 @8 ]! a' J  [" }' w6 ^
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! P4 Q- A5 Y8 \. v" W                                                to_str("in docking station: \"",?.~.name,"\""));                               
2 z2 A  \0 S% s8 U# S* x! L; e                                end;
% p$ K" f& D, W                        else
9 G# f1 S2 u8 M+ f                                @.Destination := assignLObj[1,row];' p/ s; q0 L  F- H6 Z; }! N
                        end;                        8 @  Y" U. G+ m; T3 R- k+ T) V/ E5 @
                        newDirection(@);
% ^% b& T3 K  B  ~$ w" ^' i                        @.HasOrder := true;
4 ?& B9 Z$ m5 D                end;
1 Q$ X$ t  Y. Z7 X# z        end;* s5 b0 y% ]9 T: D
end;        -- of the method# r2 h2 z. @7 m) i9 w5 B$ m$ ~  l
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ! ]4 f' h7 i9 u2 w6 P2 B) O
0 N7 Q) o- p9 B; i4 f& j
这是AGV_putin中arrive的method。
* `- p/ @, Z- D! ~; |9 t# r# G1 J4 z: p% j+ Z
当到达物料速度越高时,这个报警更多,  K7 E) J8 B9 I( q4 r2 V
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。" }  q# z$ t5 D' f  a, x9 g8 j- X! A2 O
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?8 W. b) U" `  z3 I. q6 g
7 l$ Q4 Z2 r  M& N4 L1 w
另外一个小建议,就是move,所有的move都可以这样
4 }+ y4 X* d9 T; F( xif not move() then debug end' E, Q" }2 k4 A3 `* D. W$ ?
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。/ P$ x0 T6 @, n, b# C8 j% o8 {
plant simulation中的free libraries有AGV模板,
0 X$ R/ N! ~6 J+ a+ c% I+ q! w里面也有案例。
# X& i& B  L# S我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。' P& _- O6 V# H4 o

8 |. D& b3 `; s+ _' K/ I% a1 N我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
. f" t' n( {3 [( H, f) U$ q( j* K; f  X* P
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
4 g* v( m: R6 M; {这是AGV_putin中arrive的method。% a1 r8 F. G4 D9 {6 a- Z
. s7 W" w# ^& t
当到达物料速度越高时,这个报警更多,

  j% @; r. f* p* G, R另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-21 16:41 , Processed in 0.022803 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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