设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6663|回复: 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* \) T- y
*/! {! q$ o7 ~/ E3 ]
is
$ l1 P% x' J* q- U        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( a- p3 @, m  [! g! ydo
1 j6 d6 p( r9 _) u8 t        Lan := rootfolder.Internal.Tools.AOLlanguage;
& b' r1 ^5 l8 |& F, P2 a4 Q        if current = @.Destination -- else return5 s% J1 T! c# R+ H2 @) R0 g% K# ^
        then
* }/ V$ _0 C3 c                @.Destination := void;, n# c' c. H, z/ v
                if @.occupied then8 {: R3 I2 y. V# y4 A
                        part := @.cont;) W, o7 v  D3 }3 E( I
                        @.transpOrder := void;
: ~/ Y' s' @/ H1 W                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) V, d% U0 P9 L$ f+ J
                                @,root.eventcontroller.simTime);# _- \2 j# F3 S1 h3 G( O
                        @.HasOrder := false;- E5 H9 C; o7 z- u% @
                        @.DrivingHome := true;5 b$ d0 M6 T$ S) k" b- c
                        rgManager.tryToStartTransOrder;
4 l5 @' m4 L/ T                        if @.Destination = void
, K* U% Y2 [0 P# h& K+ u5 X                        then -- no transport order for vehicle @
7 Z5 i7 @) E' e                                @.Destination :=
! n0 o* a# R6 |& o% L                                rgManager.nearestFreeStation(@,track.~);% w0 U- R$ A0 U3 T/ f; b
                                newDirection(@);   
) }4 n, \1 t2 B0 s8 d! n/ j$ \                                if @.Destination /= void then
3 B- S/ }8 i+ a1 U5 D$ {                                        @.Destination.NumReservation :=
0 ]& g8 M/ N4 p6 i                                        @.Destination.NumReservation + 1;
! r* W& J+ V% [. v5 g                                end;
- M9 c' O$ E& a  N( j2 m9 p                                @.CurrIcon := "drivingHome";
( R2 H6 t, U. E% `4 b% v                                @.DrivingHome := true;5 d0 [5 g) v4 F% k0 Q- `* X
                        end;) L+ b% f4 Q% R; M, Y1 b$ X3 N' K, T
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. r! ~( i: X0 {( p7 E! F                        part := @.transpOrder;
7 K; O4 J* F9 ~                        part.move(@);-- load part
( i3 m: d  N! P' B9 O0 F& L                        @.CurrIcon := "load";
. f* v/ E6 C8 p' z) x  I/ l                        GlobalDistObj := part.globDestination;
* O2 J) b' z" [1 a. k# F8 w# S                        assignLObj := rgmanager.rgAssignL;/ L# l+ m) s5 u0 _- h/ k; j. V
                        row := assignLObj.getRowNo(GlobalDistObj);
7 Y( u/ Q: d- e1 H                        if Row = -1 then -- since 709 k% W3 v+ p" r: W9 F
                                if lan=1 then
0 P% f. o+ |. f+ Y! Y                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 Q- l7 ]# g5 E' w+ Q0 s7 O
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
/ j' |* g  D6 M7 w, F                                else
, t/ W3 ?. A# B* l1 ~0 m0 u                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ u  \$ `( F! |2 M) y                                                to_str("in docking station: \"",?.~.name,"\""));                                1 r4 ~: K9 t8 R0 n# |9 w4 }7 b
                                end;- ?3 Y% a; h! C2 c! P& t
                        else
* S' Q2 L2 G# }0 }1 B. F' d                                @.Destination := assignLObj[1,row];/ [8 o# S5 u5 Z& |
                        end;                        * x( [! C2 A* P5 k
                        newDirection(@);
! U0 A; ~# l6 q2 k                        @.HasOrder := true;" J4 a) J; G8 @+ }" Q. B9 ^
                end;
* g5 b, M1 q* v; R        end;
8 P+ |- K2 A8 P' l& S. x, [5 Rend;        -- of the method
0 u  I7 f: z$ d7 Y+ P! U6 X5 J/ X' P
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 2 e1 ^) i6 }$ B* m; v; i

2 J" V) r/ U' p$ ^这是AGV_putin中arrive的method。( F4 I3 A" t! x, \- {

4 L$ z& l$ J8 O; b当到达物料速度越高时,这个报警更多,$ h4 ]- J  h- O; y1 Z5 {! l+ g
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
% }% Y, \) n4 P7 U, h+ C/ G# S- e) g程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
& Z4 U3 |' ]5 ?" }0 f
; U5 d/ Z9 P# l* h0 W8 A另外一个小建议,就是move,所有的move都可以这样! q4 M8 Q/ }  D; l  O# ?% f
if not move() then debug end. _* P7 _! ^* A8 H$ B
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
3 i" w  N7 ^! Eplant simulation中的free libraries有AGV模板,3 g" g9 ~2 @: A1 o, m2 W, J
里面也有案例。- C+ u! }/ G4 Z- U( L
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
  U3 [. `) X4 b/ A( j& d
2 j6 V" J, W  g; e我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
, ?2 h6 e$ ^+ x. G
/ C/ K0 B" f8 M" n$ z% O; L7 N那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 8 _/ H% z" g- |  Q
这是AGV_putin中arrive的method。
6 V: d! K  L5 H% I6 c) j, c8 W2 g3 t  D( Z5 u4 v. d
当到达物料速度越高时,这个报警更多,
! I) ]" F1 }6 M2 [, L; Q
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-19 17:36 , Processed in 0.014645 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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