设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6463|回复: 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'
8 C7 }8 Y1 |4 ^; Z; Y*/
+ X# t& N% d$ ois0 T1 H( [5 K" L% D5 C; `& j% u) m
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ x2 b; A# G" J0 |& Y3 K
do6 m/ t3 y7 b- N  [* @. W
        Lan := rootfolder.Internal.Tools.AOLlanguage;
" ?6 Q9 O- C! _) h8 U        if current = @.Destination -- else return
  z2 @$ y% m8 p; v: V        then% j4 g) v& V+ J, n3 ?
                @.Destination := void;
/ f' d4 L4 t1 t  ~* U% j3 A, ~3 ^                if @.occupied then3 j# i/ F  e- i& p5 @$ M
                        part := @.cont;
, I( U/ J( g, M2 r1 T+ P8 ?6 u1 Y/ g                        @.transpOrder := void;5 f8 u3 }5 I9 H% r( X/ c
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 L, h7 a: Q7 r                                @,root.eventcontroller.simTime);' o+ u, K0 t$ {0 E& n1 q
                        @.HasOrder := false;
9 c; B4 G; n, a2 X0 f. u1 E! P) H                        @.DrivingHome := true;
6 e. Y) j. i2 ?+ q$ v                        rgManager.tryToStartTransOrder;$ H, y. ^, @0 x3 t5 `% a) Q8 @
                        if @.Destination = void" }0 |7 s- }, O7 H( s1 b, w6 p
                        then -- no transport order for vehicle @
6 T3 u' D9 H5 L+ H0 u& E                                @.Destination :=
. o# e' ~' l6 B9 q                                rgManager.nearestFreeStation(@,track.~);, r, c6 T2 s& i
                                newDirection(@);   / D: C6 E& F' O' Z+ p8 S$ V
                                if @.Destination /= void then
5 w8 w* _7 ~! f5 I7 m                                        @.Destination.NumReservation :=
! w7 f! Z6 F' x: \3 g                                        @.Destination.NumReservation + 1;
( V# Z, I' q. V3 @+ a9 w+ T                                end;
! A& ?2 k9 p+ X& O                                @.CurrIcon := "drivingHome";1 v$ k2 h- o/ E; ?, a  C
                                @.DrivingHome := true;; a' D$ W) L0 U4 z" u0 @; w
                        end;2 J5 M% M  S, w) c/ l; S4 i
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. N3 k1 M( J/ q* q( F) m# k) `2 B                        part := @.transpOrder;8 d& [" s8 ?4 |
                        part.move(@);-- load part' ?; W, x( q# N% H6 d) H; W
                        @.CurrIcon := "load";- M9 I1 V9 Y" L% @
                        GlobalDistObj := part.globDestination;
4 Y3 I5 D  y# c! {9 b7 k% C2 X4 T                        assignLObj := rgmanager.rgAssignL;
$ A0 @$ C! L4 u- D4 F' ?/ ^                        row := assignLObj.getRowNo(GlobalDistObj);' C' K1 `- u- `! H8 J( b4 r( P
                        if Row = -1 then -- since 70
1 m8 h, z/ d4 I( D5 {                                if lan=1 then2 k( Q% Q6 b4 a7 j- w1 ^
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 \* H  j7 y- }( B( u
                                                to_str("in der Andockstation: \"",?.~.name,"\""));4 t9 n2 ^% a7 H: ~
                                else
! S6 a  _9 W' N/ x- t9 D                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. i& _* N8 R( d
                                                to_str("in docking station: \"",?.~.name,"\""));                               
3 B9 {  G; m5 i                                end;
0 S' _: |2 q6 @* z5 `                        else6 C8 w; O' s/ y4 G- y4 e* H% o. D
                                @.Destination := assignLObj[1,row];8 i5 i- ?* V. Z3 N! H* ]* A
                        end;                        - Z7 Z& p; L1 |2 |$ f* C/ z# J" G
                        newDirection(@);3 @  t9 ~" ~: V6 M$ E2 p3 @
                        @.HasOrder := true;
, j9 \4 l9 j3 U$ z6 V$ y+ a                end;
5 h: K% O9 n% W: U$ u$ t: B+ v5 i2 w% U        end;% ^; L: Y5 d' m, K
end;        -- of the method" w7 k* j! E: C" H" C% E& _5 J; A) d5 E
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 1 o: L1 L$ L; M# U3 f8 _' {
/ I' d  `  U6 m6 [3 ?
这是AGV_putin中arrive的method。5 H, U/ h1 M& V& k- S
/ B' Q' c0 H4 w: k- J2 h
当到达物料速度越高时,这个报警更多,& R) m; k0 A& K7 o( S
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。! R/ G. s! ?% I/ S
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?; b* L' O& H5 c  e' I# \

6 N- X# X2 G" b2 y1 ?* n另外一个小建议,就是move,所有的move都可以这样2 f" |0 N5 o  z! X
if not move() then debug end
0 B# f4 b  G$ _8 {" W* b这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。* U2 N, S! ?0 g
plant simulation中的free libraries有AGV模板,* @2 _6 V% F, g. J
里面也有案例。2 V  r+ {# Q( h9 ?
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
: U7 W  l  d; j: o8 ?9 b0 _7 Y5 F. g7 X6 b  N
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
- d! ?+ H9 ]7 r( H3 ^' N
6 N/ j$ }' k  ?6 h7 b$ z! L那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
) u# X, l8 X! ?( g7 F# r# \2 d, z  E6 L这是AGV_putin中arrive的method。
2 i$ U5 w# O% ?# q, ?  s. p9 q8 R9 j# A
当到达物料速度越高时,这个报警更多,

2 w3 K) x; H$ h另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-8 05:31 , Processed in 0.018495 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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