设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8097|回复: 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'" |8 T6 l2 t* U) X; M& a! v6 e7 }
*/2 x0 q& ]; W" v; V: O* i1 K
is- X9 ^; `4 X- N$ k7 F: m+ h+ a
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;: g( a3 v  ]8 H9 Y# R
do# U  `4 q8 s: V9 U, A, i+ b
        Lan := rootfolder.Internal.Tools.AOLlanguage;
- W6 _5 |2 s* @- V6 `0 u3 K' b( e6 ^- A        if current = @.Destination -- else return
. H* X& z4 n- C6 G        then
: ~5 Z, w, w3 W* y1 u* v( N9 ^                @.Destination := void;* M6 k. m8 s) V
                if @.occupied then
& }- t, J: F1 C5 y                        part := @.cont;
/ P9 t; K5 R4 P3 s. r1 c                        @.transpOrder := void;* }! k; K: z" @4 K) S1 H
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! N2 h- I( A# L/ Y+ N% ~
                                @,root.eventcontroller.simTime);4 w, v. {( d8 e) L+ Y2 u# q
                        @.HasOrder := false;
4 Q  S' b; n0 s2 G0 l# ]                        @.DrivingHome := true;
9 a) }5 X2 q8 F+ M* Q                        rgManager.tryToStartTransOrder;
- I& c6 ~) Z5 _! e3 q                        if @.Destination = void
! z* Z6 A* Q) l4 X                        then -- no transport order for vehicle @
/ o* I' p1 k  y$ p                                @.Destination :=4 u4 W: i* ~2 K. g# E
                                rgManager.nearestFreeStation(@,track.~);
; u0 Y: f% y* x# W" A2 R& y$ @& U; k                                newDirection(@);   2 ]2 U8 G8 r2 O9 L' P% @: _
                                if @.Destination /= void then
3 l! F$ t3 c  a; D- B/ q" E                                        @.Destination.NumReservation :=
+ _' U1 x+ C/ }. A0 ]3 c0 B                                        @.Destination.NumReservation + 1;
7 c# h) Q9 g: ?# T/ k' m4 d; M                                end;
( J, v7 s. q; |9 K                                @.CurrIcon := "drivingHome";
7 N/ j1 P0 u8 H; W                                @.DrivingHome := true;% N5 y/ k# H- }3 I! _# s8 R
                        end;
1 p7 A4 i5 V4 A0 U. z/ ~# N3 r                else -- the vehicle @ is empty, both vehicle and part are in the same dock station% ~0 ^1 w  N( S9 k0 Q, P
                        part := @.transpOrder;2 n+ A2 E  U  ^/ m. v9 S" y
                        part.move(@);-- load part
5 ]) g4 d7 o& d% ]7 F                        @.CurrIcon := "load";0 v) I7 T) R7 X2 X" F4 w; b
                        GlobalDistObj := part.globDestination;  Y4 J# h- I" j% c# R1 V. u
                        assignLObj := rgmanager.rgAssignL;
) p8 r; E1 Z$ @                        row := assignLObj.getRowNo(GlobalDistObj);
4 K1 q+ b& K& r) o7 P                        if Row = -1 then -- since 704 z# @5 C& ~6 `) ?. Z0 `  i, x# D
                                if lan=1 then
2 E! `, Y3 e& e# F6 `1 r  b                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 f9 p! i7 D( ]+ f1 T, q: a                                                to_str("in der Andockstation: \"",?.~.name,"\""));$ M1 G( H1 P" k3 S+ W! L  G3 F
                                else
8 \6 {: t  s! u/ K, h* f& l                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 t3 t, p: O) c  G; P2 z# {* B                                                to_str("in docking station: \"",?.~.name,"\""));                               
0 {) p- }$ [8 L                                end;0 i( n6 a! N+ P
                        else
5 F  ^1 S1 [2 a5 E9 s                                @.Destination := assignLObj[1,row];
" C* k: Q2 ]! u8 y                        end;                       
" m1 |+ T% R! _1 C                        newDirection(@);- Z9 [1 w+ n3 e0 @$ y( W3 Y: X
                        @.HasOrder := true;% k& T8 S0 z% O3 S* `
                end;
( W1 \9 p* E$ O* X        end;/ a. Y7 M9 c2 B* h- I9 t# t
end;        -- of the method
8 V# X2 ]2 K, C
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ' L! |$ y! x# h3 H

- O9 Y) c+ m) E2 g1 s6 v+ h" t这是AGV_putin中arrive的method。, `2 v% s$ m. m  a" c6 _$ t- t" [

; J4 f5 l$ j+ {0 ^4 E- S当到达物料速度越高时,这个报警更多,
6 i. i' I$ s; A可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。( A0 O! P: b* @2 q$ p6 Y/ f3 e4 N
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?$ ?8 I: r" [; w- H) H1 \" d
- ^* h9 J, `+ W8 v. H
另外一个小建议,就是move,所有的move都可以这样4 W7 U( C1 j0 L$ O
if not move() then debug end
% \! C+ P6 U& \: G这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。$ D6 h  ^6 J# K6 x# J
plant simulation中的free libraries有AGV模板,+ @8 L% Y8 y. e" a
里面也有案例。
& ~9 x& U7 `+ A" k我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。. H+ t& p. m- l9 y9 c9 s* Q8 j

$ t6 n! J0 ?1 h6 j: J8 G我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
0 R5 I+ `7 i& O! F' X) r/ V
7 Y& ~: y3 U" Z' |# V* g3 v, j3 ^那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
- L4 T' O, g4 U5 n7 v* ~9 z7 g* [这是AGV_putin中arrive的method。# \4 h; ~* @/ d

) F% M! F, i; R- }4 L) ?% W当到达物料速度越高时,这个报警更多,
7 I" n& a& x! X
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-14 16:09 , Processed in 0.019261 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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