设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8421|回复: 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 f2 _( z' z) T& x& N. w*/
& r5 r2 P! I4 [1 _: c; Ais' E4 @* ?* {& e3 e
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ B  C4 n+ E3 P7 E$ E) Bdo
/ m: J% p. F; }5 B; |1 k1 L        Lan := rootfolder.Internal.Tools.AOLlanguage;3 D0 Q/ U, _0 Z+ ~/ W0 z% y
        if current = @.Destination -- else return
' ~) s" H: s( f& K" e        then6 k# ]# n. v! R; w; E% G
                @.Destination := void;
4 @* c. r% Z$ e5 H9 r                if @.occupied then; Q$ s2 m$ d! r1 ]1 X& V
                        part := @.cont;
. y9 c" @9 ]2 i                        @.transpOrder := void;
6 F7 \8 o. U% l& Y; s/ l( z& l5 {. p                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% R) t5 G( e7 ?: F# Y# |- q% @/ C
                                @,root.eventcontroller.simTime);$ O" w, f5 t0 L1 i. K3 K
                        @.HasOrder := false;1 M: U- S% J( u  L+ K6 ~' p
                        @.DrivingHome := true;
  v$ C! n7 h& Z9 W3 m8 O- v                        rgManager.tryToStartTransOrder;4 x. `" P5 }! D
                        if @.Destination = void
. k9 f. H3 j- @                        then -- no transport order for vehicle @. L5 y" {' O4 n  h
                                @.Destination :=( `$ u6 a- s$ X7 v% b+ l
                                rgManager.nearestFreeStation(@,track.~);
* K, r  F2 V+ B8 A1 w# T4 Q                                newDirection(@);   $ Z& v4 M3 F1 i# d, }# L! Y/ j
                                if @.Destination /= void then
5 j" a1 m  |2 D% t                                        @.Destination.NumReservation :=
$ T1 k+ F% J1 _1 C                                        @.Destination.NumReservation + 1;
4 Z; [$ ~  `1 X1 T                                end;" M# j, `$ U( Q6 U5 n
                                @.CurrIcon := "drivingHome";
! q" d( _0 W5 l* g                                @.DrivingHome := true;
0 A/ [6 M( T8 j$ i                        end;
1 T4 ?- K2 s% w5 l                else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ j. v" ?1 D! _+ R1 D' W' P
                        part := @.transpOrder;
, a: g7 S2 O" j1 k                        part.move(@);-- load part% V+ k, d4 O4 T1 P& T+ _1 I% r1 \
                        @.CurrIcon := "load";
$ k5 O, q& D( D2 l: H                        GlobalDistObj := part.globDestination;  S, n/ r) [/ t& v# o# \
                        assignLObj := rgmanager.rgAssignL;
% |* F3 G  n# O# T' g' u$ M                        row := assignLObj.getRowNo(GlobalDistObj);
" m2 x6 h4 C2 M                        if Row = -1 then -- since 70
+ I8 D; _( m' x5 B                                if lan=1 then
& n8 x$ A- t/ |7 r                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ X" e% G* T4 I7 `3 I- S$ T$ ~
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
! `  s6 h9 A2 T# ]/ K                                else9 h' H# c6 L- q
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," [7 D7 R$ F. Y2 j- }) }  g' w( t
                                                to_str("in docking station: \"",?.~.name,"\""));                                , n0 C% }9 t* E6 }. X
                                end;
- r1 d' Y$ O4 C1 W+ ~                        else
$ Y. g, J6 s# T( R5 A2 t: @                                @.Destination := assignLObj[1,row];! i( ?+ o/ c/ [
                        end;                        % _! A3 |& J1 ]
                        newDirection(@);
: Y' }+ T% \" z! m4 W+ c3 T; u                        @.HasOrder := true;
. X# l' T) M( U1 d* Y' G                end;5 ^$ \8 x. b9 ^$ R
        end;
; P' I' `6 _/ Cend;        -- of the method
% t, f2 h1 @) S4 }" e/ p' N
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 : z0 k  \9 n/ ^( o8 R. y1 k; ~
0 e$ V: N7 [9 c6 z
这是AGV_putin中arrive的method。
6 Q1 E, \$ s1 W' g; D, [
6 ]/ J$ @, q5 e4 D当到达物料速度越高时,这个报警更多,7 H. G3 s) d3 @- a
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。/ R! b2 M( D, A; D; C
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
* T, B6 l& N6 Z8 |1 b1 j6 F
2 P) c$ @. Y' y  g另外一个小建议,就是move,所有的move都可以这样
% B8 N: x" C: ^) v' D( uif not move() then debug end
7 L  L. c/ Y5 s- r3 B; v4 U这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
/ \9 m# z* X; S) [4 k  ~* Tplant simulation中的free libraries有AGV模板,
& t4 l" {: \; W+ O. e0 j. ]8 u& b$ X里面也有案例。/ ]7 |+ |1 f! ?" d$ O
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
5 a9 W/ L& E/ U8 B3 t: Z9 a
% x) t& ?0 a" J; e6 ?7 n9 W* R3 v我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 4 Q. A4 W0 m# `! A

, ?3 w+ C! Y! [: c( I+ u: N! q7 Y+ Q那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 , B) p& u* g2 T; f/ I" h2 p! }- s6 W
这是AGV_putin中arrive的method。  K% Q$ ~8 E  \8 V0 P/ O
7 y9 v$ D0 ~% s; c5 B
当到达物料速度越高时,这个报警更多,

( y+ f! Z* P- m9 C& g1 V2 k另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-2 19:56 , Processed in 0.015495 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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