设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8722|回复: 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'! g# _: L# p, p
*/
: R; K; d3 d  m+ Lis
+ h1 I2 x  w  W        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ n" A5 d/ D, F3 X& g8 Wdo8 \' H8 `8 a0 a0 G( u
        Lan := rootfolder.Internal.Tools.AOLlanguage;
; s$ H8 o$ G+ _  ~6 T8 G        if current = @.Destination -- else return+ \' ^4 r% E! x6 s) @. u4 ^
        then
- |3 l. Z5 r& X! y' n: o; {                @.Destination := void;1 G  `  s6 _) N% h4 Q
                if @.occupied then
# F9 \9 Q$ i) E; c* l- S0 x: M                        part := @.cont;
4 h6 a. ]1 T3 g0 w- g$ q                        @.transpOrder := void;
" ]+ N/ z! S; f% _, t: k7 W5 P                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,  H" L+ s3 T* Q+ }: X
                                @,root.eventcontroller.simTime);
8 d' a/ M5 |3 N0 T( q/ H$ o                        @.HasOrder := false;
/ p- x0 Z4 i- E* B7 K, [9 s: K                        @.DrivingHome := true;
& p- ~  r6 q9 N7 c5 u' k/ Z# H                        rgManager.tryToStartTransOrder;  A$ l0 r* h; F1 q$ Z' `2 p" t. y8 E
                        if @.Destination = void
$ U( g) \2 u: e3 a. l$ K( T  D                        then -- no transport order for vehicle @! h. L) e9 _/ Y% y3 O, ]
                                @.Destination :=0 w+ p5 p9 `9 Q' H# Z. w2 J& Q; [
                                rgManager.nearestFreeStation(@,track.~);, |7 d  i8 l, p# O# l' C+ M5 ^0 y
                                newDirection(@);   3 c) x: j. L: \% C
                                if @.Destination /= void then
4 r1 P0 f+ E, X                                        @.Destination.NumReservation :=
: Y- U4 O# U: V                                        @.Destination.NumReservation + 1;6 v  U1 K6 V  L/ H* ]6 ^
                                end;
' q0 s$ d) v( w1 {                                @.CurrIcon := "drivingHome";
$ J7 c; v- W: Q% e1 t8 y7 q4 @                                @.DrivingHome := true;, ], L* H( t( K# o3 N7 o
                        end;" {8 U1 I& w0 P+ f/ s
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 x' s( p9 M9 b- R4 q& V9 Z7 o                        part := @.transpOrder;: u! }7 s; G# Z6 X7 H
                        part.move(@);-- load part' ?; n5 ?$ ^0 W$ ?3 I' i" L$ ?
                        @.CurrIcon := "load";
! Y6 U6 e8 E) f8 d. H                        GlobalDistObj := part.globDestination;, D% R5 K( t, }* P; C4 o8 E
                        assignLObj := rgmanager.rgAssignL;
1 [  \. d7 i0 n4 ~5 E                        row := assignLObj.getRowNo(GlobalDistObj);) j- {% d7 \. w1 J  `, [# r( R
                        if Row = -1 then -- since 70
3 Z- q, u% x. P- o6 l+ R                                if lan=1 then' m: h0 u& Z( E4 A$ f5 c! t  P
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 h2 L$ B. v9 E6 B
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
* C2 ]7 J1 }3 L% l4 D                                else
+ ~- D- [6 D/ M& c                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' h9 V5 m  ?1 Q/ N: k+ Y$ Y$ h
                                                to_str("in docking station: \"",?.~.name,"\""));                                + t# ^& }. }+ c
                                end;2 g' T# B# ^) U
                        else
% V6 q# S" q7 s# N8 P6 |" ~9 b) N$ t                                @.Destination := assignLObj[1,row];3 X, [9 K7 c. b
                        end;                       
1 [# g/ f" }2 z4 e/ K& d3 B! J. Z                        newDirection(@);; c! g. v: L: j& g+ p9 m' l) Y9 B: W
                        @.HasOrder := true;
$ r/ `+ M, F0 Y' L3 M. H                end;
! K: h2 U3 U$ s        end;$ F" s8 e1 q' D+ x3 n% v; j( E
end;        -- of the method
8 `! f' v0 F, e$ y( E) ?
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
& z, m0 q+ Q# I1 Z# q* n  x  K! S- d. Q+ h' k% O6 t
这是AGV_putin中arrive的method。
' R) c0 r$ O1 F4 i1 J& }4 |, F8 v) s4 c& z: Q' D- E
当到达物料速度越高时,这个报警更多,- b% d! r6 f( ]4 E- k
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。0 `% ~) O. N$ `$ L8 K) Y
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
" }! @& _; `% b1 O5 ]
9 U6 H4 Y% ]' K+ l5 p( Y7 }5 L另外一个小建议,就是move,所有的move都可以这样% m# V1 D! A1 a1 V8 r3 x
if not move() then debug end1 F/ S  d9 W1 E" _
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
( ~: V% n, W* v7 E* Z8 J5 @9 N0 x# l& Yplant simulation中的free libraries有AGV模板,
2 o/ w7 v" Y, I$ S里面也有案例。
3 L8 \7 }6 [1 R1 ^) F我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
, q3 ?/ i' y$ {, @7 y
$ |* N3 j' Q  j* _$ L0 f1 ~我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 + k! s$ r6 \( ?( e; N2 q
5 ~$ V2 s4 _5 N1 v7 |- I+ q
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 . m* P0 x. o" ~5 s& v( P
这是AGV_putin中arrive的method。
; t( t7 c$ v0 C- [# o; _+ r) E
/ Q) k6 @' P" B; s0 v9 [当到达物料速度越高时,这个报警更多,
5 {. H" K) n+ B; q
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-22 12:45 , Processed in 0.020068 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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