设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6380|回复: 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'
. P( s0 _$ V/ L* N+ \*/; F. J& T4 A0 ~3 U7 s
is
- D- a/ i2 _, V3 M9 v# u$ \        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 [; S! ?$ M& |6 q3 n9 J9 V. bdo8 n2 |8 }# z6 r9 f# Z3 |2 I( W# H( m
        Lan := rootfolder.Internal.Tools.AOLlanguage;9 g5 B. z0 ~8 E2 N' y/ l9 m' S" v
        if current = @.Destination -- else return
+ w- e" p: ?/ [# U4 ]5 |& h1 s        then
+ e7 _2 y9 M% H3 x! E                @.Destination := void;
6 n5 X- t4 R0 c4 u9 I/ u& s6 {; L                if @.occupied then4 _# J! D0 Y" k8 o- U0 ]1 r* u
                        part := @.cont;  R0 P& N+ q, M7 P5 y
                        @.transpOrder := void;
$ k; Y" a/ ?* N6 q0 l4 O2 x( k                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' t* N. \9 T7 P! {, E! R9 v                                @,root.eventcontroller.simTime);+ C8 H7 o  A" a. u
                        @.HasOrder := false;3 L1 o7 X  _. L9 y  q, J% v
                        @.DrivingHome := true;
& |- l& L6 o, R7 N                        rgManager.tryToStartTransOrder;) E0 ]0 D" g5 S- q5 U
                        if @.Destination = void
# `. c) }! G$ }+ ]& O                        then -- no transport order for vehicle @+ k+ g8 K3 B# ~8 a
                                @.Destination :=
7 n2 Q/ X. a* }, n: t: m6 B                                rgManager.nearestFreeStation(@,track.~);
0 U  n( _5 ^" X$ O! W7 X                                newDirection(@);   
: u% ^. G- M: L4 p3 I# R+ A                                if @.Destination /= void then
2 W2 a, z0 T) G+ e" A                                        @.Destination.NumReservation :=
" H2 i: y9 @9 i' T* F                                        @.Destination.NumReservation + 1;1 {7 s% i- T. v3 P: A. ]# Y9 o$ @
                                end;
3 A* |! C% H9 _; d- L. S* z4 d# d                                @.CurrIcon := "drivingHome";$ l9 @6 t8 ~6 E0 R5 a! F
                                @.DrivingHome := true;
% r1 Z0 S+ ?: z1 n( @; ^5 l3 ~" A                        end;
/ E; u$ R4 m  u5 h7 S0 Q. n                else -- the vehicle @ is empty, both vehicle and part are in the same dock station; G3 a/ D; K/ t# P& p
                        part := @.transpOrder;
) K, O/ M+ F: }6 j$ O2 Y! k$ |                        part.move(@);-- load part
$ f" Y/ J) a5 e4 [5 k/ b                        @.CurrIcon := "load";
% R; K( B3 l1 O+ ]                        GlobalDistObj := part.globDestination;) n) O& i) s+ m+ ]2 z; |
                        assignLObj := rgmanager.rgAssignL;
0 i7 U# A! S6 u6 I, o                        row := assignLObj.getRowNo(GlobalDistObj);
& R' V, l9 E- h                        if Row = -1 then -- since 70
( g9 B5 D+ k. B7 `                                if lan=1 then
8 s" f. @6 P% f5 N4 f                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ b5 m8 `! \$ p, h
                                                to_str("in der Andockstation: \"",?.~.name,"\""));) `6 P% R* n9 w5 L$ t' a
                                else
' |9 K6 t0 V. j) t+ j; {. `( k                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 }  B; h- }8 Y% r                                                to_str("in docking station: \"",?.~.name,"\""));                                & }# c- X# s5 K! U: m; A( X
                                end;$ B& `% x' e7 {, H( _- A7 ~
                        else9 v6 }5 E! g, V: i6 G; O
                                @.Destination := assignLObj[1,row];  {1 L9 F4 ^* ~$ u& N! r: l% j
                        end;                        9 S2 U* ]' L; ]8 A/ z& B
                        newDirection(@);
6 M( T' ~, [  d                        @.HasOrder := true;
# O! H: V6 I5 |! ^* i                end;
/ [  e9 ?/ e- r% k# n6 ?4 D6 u        end;
6 i1 u' H: h* J3 b9 x1 Tend;        -- of the method
7 h) ?* H, K* U& I- D
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
; g1 {- R$ u" [4 b8 o7 O( j$ R0 n# G* N- Y( Y( s% |1 f3 W
这是AGV_putin中arrive的method。. |3 p* \7 e) Y
5 j1 C+ b* z1 S( D, v: q
当到达物料速度越高时,这个报警更多,
( c+ f' e! X; R) J; }0 Z" T可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。8 n  |9 _  m+ n) X' `7 O/ Q8 L9 ?
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?) {$ f8 y% I0 `9 V8 U
0 f6 X# O2 V  ?+ Q
另外一个小建议,就是move,所有的move都可以这样, s7 p1 }+ [' R7 B* J# T1 W0 R$ u
if not move() then debug end
( Z: s; E  q" l0 g  g0 ]: p这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
# q! e, ~% H% l% f- dplant simulation中的free libraries有AGV模板,: ]& V$ {1 H0 {! y! H; \
里面也有案例。
0 ?- _5 j8 ~) E8 W我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。( N* E! ~; `) R9 H2 c% p% h
4 J4 J, G! H# I. M- K. a$ L; H
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 - v$ g2 H# w8 x  n
- U$ N9 E% r' [9 [! S
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ( n0 D; y. X3 N& ]
这是AGV_putin中arrive的method。$ u5 D% ]5 f, K5 _

9 ]; J2 D# y: i3 A% ]' _4 N当到达物料速度越高时,这个报警更多,

9 K2 F7 E; z+ l9 e另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-2 22:32 , Processed in 0.020102 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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