设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9178|回复: 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'# V, y: g& `$ o" ~  s0 y
*/- d( p5 `! c, Z# I( p: u* M: t
is
1 O  ~0 D  _5 n! P& D& `        part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ m( |, D& X: n: F+ c& H8 G
do/ Z, g  A: J. B1 m
        Lan := rootfolder.Internal.Tools.AOLlanguage;2 h/ L3 n1 y& s% z* k$ F$ D
        if current = @.Destination -- else return
) K2 u! [) D" M+ r( h        then; G9 I0 X/ W$ B6 @% i
                @.Destination := void;( |) Q/ g, O* |7 x8 K+ H+ c; D
                if @.occupied then: i5 a6 u" w4 d( i5 q
                        part := @.cont;
: }" H. w: L; l4 X$ v4 o. p9 [                        @.transpOrder := void;5 z  r# I$ T- E5 V
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," ?1 d/ {$ d  ]8 H" j. ]% {
                                @,root.eventcontroller.simTime);) p; S6 V. p7 F! q& Q
                        @.HasOrder := false;
6 h2 P; A, v0 L; e8 _5 O6 W% h) h7 y                        @.DrivingHome := true;. w' @' ?7 v9 ~1 m" F. E% h
                        rgManager.tryToStartTransOrder;! T0 ^- y) G. T. L- z
                        if @.Destination = void) ^4 h, c- S3 s: Z5 n
                        then -- no transport order for vehicle @
; t9 o; R3 u; c% Q                                @.Destination :=  \* P# d9 ]! T, k, I) y$ z
                                rgManager.nearestFreeStation(@,track.~);1 {1 j; |8 ~# L7 z
                                newDirection(@);   . W7 b8 A# p+ ?+ w' A
                                if @.Destination /= void then4 Z! s; ?  N) C( `% \
                                        @.Destination.NumReservation :=
# \* F8 [. r5 I/ C4 ~/ P" u. e) b                                        @.Destination.NumReservation + 1;
! D: X; q9 ^$ K; o                                end;5 l  P, o; M" I9 W( [, ~3 O4 S
                                @.CurrIcon := "drivingHome";- H" I( g. S" \0 S* U0 b/ S
                                @.DrivingHome := true;/ H" }' c$ V: d
                        end;
& C. I/ z* Z) {' W) ~                else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 s  T8 X. O! Y) |, Y
                        part := @.transpOrder;6 S1 C: m2 @# z7 h% h3 }+ G
                        part.move(@);-- load part
$ t" s+ n! I2 H/ F$ y3 t                        @.CurrIcon := "load";
0 V4 p9 k0 C! |; Y1 y- U                        GlobalDistObj := part.globDestination;1 x: @! N# F% |9 t' ]) M+ \8 f
                        assignLObj := rgmanager.rgAssignL;, U, K6 j% D$ a$ V
                        row := assignLObj.getRowNo(GlobalDistObj);
* I: F9 F7 i! g4 J) Z, \                        if Row = -1 then -- since 70% Q' J9 L2 \( Q- G, a: ~$ d4 u; V
                                if lan=1 then6 j: {! S" S. h' D0 S7 d* b
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 G/ t2 f% @' ?/ I9 j) \, y
                                                to_str("in der Andockstation: \"",?.~.name,"\""));" q" Z4 [1 F; ]
                                else5 m! s1 Y/ d4 x6 g
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),  l. Z# V# ~6 C- Y7 I& J
                                                to_str("in docking station: \"",?.~.name,"\""));                               
* u* F+ [+ n$ r( f                                end;
& Z3 p7 }& i$ F! s& u0 x( t                        else
9 U6 ?  b+ n% p4 s7 {2 E* S                                @.Destination := assignLObj[1,row];8 F8 V+ T( G, P1 j- [3 |
                        end;                        ; N& c9 ^+ F7 @3 j
                        newDirection(@);
6 _5 Z! F, I" i; |9 m9 _                        @.HasOrder := true;
$ G( L" H8 q: b' H* q0 e* b                end;, s, H% S, z& G6 m& V5 k
        end;; w6 Z1 Q1 L& Y" ?; G. l6 C$ j
end;        -- of the method
, C+ ], o! C% L- n- C3 W/ J/ t
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
7 |, z2 E" c8 i5 K: {9 t" u4 }: m/ X- g% y; i3 @+ c
这是AGV_putin中arrive的method。
: S) V' |# E7 B6 u$ ~6 F$ a! q$ y, j) D0 Q
当到达物料速度越高时,这个报警更多,. R: s( b; f  {* z
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。* G1 n7 l2 b6 x) V
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
, R7 t1 Z# a$ u3 ^. o: I! A$ X  S& D' {& P
另外一个小建议,就是move,所有的move都可以这样
. u  S( M1 m* t7 G0 M+ qif not move() then debug end9 [* a$ n8 T# P% M% g
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
7 G& T8 Y& f5 G5 e# f: Nplant simulation中的free libraries有AGV模板,. }/ I* v! U& O/ x( I- u
里面也有案例。  O" B0 a. l. q
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。$ M8 q1 P, y# {; u7 b+ c" [5 \

( z6 d" n& _! `9 I; ~. j2 u我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 3 e; ?% m  C: u' ?6 E4 _

$ C7 J) w2 t# z( V) B那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08   P; q& h; Z% u
这是AGV_putin中arrive的method。
( u2 l7 m' e. g5 o7 e, L0 p8 G1 E* }% C, |: ?; [% f" V" _
当到达物料速度越高时,这个报警更多,

  b% Y, T) Z' j+ T  R4 ~& U: \另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-18 05:37 , Processed in 0.023113 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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