设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5396|回复: 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') i  f, I9 p$ w! X, n# Q2 \% a
*/
2 K& N/ K' o: e! Bis% k" D9 v* I* `6 q  E
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ u+ ?3 \* z6 J8 r& B
do
' {% R" T7 F" \        Lan := rootfolder.Internal.Tools.AOLlanguage;6 x4 w/ T4 [$ X/ P- e* u! U  |
        if current = @.Destination -- else return* f( K$ f: j4 j1 {
        then) N( ^& E6 u& f& l! u8 u
                @.Destination := void;
- }; y& }, w3 g4 ]% m" z                if @.occupied then
5 Y. i; l0 V& K. N* ^$ Y1 _# k" x9 K6 w                        part := @.cont;
) O5 i4 X8 p' U, y8 ?                        @.transpOrder := void;
; e# N, P( H/ M                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# |5 @( q7 m# H) c& [
                                @,root.eventcontroller.simTime);
  Z. Q% Z& A' r' l( O3 V                        @.HasOrder := false;+ w/ F! q6 d5 _
                        @.DrivingHome := true;
7 k( `* p1 n+ x. Q                        rgManager.tryToStartTransOrder;0 ~9 C) l) M( @5 e9 K+ k% m
                        if @.Destination = void
* @1 I1 y3 ?0 S0 v0 \                        then -- no transport order for vehicle @
$ [- R* T* M& F( s                                @.Destination :=
( l) M: y" Q) r( j( y1 R  [                                rgManager.nearestFreeStation(@,track.~);
4 ~" o5 Q; z$ p0 ^3 ~4 r1 K/ s& P5 U' M                                newDirection(@);   
  b) I/ r7 B5 X# N0 K( Y' z                                if @.Destination /= void then
- g$ l2 k4 K4 q) F                                        @.Destination.NumReservation :=- y6 ]# I( q; o2 C% ~5 f6 N3 Q
                                        @.Destination.NumReservation + 1;
) E6 C+ R+ O3 g9 o                                end;, d* G' t4 q) x$ b6 C) u0 x: p$ z
                                @.CurrIcon := "drivingHome";: f# m; c+ g! h' n
                                @.DrivingHome := true;5 ]6 R4 X! u2 b5 E& p9 P8 `
                        end;# f2 {; |- D  ^. P+ ?% D* e) E. p
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station) ]$ I- {7 s& H
                        part := @.transpOrder;: t( v) [! d4 h2 F
                        part.move(@);-- load part
# t' I) l1 Y9 z$ a& l7 s; ^                        @.CurrIcon := "load";
+ b& ?% R0 {/ P" \9 N                        GlobalDistObj := part.globDestination;& F; {0 S- W: E
                        assignLObj := rgmanager.rgAssignL;
) C! S5 X- E# Z7 Y5 x- g, N% y                        row := assignLObj.getRowNo(GlobalDistObj);- |7 ]' J+ Q: R, S4 r: I: y
                        if Row = -1 then -- since 70
, A( c) p$ x+ |5 S% `                                if lan=1 then8 R, y" L6 M! q. N
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 Y' \! d1 K- [5 r3 o
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
9 S* w8 S# n5 p; J                                else6 [' V; L9 F' k5 a" x7 t7 q
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ m- ?! [, g, b! ~7 }8 ~& A3 Z7 y# a
                                                to_str("in docking station: \"",?.~.name,"\""));                                ! e  K+ I/ H: W$ _( q4 E5 K" X3 R
                                end;
1 y3 {' H- f# @. Z) H* E; a5 F" X                        else/ F5 h' h8 Z2 u0 R
                                @.Destination := assignLObj[1,row];0 s  N- ], ~( {) Z# q
                        end;                       
8 D- P0 E3 r4 c6 [: V                        newDirection(@);6 ?" q1 x3 d  P! m
                        @.HasOrder := true;8 x9 F3 _7 S! c4 M$ X' E4 u- I
                end;/ L9 k! _) l  ^7 ~8 b$ b4 F  E
        end;
" L7 B! z7 y/ G, f* f% M4 Uend;        -- of the method8 F. x+ G  J" ^4 N  O3 C6 |; J* W4 r
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
8 R! _! U4 I5 P" M+ t* b4 T; p: ^. ^
这是AGV_putin中arrive的method。8 Z. K; d6 |& q* N7 s

* \% \, J+ ?, C7 O当到达物料速度越高时,这个报警更多,
. k& C& G, l1 u- }0 Y- p可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
# _- ^* W4 c( g- p1 \+ B程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?& @" l, [+ o$ h( D; L' {

# n6 [( f/ v* t" `+ W2 F: m( o另外一个小建议,就是move,所有的move都可以这样. r' `5 g. Z; P" r  {
if not move() then debug end
; U% ?6 d) l. g4 s# l- j4 D$ j3 i这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
& j- y) x; w) d  H* d, `% Tplant simulation中的free libraries有AGV模板,# Z$ y. p/ @- k, \/ }
里面也有案例。
( B" J* _9 ^3 D) t我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
" a+ e" Q- ]+ ?0 ?7 q* J3 s6 h! u7 T& m! O( H
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 * P: J5 ^" U6 D7 ~
6 f( g* z- Z3 x8 F
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08   n# J8 B5 v- I0 Q
这是AGV_putin中arrive的method。
$ ?" a& C+ I; `5 q: s0 c3 S4 T; N$ r
当到达物料速度越高时,这个报警更多,

2 S4 k0 S: i  M, g$ v7 a8 X另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-20 03:28 , Processed in 0.024971 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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