设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7128|回复: 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'5 f7 @3 [8 ^. N$ ?
*/$ {( }, m3 T: H
is
, x# Q% o* O; a; |3 M        part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 Y7 ~4 |  i% b. k, k- h7 c
do& ^6 c( B" L) b( y8 E
        Lan := rootfolder.Internal.Tools.AOLlanguage;4 D2 i6 O7 k* m* O9 l. `2 U) R
        if current = @.Destination -- else return  X- p. V, ~* d2 y0 t- O
        then
& \* t/ F- _3 L( w5 K/ k                @.Destination := void;
; h& x6 Q) u/ M! V0 w                if @.occupied then
2 f2 v  ^4 }4 e0 t                        part := @.cont;
4 V9 u! y/ s( f4 J0 H; V$ P& v" i; }7 V                        @.transpOrder := void;
# N: y: a2 c# T0 H& w5 x, E) R                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* k$ E' m0 Z$ r+ e3 E9 \. o
                                @,root.eventcontroller.simTime);! Z2 m5 T- f0 j0 ]( Q3 f2 t' U
                        @.HasOrder := false;
) Q" w# ^% |% Y% C* f! l                        @.DrivingHome := true;0 r5 B, y& w$ }
                        rgManager.tryToStartTransOrder;8 {2 g$ c& n: H, z1 o
                        if @.Destination = void
  E, W# z2 G6 j' ?& U                        then -- no transport order for vehicle @
' R8 S& _4 T: O- h% B% F- `                                @.Destination :=
  T2 F; \, t! q- J1 J3 ^" q, ]                                rgManager.nearestFreeStation(@,track.~);
/ u# [( t' Z" B. F9 q  {$ E( }2 n3 I                                newDirection(@);   * p/ @1 C, `3 s* s# S
                                if @.Destination /= void then
& g- }  S8 O* ]( E( J% f3 k) |& h9 L                                        @.Destination.NumReservation :=) R0 k# f1 v; M9 n9 W6 T
                                        @.Destination.NumReservation + 1;5 E/ E8 g, A+ k
                                end;/ j) R* y; k" Y
                                @.CurrIcon := "drivingHome";; H) Y& D4 R4 G3 [
                                @.DrivingHome := true;4 r. f- {% u1 K  [9 m* t
                        end;
& {* @$ G/ e4 e1 P                else -- the vehicle @ is empty, both vehicle and part are in the same dock station, [- c  |# s+ a
                        part := @.transpOrder;4 B* d' V; F$ u2 n/ D+ T4 }
                        part.move(@);-- load part
3 Z5 s2 Z  Z: t' L- F                        @.CurrIcon := "load";
) O+ V. d2 D4 N5 [9 D                        GlobalDistObj := part.globDestination;! p6 i8 [- e; e; j, X. d
                        assignLObj := rgmanager.rgAssignL;
7 F, u* |$ m% _6 P7 ^7 _                        row := assignLObj.getRowNo(GlobalDistObj);
& U4 p, G! |1 X( ^8 z                        if Row = -1 then -- since 707 [3 I& f5 O7 ]& F5 \4 \( N
                                if lan=1 then' ]  w2 H! ?2 g
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! a6 L$ C- [7 A* q. k
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
  Z/ ]; ^4 @: \7 P1 M                                else8 G- p; ~6 J' _0 ?( _
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 K9 t5 v, n+ C* G6 w
                                                to_str("in docking station: \"",?.~.name,"\""));                                ; e/ k4 J- x$ \- h3 V. j
                                end;4 G- @9 W2 Q0 P$ y
                        else4 e7 M$ o, W$ f" y( H' F
                                @.Destination := assignLObj[1,row];0 a2 m  C9 q( Y6 G& A" [! }# u
                        end;                        3 [; b9 A8 F2 ^. k& ]2 S
                        newDirection(@);
/ {+ o/ E4 ^* y/ w                        @.HasOrder := true;6 o* X/ z2 m& E$ r# C8 A
                end;$ N4 O# @% s8 ?5 @( q& T
        end;! ?4 C0 Z; }# U( f
end;        -- of the method( N& N; J% |( B
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 % |9 j2 M7 t1 s1 L

+ d" ?! |' B( R+ t- ?这是AGV_putin中arrive的method。
1 R8 q+ Y2 g# @) K) s+ `3 u. w/ G& ^  |+ O# R
当到达物料速度越高时,这个报警更多,
" W# a) q# Q# D可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
* j. Y+ ?8 Y4 W程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
, F/ S5 N, ^2 P* Z- p/ m3 P' |
' c# U) f4 N; z另外一个小建议,就是move,所有的move都可以这样1 _5 @8 E1 V% e, s! J! Z8 ~, g& P
if not move() then debug end
, d. h  {# ^; b  ]3 ]这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。$ i* H$ s; [% x  x/ _! q8 F. z
plant simulation中的free libraries有AGV模板,; \3 E* g( w* h0 @7 z! k7 J
里面也有案例。
) R; N/ `7 R3 u; }! J0 c/ v我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。. x, R4 z, |0 J3 m
( l% }* x! ^; O- J2 U
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
& f4 e# t6 E) a- x2 }/ D% {" ~0 J$ }$ |. p5 R8 Y1 \
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ! d' e) C) C1 s9 Z
这是AGV_putin中arrive的method。+ T0 M7 \- Y1 ~! ^' u% t
. O8 P& u+ v% @4 B
当到达物料速度越高时,这个报警更多,

3 K) T5 B9 V6 c/ c1 o' ~另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-20 06:26 , Processed in 0.021039 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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