设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8546|回复: 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'
) p& _' m' ~; x6 n7 N2 d$ ^! J& E*/
( ]# M; e' q% Eis
4 B$ S  C" h, S5 @2 i8 |8 O7 p        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ ?# }6 }  D* t6 ^# l3 O; Ldo
+ q- a2 A5 k% R        Lan := rootfolder.Internal.Tools.AOLlanguage;. I* j! t1 J3 e  k/ ^
        if current = @.Destination -- else return* J+ @: k# P! O( k' ]  y1 r
        then: G: K. v; C& l: V4 n
                @.Destination := void;# s9 }) m1 p9 h% L3 a
                if @.occupied then
# u* l: p/ J0 k9 E6 C                        part := @.cont;( y7 T+ r7 t6 `/ O/ Q" S
                        @.transpOrder := void;
+ V$ v6 o  w8 f! Z3 N. R                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! J6 h, ^& Q8 y! m
                                @,root.eventcontroller.simTime);
' P  ~0 e" ~( A2 s: o4 i6 c- o+ J, f7 K                        @.HasOrder := false;7 r2 h# n: u8 d& ~' V% k  s
                        @.DrivingHome := true;0 ]3 t3 W9 t, `
                        rgManager.tryToStartTransOrder;& H' _) E! j$ Z
                        if @.Destination = void+ G' T' u$ k% `2 A
                        then -- no transport order for vehicle @4 ?8 `6 q7 B/ v$ Z% G
                                @.Destination :=
/ S/ J4 j2 c. g" a6 [: w                                rgManager.nearestFreeStation(@,track.~);5 s* t. V; H8 T' K' }+ t
                                newDirection(@);   
2 L% Q4 b; s! j$ A: T: S5 Q                                if @.Destination /= void then9 Z* f( i* X0 y; c2 |; D
                                        @.Destination.NumReservation :=! \0 U6 E0 y2 D. @. t* k' M
                                        @.Destination.NumReservation + 1;
5 }9 `4 G8 R) u* J" P                                end;
2 c; k2 z, i# m$ T3 l: v/ x6 ?  Y                                @.CurrIcon := "drivingHome";
* Z' k* f! h% X$ d3 O                                @.DrivingHome := true;( }, z4 B3 {2 ^: m, u1 j( p
                        end;* j4 a9 m1 @3 ~, V( H- B6 o
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ @( n1 L6 l& T: P                        part := @.transpOrder;0 D$ b5 c/ d0 r
                        part.move(@);-- load part. W( _4 u) Q' ]+ x
                        @.CurrIcon := "load";
1 S  n7 V# r9 v3 S& k/ |                        GlobalDistObj := part.globDestination;0 {6 _2 u7 w7 r
                        assignLObj := rgmanager.rgAssignL;7 ?) S# \* P' e6 x
                        row := assignLObj.getRowNo(GlobalDistObj);: \! U* Z) s5 d# m" F8 w5 a
                        if Row = -1 then -- since 70
& w7 T/ e. q/ ]                                if lan=1 then9 P, @$ P5 b/ `
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 L9 Y+ l3 Y( k1 T& x2 W
                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ v+ `+ ~) _& \# E$ \# \5 h
                                else
. F6 U9 T9 G( u                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' }4 c; k/ C6 a. a' B
                                                to_str("in docking station: \"",?.~.name,"\""));                               
0 z+ [' R- ~( j3 j2 w" a- b                                end;
2 b5 n8 U8 H" K/ t                        else- H+ k7 {! |4 I$ H1 m. H
                                @.Destination := assignLObj[1,row];" q2 X$ D, h$ i% P/ a8 o
                        end;                        5 z5 y/ B! k% P+ Z0 A8 I
                        newDirection(@);
5 X5 B" O, w* ?7 `) R9 t: _                        @.HasOrder := true;1 X$ w5 E3 y( k. h! t9 L
                end;
" k& G7 X( F" I        end;3 B3 V5 G0 P* f( Q; p, r
end;        -- of the method9 p6 |9 y; y. y2 j$ }5 i
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
' a  b" G( a6 D- U! d3 v' P6 u6 K6 A& C! V# K8 B; V
这是AGV_putin中arrive的method。
7 n$ h7 W! I! r* Y+ [0 Z' Z* V, R. |" ~; `5 P
当到达物料速度越高时,这个报警更多,1 b: v+ P; C8 F) W
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。1 m. w9 K1 L! _. u' N. o+ i9 [$ f
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?7 u& \6 ^' v$ N7 z9 s! {3 ]
2 O- Q  F. O4 j9 T9 u8 }. F
另外一个小建议,就是move,所有的move都可以这样# @, i* B7 ^* y" H+ R
if not move() then debug end( h! _6 M5 g1 I/ F2 c3 E8 |
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
, `; w8 q1 ]! N5 k* j& Pplant simulation中的free libraries有AGV模板,
) m8 t. q6 n( A0 J5 H里面也有案例。5 b8 j* J- `  {# @: K0 A
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
% t: J( w. n) X) T& m# \
' _8 l" v9 y4 o* R我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
. F: r7 @/ R* N# r, L$ |# j7 M6 B5 G
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 2 P4 n0 E9 C7 u$ z  v. H
这是AGV_putin中arrive的method。- v$ p& J* p/ w* {% G
/ T5 w' v( t# O1 \+ y
当到达物料速度越高时,这个报警更多,

  X# @# _% q: q2 L$ D6 o' b6 y/ O另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-10 19:33 , Processed in 0.014631 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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