设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7824|回复: 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'/ z1 Z% Y( c' C% T7 m
*/
, ^) \( m# h; J' E7 xis
+ h( c& E1 h% x. R" z& z1 l' X! t        part, GlobalDistObj, assignLObj:object;row,Lan:integer;* S' q2 @& D+ e
do
6 N& V2 F' G& B& r# A        Lan := rootfolder.Internal.Tools.AOLlanguage;& n+ ^! M% Q, h7 R8 H/ j* Z1 ^
        if current = @.Destination -- else return
& w6 X# h* M' h3 U. h+ [0 c1 w8 k        then
$ b7 s/ y; C! o$ o1 m                @.Destination := void;
' c0 h+ {( `1 B) s; |8 ~# A& F" E                if @.occupied then5 m' k, w0 e3 Z* e
                        part := @.cont;
1 J6 z$ \7 a. s1 L4 Q                        @.transpOrder := void;
& B. N5 k% {0 M3 T+ c+ [                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- z$ `; F  _* j! \/ ?  k- N$ V! J                                @,root.eventcontroller.simTime);6 q4 j4 y# ^% l
                        @.HasOrder := false;
; Z1 ^1 F- [/ N9 T' k# T5 O! J* S                        @.DrivingHome := true;
, H2 o, j5 j2 b, G2 o& Z6 U                        rgManager.tryToStartTransOrder;
. A! [3 [& g* S2 q% ^6 u                        if @.Destination = void
6 ]: u9 O( E' ~7 ^. F- y( b                        then -- no transport order for vehicle @
  z. d# y5 A4 a1 |                                @.Destination :=2 r! t; [1 M2 }6 Q
                                rgManager.nearestFreeStation(@,track.~);
/ b0 k: d& \0 q$ h# w/ T                                newDirection(@);   ( L1 W$ u2 Y1 U6 c: I
                                if @.Destination /= void then2 o6 N8 B  L/ M4 q* j' ~5 D
                                        @.Destination.NumReservation :=
5 l/ p9 D% l$ n; f: c" a, r9 x9 G                                        @.Destination.NumReservation + 1;. h' s9 {- j( t4 Y
                                end;1 z) s) ]: i0 ?  ?; N
                                @.CurrIcon := "drivingHome";( ?! g' S+ n% u) ]& G
                                @.DrivingHome := true;; y3 k0 @$ d! J5 \- |1 s- a6 r
                        end;+ H! ?3 A# [6 ?, Z6 O3 o3 R2 o
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station& J! d# W& W2 t4 A
                        part := @.transpOrder;! X; P* u# x1 e
                        part.move(@);-- load part$ J. A# t* B+ q" b3 q$ e" W
                        @.CurrIcon := "load";! R4 r- L  w- O9 k/ ]
                        GlobalDistObj := part.globDestination;
5 L/ a9 L6 I+ f( j$ m: A# Q9 B+ J6 v                        assignLObj := rgmanager.rgAssignL;
2 w: O) k4 Z) T3 C. b0 Z                        row := assignLObj.getRowNo(GlobalDistObj);- D+ l8 X5 q4 i5 V6 Y& w* c
                        if Row = -1 then -- since 701 R. G1 n# k7 V/ n( }
                                if lan=1 then
+ e" }2 b6 Z4 |* C8 Q6 g                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ C* O+ c9 Q7 S2 Q' g' G: q                                                to_str("in der Andockstation: \"",?.~.name,"\""));
, i7 Y. r# l+ D. A                                else
7 C, b- P$ z1 L' p7 I                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 Z$ G! g% }$ {                                                to_str("in docking station: \"",?.~.name,"\""));                                . Q9 x: }* h/ y4 E+ u
                                end;
7 a8 ]6 Z2 P+ g8 q7 I! m; p$ p                        else9 z* @2 N9 \5 n% q8 y
                                @.Destination := assignLObj[1,row];" v" j: D& l& Q$ Q; c8 N
                        end;                       
/ G1 B2 ]2 |: x# A- T6 b; J7 R  l                        newDirection(@);$ x" W. g. G& P6 Z) b9 L/ U1 h
                        @.HasOrder := true;
2 w5 y6 B& Y7 a6 _1 E, N, w. j                end;# w9 U- V7 c/ h6 {- ?/ i
        end;" ~" v& C9 N( `3 W) S
end;        -- of the method
! z& L0 q+ O9 g4 ~0 w* O* g4 d
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 : H/ U5 [" t5 {) b
. l: g+ K5 `- Z
这是AGV_putin中arrive的method。
. i- ]# }% L  d8 L7 R- r5 p$ q2 k) l
$ ~5 l" V' Z! K+ c. l. P0 b& Z当到达物料速度越高时,这个报警更多,* z% E8 Q  A$ L1 t5 |
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。" r" h- ]+ e8 R* J
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
. Y/ h$ X6 ?( [2 j( l
+ F  M5 u& `  i另外一个小建议,就是move,所有的move都可以这样
5 b# z9 I7 K, m! v7 B# U* Q+ }if not move() then debug end" z9 \! B' o+ Z# K# D$ k/ ^7 B/ H
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。5 x! I" f3 a6 V# J
plant simulation中的free libraries有AGV模板,! y" X" P: J# r0 f+ |' b9 K
里面也有案例。
; w! J! D: L3 \0 c7 d7 p我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
1 f; K3 C( U5 R3 I% f7 v. T1 }- \! Z" J# _; R( H. ?% I
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
5 @+ X6 L& w6 A+ k. ]$ u, t4 {# P5 Y3 W0 l
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 & I* S6 e3 z  f1 @
这是AGV_putin中arrive的method。
- V0 K: M3 B, T+ P  m3 I5 G% l* z* c' Z  j" }0 {+ }$ W# a; f
当到达物料速度越高时,这个报警更多,

9 s- M5 z+ s1 l2 H( _7 b/ Q另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-30 17:15 , Processed in 0.016761 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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