设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8346|回复: 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'- H" s* O- a$ k/ c0 u
*/
" N' O, M$ q" F; Z8 c7 his! h. p3 T% N9 x' d. o6 l
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
  p4 i/ D. K$ d" L5 I8 udo
& S% p5 ^# f) O) u( T7 x! n9 B        Lan := rootfolder.Internal.Tools.AOLlanguage;" q) I0 R% N6 s2 H
        if current = @.Destination -- else return
& T# k' p* y2 B) M# k2 w$ b        then
$ H- g7 o5 b' I, }$ j                @.Destination := void;1 y. j* y0 E- C
                if @.occupied then# K6 I) n( @8 c& d: E! |# q  G
                        part := @.cont;/ R0 V  \9 u4 A" W# Q2 z, n& l% ?
                        @.transpOrder := void;& K0 T2 N" V3 Q; p& }1 Q
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: g( j5 E  s# ~) @                                @,root.eventcontroller.simTime);
* p1 @. x% R3 ~                        @.HasOrder := false;
, V7 o2 N7 T3 E                        @.DrivingHome := true;! @: F3 K% ~  E- M  @' G6 X
                        rgManager.tryToStartTransOrder;! z2 e' y& B7 M9 e9 m
                        if @.Destination = void
, @; Z" F9 T# f3 J4 C                        then -- no transport order for vehicle @' {  m2 _4 e% P* x  K3 [: _
                                @.Destination :=0 b) E6 _" q0 ^$ z3 T: h( p6 Z
                                rgManager.nearestFreeStation(@,track.~);
. i0 E$ `& E( Q  Y                                newDirection(@);   % z3 I* h# @: _( [1 K+ g! F
                                if @.Destination /= void then5 O) ^* T* T% F, F0 ~6 f5 k) |* ~* {  Y
                                        @.Destination.NumReservation :=% S6 ?4 P8 F- H, e" ?+ V: i4 t
                                        @.Destination.NumReservation + 1;" i- f2 J* c: I; R" s+ W
                                end;0 `6 W. u, m! k. P, Y' \
                                @.CurrIcon := "drivingHome";
$ z; g( g8 L* c' S0 m: y2 o                                @.DrivingHome := true;+ ~2 V1 n7 U& g2 K
                        end;' H  h  y) {% W
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station( [6 o( g# C( C
                        part := @.transpOrder;, T8 `* J: g& k. h( t0 z5 W
                        part.move(@);-- load part3 _" G* E( F( o8 a
                        @.CurrIcon := "load";3 y1 n1 [1 D) V! W
                        GlobalDistObj := part.globDestination;% N6 [+ g) Y( A) T
                        assignLObj := rgmanager.rgAssignL;3 ^1 z& L% T6 h9 J; `/ u! S; }+ K. F
                        row := assignLObj.getRowNo(GlobalDistObj);( b5 b2 r. X0 L6 L$ @1 d- z
                        if Row = -1 then -- since 70
1 B2 h: o, A4 Q& x                                if lan=1 then
! I. H6 g( y  H7 T* ?                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, q# p# }5 c: X                                                to_str("in der Andockstation: \"",?.~.name,"\""));2 h% s2 s( H! `! ]! w* c
                                else
( @! i$ R% _8 Q                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; [9 U' ?/ l4 [0 I  q) t( i7 k0 k& k! x                                                to_str("in docking station: \"",?.~.name,"\""));                                2 Q# \& p) A+ Z& F
                                end;% a5 t9 N$ @; K% F5 Y+ `
                        else
5 b" [) r- o/ `' q6 y2 O# Q0 E1 u* G                                @.Destination := assignLObj[1,row];6 _3 O; Z% |/ m( N+ h
                        end;                        7 s5 U# A% y" @8 [0 B- ?# [9 X
                        newDirection(@);
/ A8 A: e1 l: Z6 g; e7 D                        @.HasOrder := true;6 v( @3 V/ q1 F; w: H
                end;
$ F' a% m! l3 ?; w8 W! F        end;
3 {3 I- V. Q" N2 o% z2 hend;        -- of the method' @7 {7 h$ G* ^4 O0 H
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
' \6 K# K8 X; c
- }8 g' l9 y0 Z6 q; [9 M这是AGV_putin中arrive的method。
0 y# B0 R# `$ }8 v
' B8 C1 \- Z5 [( l; d8 X$ d当到达物料速度越高时,这个报警更多,
, O+ w! t% ]" ?* l, q; e! l, D可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。  L& K- I% s0 ^
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
; b$ z, _3 d8 N) z0 O9 V* w' z& H$ L' V
另外一个小建议,就是move,所有的move都可以这样  }2 W" d) _" [
if not move() then debug end
# {0 N% i* c. e6 s. N8 H, a这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。5 E! c0 [' Z) d( k& @8 b& s9 z
plant simulation中的free libraries有AGV模板,
7 F7 t4 g1 K" T4 ^* l) t4 _里面也有案例。6 G2 y! Q4 l2 B
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。# O$ }6 C  R& A; D2 k4 r; N- N8 C
2 w# s2 Y  H; V$ L+ z8 Q8 W
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
- |! Y: f+ }1 z! L$ p% w2 e4 b" ?7 {
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
: z8 S; x  ], H, F$ }这是AGV_putin中arrive的method。
3 X0 @! c) R; X: _, J- b! x, H5 ?  |0 N9 v
当到达物料速度越高时,这个报警更多,
3 D  g, z8 \7 h6 U0 T
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-29 03:16 , Processed in 0.016339 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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