设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5565|回复: 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'
2 }6 z) ^. E9 S& Y*/
5 S, T8 n2 F6 qis0 k7 z/ B  f8 y, r3 [* a3 w  @( m8 I
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;& e  K* z  F3 o
do
6 A1 C% u: b3 ]6 B- k0 R        Lan := rootfolder.Internal.Tools.AOLlanguage;; z9 b1 I8 l" L  i* f# z0 y
        if current = @.Destination -- else return
  C; [. g4 T9 g        then
0 a, A$ ?% A/ U                @.Destination := void;$ o8 P% l8 K2 e$ |
                if @.occupied then4 d( \$ S7 g( G+ S! Z
                        part := @.cont;
- O6 M2 `7 w" d- f2 A! R1 A                        @.transpOrder := void;
; _( |0 e" {6 V5 [. I1 D                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 E" L. G. t# x  J( E$ ?# v
                                @,root.eventcontroller.simTime);  ]! e; \- c9 R- U/ @
                        @.HasOrder := false;
9 I+ g) s; ~4 l" @                        @.DrivingHome := true;8 `* }+ b, n; P( J$ e8 g
                        rgManager.tryToStartTransOrder;
0 J! v, \- E- X: |                        if @.Destination = void
& m; s! y" b$ ?$ m2 I$ D5 M                        then -- no transport order for vehicle @5 H1 s" p+ j' f! [5 S
                                @.Destination :=% S7 p0 S- ]6 @( v7 o+ b
                                rgManager.nearestFreeStation(@,track.~);
* u0 b. }7 P1 W" m9 b4 t                                newDirection(@);   & H9 p" B' k1 ?  Z
                                if @.Destination /= void then
& W5 {* D- C  [* D6 i7 N                                        @.Destination.NumReservation :=
6 X( j" l3 H1 a3 I, [0 v3 r6 u                                        @.Destination.NumReservation + 1;
5 f$ C  Z5 c4 m: M/ y                                end;0 ]- X6 B0 I! B3 r6 Z  L5 b
                                @.CurrIcon := "drivingHome";
1 z% u" }" Q$ @7 v) y; o                                @.DrivingHome := true;! I* W& X5 s9 N; M6 a
                        end;* c4 M0 g$ ~6 w( ]
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station! n% C& P" W" i/ d. y3 j
                        part := @.transpOrder;6 H# M# c. e' X* l/ N" e! U# y
                        part.move(@);-- load part
  b: O7 N1 k* g                        @.CurrIcon := "load";7 N4 ]7 @9 K1 V
                        GlobalDistObj := part.globDestination;& V6 `5 ?8 C) K3 a) w) V* T
                        assignLObj := rgmanager.rgAssignL;
6 X4 g* M) \( o. ?$ t                        row := assignLObj.getRowNo(GlobalDistObj);: ?; y3 H4 ]/ ?! u( q# g" l
                        if Row = -1 then -- since 70: h6 v) B2 a% W$ P. g! w4 ]
                                if lan=1 then
5 u) }+ D: y9 {8 L5 S9 j& W. p                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( F: D( X! T7 w' F& Q, R2 b% a) V* B                                                to_str("in der Andockstation: \"",?.~.name,"\""));* r5 ~6 {: U+ G' |3 h  v' }  K0 V
                                else
2 C$ f1 c, k  K  @                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( i0 W* F2 K: L! {  |# O                                                to_str("in docking station: \"",?.~.name,"\""));                                - |# q. S  {) O: ?( T3 k
                                end;
" d5 U; y; `) D$ R                        else
6 F# X" j3 z) h8 Z# K                                @.Destination := assignLObj[1,row];
! G" p- ]1 y6 J* A! e" f  V& x6 S# z                        end;                       
- ~- q! y+ ~4 I0 ?" D                        newDirection(@);4 P4 Y, G/ X! `2 r' }! o+ o3 L$ a
                        @.HasOrder := true;2 y1 o* L) t# ^) u. t
                end;" W# \' h  l- L6 X, r
        end;
/ k  {5 L/ N$ h( P. J% [2 vend;        -- of the method, M. @  U/ k4 `( F- b2 \7 ~4 B: H
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 . t' ?# O6 O9 _) z7 V" ?5 P/ X
9 c8 k/ L  ^9 U4 b+ `
这是AGV_putin中arrive的method。+ C) U5 I( o/ I

9 U# D5 [; f' @4 U! A- }6 ^当到达物料速度越高时,这个报警更多,
2 p, t' ^9 F2 D3 l; P8 K可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
2 ^/ K8 P( R9 b5 \" d程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
) K5 M$ B3 t( u
4 U. {8 @* Q" S: z6 C6 ^) J另外一个小建议,就是move,所有的move都可以这样
( _) e  B. \% g0 Gif not move() then debug end
  _# Y. L( p0 l+ \这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
( c9 a% W8 d/ aplant simulation中的free libraries有AGV模板,
( E) S' B5 ~( M6 R里面也有案例。
( l. x1 j5 O( _; N3 G- Z$ s; ?我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。# d, Z' L4 |- c1 ]
/ B& _# p2 u% U0 f
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 " N$ m# O2 J! k% S; c
9 ~1 J/ i. s0 u1 k. ]
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
( W6 U# j# Y, n这是AGV_putin中arrive的method。" v5 |# |2 R+ L
& f1 j7 m" [! q, ]+ F
当到达物料速度越高时,这个报警更多,

# O9 M3 K' t! E4 n; c- L! k另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-6 06:38 , Processed in 0.015425 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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