设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5927|回复: 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'
; [. m# p- J  K" ~- F4 y; C*/
. ^: p9 G- f- }4 \8 X2 z/ H3 f, c# ~is
, n$ g$ w7 v  ~4 _/ f        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ m, V6 F* Y0 f$ Udo5 V+ e/ T! \7 r7 Y( ^3 n2 F0 d, ]& q  u
        Lan := rootfolder.Internal.Tools.AOLlanguage;
4 e! I) f9 @- q8 U        if current = @.Destination -- else return4 K) U' C, s. Y0 i1 S' m
        then
9 }' s! A5 G" N  g' w  B                @.Destination := void;# g- y# i$ t4 V( k$ ^" |+ Z
                if @.occupied then- W3 d' K8 f9 X5 R" h
                        part := @.cont;3 t* [% ]6 x- |
                        @.transpOrder := void;
. d. F8 e6 M: N7 Y! z  r" ~                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 \) L0 X0 M1 P' y2 }/ m- b5 y+ X                                @,root.eventcontroller.simTime);
3 T3 H/ h% h1 [) b7 Y1 J' U" c2 [                        @.HasOrder := false;
7 g2 b4 n' j$ L                        @.DrivingHome := true;8 x/ d) _. l  N* Q9 ?
                        rgManager.tryToStartTransOrder;: o' L* i0 `, Y6 }, _
                        if @.Destination = void
" L( M. @7 H" p7 g                        then -- no transport order for vehicle @
3 N9 D. q& _: Q6 H4 [  c                                @.Destination :=
8 k5 L% O: P( L* q2 q. w                                rgManager.nearestFreeStation(@,track.~);
# w7 P& d2 o; G- K) T- S                                newDirection(@);   + c9 V# R. Z: a" A
                                if @.Destination /= void then+ t: k, e% |% F% Z; W) d' R
                                        @.Destination.NumReservation :=
* z: s, Q7 I$ y                                        @.Destination.NumReservation + 1;8 L  n  ?3 D/ ?  C
                                end;
  V/ N( F2 t# P$ X5 d1 \2 S                                @.CurrIcon := "drivingHome";( ]" @4 H, I5 g+ n
                                @.DrivingHome := true;8 T. n$ H7 P7 O) m  R6 B
                        end;
% o" X  _. \& ?9 q3 c                else -- the vehicle @ is empty, both vehicle and part are in the same dock station) y) {' I# O" J
                        part := @.transpOrder;0 G0 f! O) I$ U; k% Q
                        part.move(@);-- load part7 m/ ~2 L$ [" q/ n  K
                        @.CurrIcon := "load";
) F! }$ a/ J3 W5 b3 c3 i                        GlobalDistObj := part.globDestination;
1 Z5 h; e. b( s' _                        assignLObj := rgmanager.rgAssignL;
- r( C1 h5 {" \/ w) J                        row := assignLObj.getRowNo(GlobalDistObj);7 r; A$ v: z) P
                        if Row = -1 then -- since 707 O: Y$ Z4 u$ A$ h8 ^6 j" A
                                if lan=1 then
- P( o  N. {) U4 R( _                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% t8 U+ B9 F* j9 q1 u                                                to_str("in der Andockstation: \"",?.~.name,"\""));
: ?1 _- }/ Q9 d- z% x9 T) ]                                else
: j5 u4 I9 e- \+ Y# ?                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& p3 r- G# C1 v: s1 U, B
                                                to_str("in docking station: \"",?.~.name,"\""));                               
9 D% R2 A$ k  O& `4 T                                end;
  p- _# r7 H6 \6 P2 p                        else9 {# ^# a  b) G, V* p6 j# Y
                                @.Destination := assignLObj[1,row];+ \+ a1 y2 j  j
                        end;                        + {2 L: F; R. {. y9 K: N
                        newDirection(@);
; J# A  @  h* c( \# F                        @.HasOrder := true;
7 a6 _0 y; `4 [$ \                end;
1 z# M5 |$ G9 B' n( \- \        end;
$ T1 M" t  ^' M; X" Qend;        -- of the method
7 l; h0 e1 [/ ]4 R& q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 * H# y" d  k$ T4 w4 A9 U+ _
7 b$ c* ~  d  A# s5 H4 \0 Y0 c
这是AGV_putin中arrive的method。
. h% y5 L& L) N5 e7 ^
5 M) d- M0 G( y8 I! [% }当到达物料速度越高时,这个报警更多,
$ I) D  R% @7 f可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
; b3 x6 r/ I( @: \3 ?程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
& [6 r/ k: q5 k7 j' w3 @  N/ E2 k/ \/ ]" Q1 a, s
另外一个小建议,就是move,所有的move都可以这样& n9 C. X/ B' R( u
if not move() then debug end
, s5 A0 a& z( y4 y5 t/ O这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。+ @, g, V. C8 E; D3 f
plant simulation中的free libraries有AGV模板,
2 ?8 [# e0 {2 I0 m2 V! l里面也有案例。- ?1 S8 W1 |! S8 m- o
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
$ \9 W6 X& C, p7 G& K
' r4 H3 j+ C4 I# I5 ]! b# N) d我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
* J" B. y, E4 A& s7 Y" t1 F$ I# t2 t/ Z
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 - r5 Q" O$ I8 M: ]/ H
这是AGV_putin中arrive的method。' O2 T* d2 b: l) l. ]$ ]

& t6 h' a! a' P9 h4 }( o" o9 V4 Q当到达物料速度越高时,这个报警更多,
0 [! N- n7 ^8 p& `$ k1 T, b
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-3 01:50 , Processed in 0.021857 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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