设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7621|回复: 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'3 G! w9 F& |8 d3 D; H
*/% v8 u0 d6 }% }, n7 c! Y2 w3 c
is
+ ~! e& x+ V4 Z8 w- W$ w3 W7 @        part, GlobalDistObj, assignLObj:object;row,Lan:integer;# d- F: k4 @0 U7 N  B% T& Q9 F
do  l" r" Q( A2 T3 h& T5 }; q/ i
        Lan := rootfolder.Internal.Tools.AOLlanguage;( ]1 j1 J' e) }" b( w
        if current = @.Destination -- else return# j1 M1 g" I3 T) u9 B
        then# C# [9 m! [0 Q& |, J! a9 W
                @.Destination := void;9 h1 k6 E- g# D
                if @.occupied then
' n: k! a7 I! k! n  e; l* d! Z                        part := @.cont;
1 }3 a, Z% y1 L! }7 _7 c                        @.transpOrder := void;' O. ]+ G' f+ B8 W! P$ [, }3 H5 Q$ C
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 h: o0 ?# A/ G7 S$ v" e
                                @,root.eventcontroller.simTime);
, i+ |  g9 H2 d" |  X0 M/ D2 P                        @.HasOrder := false;
, J5 }5 l$ S4 f5 U4 z% ]                        @.DrivingHome := true;% q% ~! y$ _' G/ g1 K
                        rgManager.tryToStartTransOrder;
; n8 A; v1 S* W8 c' ]                        if @.Destination = void
' |* ^$ v3 Y$ b7 R. s                        then -- no transport order for vehicle @8 f9 r$ @+ q9 Q4 L9 h
                                @.Destination :=
6 s* {9 n( ?% |4 k; }                                rgManager.nearestFreeStation(@,track.~);. B2 `1 c( D+ q. u9 h
                                newDirection(@);   
0 D: x$ X" E  V9 c                                if @.Destination /= void then1 y! H' r" r4 d
                                        @.Destination.NumReservation :=1 c, `3 i; w+ R2 v* e4 c+ p
                                        @.Destination.NumReservation + 1;2 w9 K$ N; D5 Z) J- u
                                end;, n) C8 D( l( g% w/ R
                                @.CurrIcon := "drivingHome";
( \1 e+ N5 H; `2 Q/ x* B                                @.DrivingHome := true;
! n/ W5 F: g3 i: j3 {                        end;2 q. p3 E8 w0 _2 Z% t, a+ L/ B4 Y$ G
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station( L. e) P1 m: t* b% I9 Y
                        part := @.transpOrder;' s1 b+ ~, E4 ?+ }
                        part.move(@);-- load part
9 b  l  @) o) R. s' i+ v5 L                        @.CurrIcon := "load";( A4 x4 M: W1 v+ l; ~. u4 J; Q
                        GlobalDistObj := part.globDestination;
, t# h% |" L0 |                        assignLObj := rgmanager.rgAssignL;+ s! F* F6 j2 i+ W
                        row := assignLObj.getRowNo(GlobalDistObj);) d# H6 q/ v2 V; [# P( V
                        if Row = -1 then -- since 70
3 F4 ]7 Y4 c- w7 ]6 Y                                if lan=1 then
; A  x/ y0 }# f1 F4 ?                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# B# e4 @* s# d4 q6 D                                                to_str("in der Andockstation: \"",?.~.name,"\""));
3 D( K! U; K0 b6 {1 o                                else+ u% O, i% k- N: R5 v& ^5 v
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. b& J/ w. b5 {- B! ^
                                                to_str("in docking station: \"",?.~.name,"\""));                               
0 h- [4 R0 H& k' e5 n; J                                end;  J% Z. k( R, G- b2 r
                        else
* e8 M9 r- @- M8 g3 r7 Q                                @.Destination := assignLObj[1,row];
6 t; l* p" X9 I9 Y4 n) P  l                        end;                       
7 A$ o2 ~+ O9 J- I+ J  Y% s                        newDirection(@);5 Y3 @/ q5 W3 s+ H; a1 ^
                        @.HasOrder := true;
" c! l7 i# M8 M                end;# ^5 ?" D. K3 C1 ^5 D  H1 k
        end;: g  _2 L& m8 g, e# E* F; ~% m
end;        -- of the method
7 \# u% }, \, I% K. {8 n: j+ H, u' l
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
/ N! E4 P' C2 f9 {8 V  \
( S6 P& z9 P6 \7 X% o6 p# A1 X这是AGV_putin中arrive的method。
: T; b5 D* ~2 V& L. ]3 W2 y
- ^9 i% w9 B2 Q4 Y0 \/ C当到达物料速度越高时,这个报警更多,6 x- i: p# W. C$ z3 N" o; x: T8 M
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。; W1 P) n3 j. g# N- F" ~% {$ n
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?  T7 t3 D2 H3 W0 q9 h: X6 r

0 P3 i$ W) t" }6 N1 Y0 g另外一个小建议,就是move,所有的move都可以这样; E, N5 @* h0 p" Z: g
if not move() then debug end% K- j; i! o+ _
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。' X" ?: I2 \. b( b6 o9 J2 y1 @
plant simulation中的free libraries有AGV模板,& G2 v7 x1 F/ ?" ?4 A
里面也有案例。
% K: Y, m+ @- m* f' P# w9 b我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
/ \4 M) V) [, W5 Y, E$ b- W3 {. x8 m) Y
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 + B, j9 `7 ?: K0 ^) T5 _, {- ^

' B* h  q, i. y; I那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 9 i4 b+ _8 d# Q8 }
这是AGV_putin中arrive的method。
) F4 h; v! {7 \
4 M1 {; E/ r, |  ~' p6 B, }当到达物料速度越高时,这个报警更多,

) m5 ^8 X3 `6 t0 e另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-20 17:15 , Processed in 0.017011 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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