设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7482|回复: 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'; z) H2 q0 i+ _8 e' f9 z/ n, v$ q/ K
*/. j+ P+ {- d, z4 @" n3 Q! y2 p3 q: a
is+ P( f1 a, W# w" @
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# `) D- u( H- P4 m+ |do
' r" U  `5 i' }        Lan := rootfolder.Internal.Tools.AOLlanguage;. o0 C9 D# b4 V+ W* C+ _2 I4 e5 Y
        if current = @.Destination -- else return
" r* x/ u2 c: G! @+ m. ~        then
; Z" M% O5 ]3 j" C! v$ ^+ v7 I                @.Destination := void;
" ~1 X6 S$ _4 z                if @.occupied then8 M/ e9 o# q& j0 y
                        part := @.cont;. ?) F- h9 J2 m: s
                        @.transpOrder := void;
( b+ l9 ^( e' r. w                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, |7 D: W  \+ ?% G0 Y- N                                @,root.eventcontroller.simTime);6 {8 b3 U1 t; c4 W# }$ t
                        @.HasOrder := false;5 x/ M" M9 K) ?9 L, G( s
                        @.DrivingHome := true;
; `, L  g4 B% ^' V                        rgManager.tryToStartTransOrder;$ }9 J7 J8 v5 X8 z' l& {6 y
                        if @.Destination = void
5 J7 e+ Q! I  t" p                        then -- no transport order for vehicle @2 x/ _  d8 {; e6 r# t# j" h8 F7 |
                                @.Destination :=
0 `1 D  j% x6 e, t) f5 @2 `                                rgManager.nearestFreeStation(@,track.~);
% D( s& h* S1 I5 U                                newDirection(@);   
' z/ ~% ?, r& w( ~; }  S! S                                if @.Destination /= void then5 @5 z# R& q% b! d
                                        @.Destination.NumReservation :=
% o0 W" W3 s. U8 w0 j# k7 r                                        @.Destination.NumReservation + 1;- D6 Q& A: f+ V. C7 b% E5 q+ O
                                end;; o6 ~" Q2 H( v% ~. t
                                @.CurrIcon := "drivingHome";$ K) _6 I; H0 D6 w+ x; Y+ J
                                @.DrivingHome := true;
7 X5 N! p$ X& r2 _& p                        end;9 \) l5 o4 m& E' y9 x9 w! G
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 W' O; e4 x2 e2 v- x4 J- N/ ]3 {                        part := @.transpOrder;: H6 l2 d6 `5 i! j, D. v
                        part.move(@);-- load part3 j3 e8 O% w7 J' w, \3 \
                        @.CurrIcon := "load";
  a8 `& p: [7 v* N7 E$ K9 Q; {2 C                        GlobalDistObj := part.globDestination;
1 c0 @2 a' h1 V6 Q/ w                        assignLObj := rgmanager.rgAssignL;
6 k7 s8 `. [/ J: o4 [) b& M! \9 W                        row := assignLObj.getRowNo(GlobalDistObj);" M' _/ A& i' M7 ]: n4 Z  ~* g+ m% u
                        if Row = -1 then -- since 701 _7 F9 I8 l6 X5 s) F8 a& U/ U/ k
                                if lan=1 then
5 f$ i& U2 Z! m% ^                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' L2 Y+ {- s/ x
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
: l& \* M: {2 w) H% U! z* K                                else% ?# x2 e, T. N, G, `
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; V7 Z' P# o6 r
                                                to_str("in docking station: \"",?.~.name,"\""));                                5 e" l. I9 P: C
                                end;8 S1 |, ~! h3 w0 D
                        else
2 W1 P$ X# _8 |- j                                @.Destination := assignLObj[1,row];, O0 t8 d- ~5 O, M" S
                        end;                        6 {& I1 y% G2 R: l, K. W  R
                        newDirection(@);1 c# f2 w- B0 v$ O1 o1 _) H! K
                        @.HasOrder := true;* y( k8 \! V5 M: C# E# n% D9 ?2 ?3 [
                end;" t, L; u. P4 ?5 l8 g1 {3 J* G, m
        end;
$ Y6 u# X( J* \9 ]/ q0 xend;        -- of the method
; E+ U% |6 a% M( _
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 % m$ {, [! a: Y$ G# C, {# f

; @+ L+ ~8 M3 v这是AGV_putin中arrive的method。
! ^" X& C# z, \6 e1 p( z  p' U. I
& r! ^- R% l1 T; [) A  S0 }. _( e1 a当到达物料速度越高时,这个报警更多,
# t; l1 z$ a; w5 W0 T可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。( T  y& ^, f6 W
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?2 |; n  _; y' c( E/ ~& b
4 m7 _: h" T0 A+ ?1 f
另外一个小建议,就是move,所有的move都可以这样, `& H. X% B+ S2 I% g" f( {) D
if not move() then debug end0 }9 X' d5 O* q8 G; E
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
: a- l$ y; y6 f. p: y( Dplant simulation中的free libraries有AGV模板,* b; P* W3 E" F6 ?) F  ]
里面也有案例。
6 S, M' n) {/ P; ~/ K+ c我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。- S0 R5 h  G, I+ }3 N& g; ^
  B0 U! ?# y9 Q) ^8 }
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 - n1 m) k; p9 k3 }

' V1 F4 g- y5 r. |  t* W那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
! G3 Z  c1 a$ _这是AGV_putin中arrive的method。
$ ?% O/ y# K/ a5 x8 A* p8 |' ~# D. h' {  t
当到达物料速度越高时,这个报警更多,
1 P, e" f8 q, z" W$ a0 M
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-14 00:01 , Processed in 0.021790 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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