设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3905|回复: 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') k+ l. U% U- g; g. ?% S
*/0 k* b' N2 T. u
is! U; p! |- t/ c& U1 s! M
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 @; Q" `3 l2 Z' ydo
  f3 l7 i( \# i4 N+ `9 H        Lan := rootfolder.Internal.Tools.AOLlanguage;- y% S0 X6 s/ w
        if current = @.Destination -- else return- T, {4 k% H: P1 N0 z! b1 j+ \  H
        then
0 c0 z( S: f$ W% y* X( ~                @.Destination := void;
5 S8 ]  ~" |# {- C; k& q7 k                if @.occupied then
) n' V  G, b5 ]2 W                        part := @.cont;
+ {# ^. C+ a6 [! g  d7 L' I                        @.transpOrder := void;* k& t& J. E2 l
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 C4 D+ ]- m  N/ ?: [; b) @
                                @,root.eventcontroller.simTime);
* ?- p& L0 ^' z1 z$ R! G* ?+ M                        @.HasOrder := false;8 R( J% \5 D7 i2 O& A
                        @.DrivingHome := true;1 W. V9 |1 l) L2 f/ A7 g% d
                        rgManager.tryToStartTransOrder;
( O3 ?6 Q1 O6 f+ t                        if @.Destination = void
5 y) }2 i( U: w( s8 K: W8 N$ r, y- N                        then -- no transport order for vehicle @
' I2 R4 N8 c/ J4 f% o                                @.Destination :=: J5 {/ S* D! j& J) d, q( t5 v
                                rgManager.nearestFreeStation(@,track.~);
  i. Q1 Q/ K* m, H                                newDirection(@);   
. e0 |* N1 U, |* M3 c4 r                                if @.Destination /= void then+ @* u8 P, O; P! X+ }* Z' [; |
                                        @.Destination.NumReservation :=
' t% S' P- v  x: W                                        @.Destination.NumReservation + 1;5 r# ?3 o& D$ J5 o: c! ]
                                end;/ x) B' }  K8 d6 b" K  Q
                                @.CurrIcon := "drivingHome";; Y+ p, x" d- [; W8 |" v
                                @.DrivingHome := true;* Q8 B+ N  \5 J; c& L, C7 \
                        end;+ Z9 o2 R7 q: E
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 H  D5 [  P+ t2 f, R1 k                        part := @.transpOrder;9 R; ^5 P# T& k/ u" P* B; I, ?* z
                        part.move(@);-- load part
, Y6 U* o: F1 C% S" m                        @.CurrIcon := "load";7 Z  ?1 ^3 ~: `/ A
                        GlobalDistObj := part.globDestination;8 t- E8 W* ]: X. H8 U
                        assignLObj := rgmanager.rgAssignL;( u" `( b+ u  d7 V8 F3 C( y' i$ |
                        row := assignLObj.getRowNo(GlobalDistObj);9 c6 ~! l3 ?1 B
                        if Row = -1 then -- since 70( y# I1 F) m( e
                                if lan=1 then
  g, E' ^0 g2 e9 o" ~/ F                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& D$ U1 z: P5 J0 s! s
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
3 b; C- u+ d' ~$ R                                else$ ]% n' ^3 ?" H1 l( J
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 G* h+ ~0 b8 O1 O' w3 F: m- E                                                to_str("in docking station: \"",?.~.name,"\""));                                9 p( q# A% M3 {/ O
                                end;4 _7 H* l; m0 O3 ^: s
                        else
9 M# j, Q/ q5 Q" _7 P7 p1 e' `                                @.Destination := assignLObj[1,row];- H+ d0 ^- l3 X
                        end;                        6 F5 k( a/ ]- f5 J( r* |% P/ C
                        newDirection(@);1 c& c# z3 M9 Z; w2 z  T
                        @.HasOrder := true;
- v: i- z( m- k+ ?7 D9 y                end;
9 h* d8 b/ E  W1 C' D        end;
7 ~6 y5 ^) ~8 O, Cend;        -- of the method2 b& I' `- D7 Y) {
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 + ~; C" L: h( [1 W* \( j  @
  \4 s, u- m6 e# o) V& t- @! K
这是AGV_putin中arrive的method。
& D4 D0 P6 S# `- ^( H  S6 w; d# B1 T8 L/ E) a
当到达物料速度越高时,这个报警更多,
) n3 k+ j% ?0 {+ \9 l可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。, p) Z4 O  p4 ^% F6 s) z( ]1 c
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?( ]/ Y* L& h$ n: B$ q; k( Z5 ^& ^. H

7 J% w  _' f: ]  p另外一个小建议,就是move,所有的move都可以这样
3 N) Y# O% v9 z" m4 Z( \if not move() then debug end
( {2 A5 H' Z8 P  e这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
( L( ^& B: X  b3 Bplant simulation中的free libraries有AGV模板,
3 D' o+ ~; x# ~. h( D8 ^% L" i& x里面也有案例。
+ ]' H0 r% B$ R. N( @) f我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。% u8 v! c/ J+ u) h
6 a" N0 E- {- Y) ~( I" Q' b
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
1 J3 c$ h4 t, }$ w! W( Q! G
8 `7 n4 P) j- z$ ^/ t$ g那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
2 _6 X- P2 U! ?' w* i这是AGV_putin中arrive的method。6 D4 j. s2 x% x( D  k2 W
; R6 n# r& l2 B. X/ A
当到达物料速度越高时,这个报警更多,

, _. z1 q! s* {% U4 R3 r另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-2-2 20:53 , Processed in 0.017041 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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