设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6034|回复: 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', r. U" a  B' n! _
*/
* y8 ^+ Z/ X3 d. Z( Y6 ais7 w/ Q- c  @* m7 E; c
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% c6 I3 y6 u. t1 A  n* Zdo
; ^8 p% x& c6 o        Lan := rootfolder.Internal.Tools.AOLlanguage;
  l0 C6 N$ {* Z+ g5 Y- Q" z        if current = @.Destination -- else return+ b2 c5 g+ v; R9 W
        then
) C& a6 b: w, r3 t0 O                @.Destination := void;
# g2 a  @6 `! D: Y- \                if @.occupied then
+ d3 H- u& ]- I+ P$ w                        part := @.cont;
6 t: u+ F. _4 |& S                        @.transpOrder := void;$ K2 ]/ i& o% h4 i( R" T9 F
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," y3 Y, x5 `% C
                                @,root.eventcontroller.simTime);( W. S4 U' k/ N% \! e
                        @.HasOrder := false;
8 z" \9 J5 e% Z% m" V( _( q% L                        @.DrivingHome := true;) z( s0 B7 w# i; [7 e' T
                        rgManager.tryToStartTransOrder;
; |' j: Z' C3 e. o2 K+ |- R                        if @.Destination = void$ N! I& h8 h: K
                        then -- no transport order for vehicle @7 y  P  e" X' }3 p
                                @.Destination :=  `; e- ^& H. h$ B5 N
                                rgManager.nearestFreeStation(@,track.~);
# A9 _8 c% M% Q8 z5 ^2 ~                                newDirection(@);   0 D4 Y# G) Y( R9 h8 l
                                if @.Destination /= void then& f4 e* X, L; _. O& O& {5 k
                                        @.Destination.NumReservation :=  @5 \" e9 u2 M; O
                                        @.Destination.NumReservation + 1;2 v0 Z% c3 f5 v5 C. q" I
                                end;4 p5 P8 ?, V1 _2 ^8 K
                                @.CurrIcon := "drivingHome";
2 ]% p5 E9 |5 x1 x0 u6 a% M7 f9 z                                @.DrivingHome := true;
" c- H3 G* ^& E; R/ g                        end;
6 f' E3 @" g; p  {& v                else -- the vehicle @ is empty, both vehicle and part are in the same dock station; i% n9 t1 G! k* u6 m7 E8 X$ o
                        part := @.transpOrder;
  L5 G/ ]( c) {, U0 L& B9 L                        part.move(@);-- load part  y1 y1 g' }2 n. B
                        @.CurrIcon := "load";
+ o6 a$ h# z3 v6 K  j# M% h                        GlobalDistObj := part.globDestination;
/ W' y7 |' X3 c$ X7 `3 ^9 s/ W0 N* u                        assignLObj := rgmanager.rgAssignL;
& h; ]8 @$ d) ]  H# J* c. Q8 f                        row := assignLObj.getRowNo(GlobalDistObj);6 J) B$ x- R' @" R4 g
                        if Row = -1 then -- since 70, ^! @+ Y5 R  Y" U4 `* F
                                if lan=1 then/ `; l/ [- G. L  f3 h
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 t& X1 y  [6 H' C* P
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
3 ^% u+ h8 y7 K" D, S% D1 _1 j                                else
2 [: ?: w% z: l) h2 t: \( k6 l6 w                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 I  z7 S' m' c2 T
                                                to_str("in docking station: \"",?.~.name,"\""));                               
4 T$ Y* E  y2 C  V) p2 q                                end;/ ], Z  u# q1 W+ ?
                        else7 o4 T5 P1 k  ?! \7 I
                                @.Destination := assignLObj[1,row];
: _$ q8 t& \, u                        end;                       
, X+ t* O$ [+ g# A- v# W                        newDirection(@);
+ G* W- g6 o) i2 r0 \. E2 K                        @.HasOrder := true;
, m: d# k, Z) X; _  h; r  Q8 G                end;
. N0 H3 q4 c4 P        end;
  u7 `( s% }+ W6 p3 @+ Cend;        -- of the method! ?3 ~# }3 ^& g5 I; }" I0 @7 ~7 y1 o
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 + U4 E" h8 O' l3 V2 M1 ?+ k, G
- h' x0 l# k0 \6 t0 Z4 T# C4 o. C1 B
这是AGV_putin中arrive的method。
2 b; a6 e: a7 ?% l2 a* l4 ^  K$ X0 [( Z- S8 |, w3 I/ @
当到达物料速度越高时,这个报警更多,
/ W+ ?: `2 p' v0 N" a可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
4 m# ^% Z$ [6 v% Q' D程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
- X( u$ k# ?8 j% B, @  Q1 n7 O- L, [" P0 k/ B% m3 A( M
另外一个小建议,就是move,所有的move都可以这样
$ r, q4 x$ w" ?- }$ \8 |8 nif not move() then debug end
1 ^! }, k. ]5 H; x( }$ f这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
3 `, t3 P( T7 y3 |0 A. F( \plant simulation中的free libraries有AGV模板,
' t# [2 v9 s# |里面也有案例。* L  t5 Z) Q& b
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。+ u0 j* h' y* \/ ]) O

' I" }9 v* m) \8 Z) ]- ]" s5 g我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 * p6 c( h. j3 F& X8 s

4 K# v( S' u: Y4 }. i! ?那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 8 I" m: D7 e6 K/ |" f9 A" S: l) `
这是AGV_putin中arrive的method。' j3 Y6 F' @) H- J  H

. [" h: T. |6 a8 w2 b3 {4 W当到达物料速度越高时,这个报警更多,

4 S# c( C1 [* k& \7 K& F另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-13 23:24 , Processed in 0.026533 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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