设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4938|回复: 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'7 T2 P5 F0 n- N& C8 N
*/
% E3 [0 l! T2 o/ q7 ^& J* pis
5 @! n8 x" q) G        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ q$ Y: V9 f6 ^& M6 Y  pdo. r5 f% ^% O0 d. w8 Z- k/ Q3 o# z
        Lan := rootfolder.Internal.Tools.AOLlanguage;
& h) |3 `# X' p; J5 p% b2 O: Q% u        if current = @.Destination -- else return
* h& D6 T6 V7 G" I        then
; E' x8 V9 C5 j0 _                @.Destination := void;
0 E7 y, C$ i8 w, _9 c/ p# @1 n                if @.occupied then
* h# b3 s8 ]; |6 e$ m# V) j  E                        part := @.cont;
7 x3 E' L' O7 C" N                        @.transpOrder := void;
3 t6 c$ I( [/ b1 k3 _, R                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# q4 O/ n% e1 y* r' h8 g
                                @,root.eventcontroller.simTime);6 F8 S4 f4 V1 ]: F! Y
                        @.HasOrder := false;- z; s) S" |( l: s) M
                        @.DrivingHome := true;
8 y, ?& j. p! P5 S+ B                        rgManager.tryToStartTransOrder;0 n6 d/ z; O$ }  Q0 Q% I& C
                        if @.Destination = void9 Z' q$ l8 |- [
                        then -- no transport order for vehicle @" h- N* S! C+ q8 w; B/ M
                                @.Destination :=7 x: ?6 D* [& k/ N3 \9 z7 \1 r" F! }6 H
                                rgManager.nearestFreeStation(@,track.~);
9 y% m  c" G& F0 f' ~                                newDirection(@);   
2 J* X! R- p3 c2 ~: B6 b                                if @.Destination /= void then* w1 Q9 ^9 V& V4 h7 Y
                                        @.Destination.NumReservation :=/ F2 ^% [5 f& O# \- ]( h
                                        @.Destination.NumReservation + 1;! n  o# U0 v3 A0 X; q/ R4 I9 C! c
                                end;
( `- n: }8 |* O; S                                @.CurrIcon := "drivingHome";
, Z, k! k1 L3 H; \: _                                @.DrivingHome := true;5 I! o, f# N. y2 Z- i4 [+ p, ?- G
                        end;) C- S/ o, i, D7 b5 I& G3 d4 G7 x
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ N- K1 i. D5 y2 H& {3 f
                        part := @.transpOrder;
7 t% r) U' g8 |7 C- `$ w                        part.move(@);-- load part
- l/ a* Q6 O  d( c                        @.CurrIcon := "load";6 O+ V  n  U5 |: _& \& E/ ~! Y3 h
                        GlobalDistObj := part.globDestination;
% d8 t0 A/ j7 F* S                        assignLObj := rgmanager.rgAssignL;% t2 e- j. X' b
                        row := assignLObj.getRowNo(GlobalDistObj);
5 ^7 B2 P8 i! A6 R/ d0 e# S                        if Row = -1 then -- since 70
: C# f8 [8 ~- w  v0 \                                if lan=1 then
6 k9 l8 R" M  }0 `# K                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& K0 R. M( {% S8 t4 [( Q
                                                to_str("in der Andockstation: \"",?.~.name,"\""));# ~7 L. q* Y* z) \% b/ v* x0 ^  F
                                else
8 K8 Q) f4 o! Q! ?/ Z: P2 }- {                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
  G- N0 i  `' k" g* n* p                                                to_str("in docking station: \"",?.~.name,"\""));                               
9 ?9 j  c$ x2 A                                end;
: J% J. @% n( e& A- O                        else: L$ t4 A* W; u2 n% q  d
                                @.Destination := assignLObj[1,row];2 V! b* |2 W2 s, B- o7 P1 P
                        end;                        # l* O; G2 ~8 F5 }0 H
                        newDirection(@);) a5 w, M) C, |8 g* m+ M0 r
                        @.HasOrder := true;, w. {1 o' ~! s9 J! s7 {6 Y
                end;
! k( v6 |$ I7 ^( S9 F+ G4 K: W        end;& T" l# W/ H: l/ t# H. ^
end;        -- of the method& U1 K: j" l7 Z, [  \" m
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 % i$ W0 z7 d# U7 P- s' d3 x# g

$ k4 h. h5 s4 O$ }8 G这是AGV_putin中arrive的method。' j7 @- a# y- O: Z4 _6 y

; G7 G: T$ x& r2 T% b9 D- p  j当到达物料速度越高时,这个报警更多,0 k1 S% s" k% C: Q/ x* c  K1 x
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
$ h0 i* }3 H0 B* P5 O程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?% _# v) l7 h' `/ [' j8 h, D9 D
/ Y1 m6 M- P; L' D# z0 B, X  w
另外一个小建议,就是move,所有的move都可以这样3 u  |, F1 ?% R1 l( U
if not move() then debug end
& N, |  `0 q1 k0 f+ z0 K" R这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
% D  {; ]/ a6 E# z( p4 O5 d6 Nplant simulation中的free libraries有AGV模板,
5 T0 K* q1 h! A6 h+ O0 o7 \. r# h, E里面也有案例。
: M5 d% p* \2 V" @, l我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。; W1 [' m) k9 n

" x* P, B! a0 X: A- l我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑   u# o/ Y/ D* l# h4 T5 P) A
0 t. o9 `% A- M& u9 r* t
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 4 s3 ^$ d% D8 l
这是AGV_putin中arrive的method。
. r* A+ @% V: a' O& ?! ~9 _0 V  S" Z. R5 P
当到达物料速度越高时,这个报警更多,
6 e) c7 @% ]8 L, c# p
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-9-14 18:10 , Processed in 0.017788 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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