设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8371|回复: 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'' V2 p5 w4 N" J3 n3 z
*/' W' k+ `/ n0 T7 {  A
is# k  T" t/ }3 }. `8 _1 b
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" h4 c7 p! S2 n3 K) udo
$ L9 Z& `: N; Z        Lan := rootfolder.Internal.Tools.AOLlanguage;
0 @7 P. N& g( R        if current = @.Destination -- else return1 P. |8 \5 t: F  h; M' G( z% D
        then: v* {( Y! C4 I
                @.Destination := void;9 C$ |  Q; r& I* t9 @, H! X$ J1 X
                if @.occupied then
8 q6 @$ O6 k6 u  j                        part := @.cont;
3 Z0 v" k3 k& r. J                        @.transpOrder := void;, t: z! q3 V7 n. a  ?5 D3 Y
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& N5 `6 s6 N" `  x; G" h                                @,root.eventcontroller.simTime);6 U) d0 u$ Y- T2 M3 t( n
                        @.HasOrder := false;0 g1 w1 E) J# o+ |# P
                        @.DrivingHome := true;
( V1 H5 }' {/ J* n( M                        rgManager.tryToStartTransOrder;$ A) g$ x" @- s/ K$ r/ u( F
                        if @.Destination = void
: b0 n0 H4 b* P: I0 s# n, s$ R                        then -- no transport order for vehicle @2 F  C3 U0 ~' B0 b3 n
                                @.Destination :=$ K; m0 I1 S6 L+ H3 m
                                rgManager.nearestFreeStation(@,track.~);" g: B& O1 _( \% x! F
                                newDirection(@);   
5 `* F4 p1 M* [1 N                                if @.Destination /= void then0 ]$ J5 B8 p7 Z
                                        @.Destination.NumReservation :=; i, t6 |2 x) A
                                        @.Destination.NumReservation + 1;+ |& {% G+ r% v9 Y
                                end;! b6 J/ w0 z$ X! J
                                @.CurrIcon := "drivingHome";
4 X8 l, c' j) b' [& Y; e) x                                @.DrivingHome := true;; {1 W  Z+ C& e) z, O
                        end;/ Y" G$ ?5 c5 I7 l5 o; f
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station" m* C1 \0 n' m5 P+ m) \
                        part := @.transpOrder;* J0 B$ I. m/ H+ U
                        part.move(@);-- load part
5 W% O, N2 k9 s# b, u                        @.CurrIcon := "load";* B4 G) S& ]: i  y* v, y
                        GlobalDistObj := part.globDestination;. q* G' i& V2 [3 v
                        assignLObj := rgmanager.rgAssignL;
* G! o! J3 \9 r7 |) p. ]                        row := assignLObj.getRowNo(GlobalDistObj);7 S- u' u2 B* c- b9 {- \
                        if Row = -1 then -- since 702 U$ f/ i9 r4 c' R5 t
                                if lan=1 then6 U* J1 d* S" Z8 O5 X
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ ^' q1 e: o( v# e( T% ^                                                to_str("in der Andockstation: \"",?.~.name,"\""));
9 L! a* {+ j: |" _  l                                else. B3 [5 ?& W* I- g
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
  ~- _6 ~- y4 |! D7 }                                                to_str("in docking station: \"",?.~.name,"\""));                                / u8 O7 s) x3 c( o. n
                                end;
+ f1 ^( g  A' H# k) v                        else
6 _  w* s' `) s7 I* P% u3 [2 l* |                                @.Destination := assignLObj[1,row];
/ a) B: w0 E4 r" t: _                        end;                       
/ e5 B/ @* {9 ?, y$ s                        newDirection(@);0 @' j8 ?( R; D; y: R
                        @.HasOrder := true;2 h3 l* T/ R5 \4 p  ^
                end;" P8 u0 Q) ~. H+ Q4 S; n
        end;
! c* D/ J$ b5 X' n2 B3 U+ T. eend;        -- of the method# z$ \5 w+ \, N* G; s
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
- X/ ?/ C0 h) e. n7 _9 P# c
, F+ y, M4 v, R6 A2 B这是AGV_putin中arrive的method。" _9 g$ r) e/ t  y: ?
' Z' G9 |7 ?3 [& g/ y% e1 S
当到达物料速度越高时,这个报警更多,
5 v3 g& c" x1 c! {  x& Z; K  |8 K可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
* A$ F: S% b3 r& I9 x程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
; N. A% X- D: v4 f4 W
* n0 F; c% b( R* m( |- [4 Q另外一个小建议,就是move,所有的move都可以这样7 s3 \% }* A& O- c' S* o1 ^; q
if not move() then debug end) E2 C3 ]$ s2 _- B# Q
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
9 q: F5 B/ f2 w4 V7 g6 x' C& K% a5 Fplant simulation中的free libraries有AGV模板," ?) a& g" o" W
里面也有案例。
; i# M' Q7 B# G. w, k4 A7 x我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。. h/ g3 B  n! v- B

+ [, \9 r  f: R: l我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 / B* x: H2 w" b: C& o0 y
6 M+ }' Z: Y/ b, w4 h
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 9 A$ U' ]) k* b! l
这是AGV_putin中arrive的method。
0 R1 {$ Y$ Q* Y. M/ @6 @( G0 v7 ]  k. J2 J+ K) g
当到达物料速度越高时,这个报警更多,
4 ^' _" }4 y0 ]  ^) |1 f! T
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-31 02:54 , Processed in 0.020670 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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