设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8194|回复: 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'( Y$ p9 M6 @$ d8 ?8 Y/ R# Y
*/3 B# S- Z8 s. ?" G* l
is* W4 ~: I! ~9 X0 U- g# s+ l
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ d8 x" N2 x4 N9 W" n. gdo
3 v+ S/ ^1 Z. c/ J        Lan := rootfolder.Internal.Tools.AOLlanguage;! m6 U, m9 R- R6 n( r
        if current = @.Destination -- else return
9 R/ U( q' C1 U; @/ z2 F8 ^        then
: x4 L- c1 g+ ]" \' \' A                @.Destination := void;
, F: r" B1 L" r                if @.occupied then1 g1 p& N9 c4 l, m
                        part := @.cont;3 f. I' o. b$ ?
                        @.transpOrder := void;
) U5 E9 R- O* W2 Q                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# m& M1 Z5 o' B4 n8 `" L/ L4 S
                                @,root.eventcontroller.simTime);
, m* W5 q7 l6 \# n5 X' |                        @.HasOrder := false;
# i  e$ _( Q! O                        @.DrivingHome := true;
, ~7 i, y/ V% q4 x6 ?                        rgManager.tryToStartTransOrder;5 C$ z  ^) `% n" ^2 r- A
                        if @.Destination = void+ Z. d* t5 m$ w( S! W3 B1 [2 H
                        then -- no transport order for vehicle @
4 h6 n: u/ C$ m# E# M) g  Z6 ^) W                                @.Destination :=
9 \4 _( j$ B: ^                                rgManager.nearestFreeStation(@,track.~);% J* }1 w2 t& n3 g" {5 k
                                newDirection(@);   + I/ ?: W) n: N4 x% m% c+ _8 `
                                if @.Destination /= void then: g# ~* W1 f7 E
                                        @.Destination.NumReservation :=, n4 C( b- T% m) \( d+ a' P! V
                                        @.Destination.NumReservation + 1;
6 a+ t# Q  W* ]. R! S& r- L5 C                                end;7 o7 B( a% Q5 w. \! K
                                @.CurrIcon := "drivingHome";
* e2 Q- D3 r# G* t6 r4 T2 J, k                                @.DrivingHome := true;+ ~1 v/ X; D5 d
                        end;
" B. K; w* z7 B5 y  J                else -- the vehicle @ is empty, both vehicle and part are in the same dock station' ?1 ], y9 E) J! N) j; ^
                        part := @.transpOrder;6 `5 q0 p2 E$ m5 @0 V" y, M
                        part.move(@);-- load part0 B$ [- \" z1 b1 R
                        @.CurrIcon := "load";
. r4 r: t8 B8 q  K. G                        GlobalDistObj := part.globDestination;/ Y" @7 q* N: J$ c" T5 T8 H
                        assignLObj := rgmanager.rgAssignL;
1 p, h; o6 m# a% n0 e3 t                        row := assignLObj.getRowNo(GlobalDistObj);7 N/ ^0 h  j# U3 z" Y: ~
                        if Row = -1 then -- since 70
* X4 |6 P# o$ a2 D! w' Q                                if lan=1 then4 R! w; h  S! ~% i
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 v  x" s$ x9 j" ~: {+ j, r
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
3 m! [9 o- r$ }1 ?$ a/ h                                else7 C9 B& w2 T9 {8 L2 ?+ c
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( X4 U/ y, k+ j8 j; N* w                                                to_str("in docking station: \"",?.~.name,"\""));                               
1 M  ?. B: y; v1 q$ d4 e                                end;
: L% S* O2 o) M5 B5 s                        else
6 ~5 M, {/ M& K* A                                @.Destination := assignLObj[1,row];
! _4 d- n; c3 c" b  H                        end;                        $ ?# M, t5 b0 C8 P3 R) |4 t. U6 s
                        newDirection(@);. B5 k8 T! F- @; n
                        @.HasOrder := true;2 U2 v" \8 c" {- Q; F; I5 n
                end;- Z) A6 T3 K; ~$ ]% n+ m
        end;4 ^: P' `. P7 m! W+ \3 U: H
end;        -- of the method
" \, n- c; t0 w( ?
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
" z. W3 f5 O3 J( y* |, N) s
) k+ V( l: s# q9 x; c这是AGV_putin中arrive的method。# B+ a8 O3 _  @, v& y

( o5 x( u) I/ q. ]7 S9 Y8 o当到达物料速度越高时,这个报警更多,
) i' K# q) J; W# z* D& l可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
7 h# c! P  t4 J4 M9 S程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
. f, s5 |/ q4 P  a/ P* |  I+ \# O9 n6 b, [& Y( D( i
另外一个小建议,就是move,所有的move都可以这样4 \6 B2 w* A) P) H; Z- v. N: O$ W3 G
if not move() then debug end
5 ]4 @$ v* B3 b  L, y) r) @  }这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。9 z6 Q& j( R  o6 B& I- E6 Y
plant simulation中的free libraries有AGV模板,$ z% a/ F8 T" r2 [3 c
里面也有案例。
, c8 w9 K& K, r; q我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。& ~9 Y3 A+ u, i( @6 w. ?% i

& ^1 W% M9 Q% W5 j9 B& {5 K' I我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ( c: ?5 i* y4 o1 O

9 }( ]0 e. V  n  `& K  J7 u- a0 w那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 , P$ `8 e1 |5 c. n' A0 _
这是AGV_putin中arrive的method。
3 e9 N; a3 x) S. ?* z
: ]# t4 D( |0 [' T" X; U; W% V当到达物料速度越高时,这个报警更多,

% m( [4 T5 y3 E3 g, I4 W另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-20 04:19 , Processed in 0.020926 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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