设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5671|回复: 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'3 n" [/ B2 @6 A7 l$ R: y+ a& @
*/: B" k; b% i/ J, p* B* \" A
is7 N( I) `2 V5 e
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& N9 I. U0 M) `; u* D' ido
! J2 X- }# l  x& P        Lan := rootfolder.Internal.Tools.AOLlanguage;
, F$ R! B: A8 N' h" ?! d6 d        if current = @.Destination -- else return
* ?$ P7 R3 y$ f% B' ?# z6 a4 v        then
1 T: C+ o- G& B  n$ z                @.Destination := void;( Q: e) G5 A5 y
                if @.occupied then; E6 c% S7 V6 n7 d; R  ?
                        part := @.cont;
/ W$ G% L/ B9 k0 q/ J( v; {                        @.transpOrder := void;
& g% V+ C. o1 W0 U# U                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 f/ k, a; o# {4 \7 h
                                @,root.eventcontroller.simTime);
- d) |# Y% `( h+ Y* c                        @.HasOrder := false;
5 d( Y8 e8 y& p( v; l9 s/ B                        @.DrivingHome := true;% Y6 Q' D* G& W
                        rgManager.tryToStartTransOrder;
- L& ~$ x7 [+ E  E- J8 j                        if @.Destination = void
& k; X' y! e& W# p                        then -- no transport order for vehicle @. }, B3 ]  R* X0 T  L' W+ W. v
                                @.Destination :=
  R8 y6 y% L& C6 ^' k                                rgManager.nearestFreeStation(@,track.~);% w/ X, A' [1 t
                                newDirection(@);   
* N5 {$ ~8 ?9 Z+ n/ \$ B                                if @.Destination /= void then- W0 W# o5 e8 ~3 n$ d. I& K
                                        @.Destination.NumReservation :=
! L/ X+ k5 ~: w  I* y                                        @.Destination.NumReservation + 1;
' Q4 q/ j7 W" o2 I2 B# j                                end;
, x2 l0 f6 V1 C: E# e9 w0 i                                @.CurrIcon := "drivingHome";8 l4 l9 g. S0 t4 [' R- `* `
                                @.DrivingHome := true;
! p: I6 L" H# Y( p% g, b( }                        end;
# A, v( Q& V) V# v2 O9 l: m- i                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: S( Q' ?- w) f9 k, p                        part := @.transpOrder;- v6 o  y- \/ O( ]! t/ e
                        part.move(@);-- load part. q% l+ o+ g* |# W' l$ ^. R0 Z
                        @.CurrIcon := "load";
4 n+ q7 l) i% r5 W* T4 Y                        GlobalDistObj := part.globDestination;9 R* r7 ^# |3 C* Q
                        assignLObj := rgmanager.rgAssignL;* x* O; c; T9 C% a) R9 V1 k/ @
                        row := assignLObj.getRowNo(GlobalDistObj);: J& g3 a% c7 @' c$ o
                        if Row = -1 then -- since 70( A8 l2 n% @+ Z1 k& a% u" g
                                if lan=1 then9 C- V# p5 x& g# ]- o9 j
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 L; T- d) m) J1 @8 r7 W                                                to_str("in der Andockstation: \"",?.~.name,"\""));
; W( i1 u1 e3 i8 y+ G                                else) ?# |( n9 p& F, h
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 }7 m5 c+ M: I                                                to_str("in docking station: \"",?.~.name,"\""));                                ! E) d) m! d, I. W4 Y+ _
                                end;
6 y0 u. G2 \; [- W- h                        else# y9 E: s# e- J! [
                                @.Destination := assignLObj[1,row];. M" Z, m3 J% V5 O3 ~
                        end;                        * x, e6 k# z" C, d% O; t+ J
                        newDirection(@);
) q# v9 F4 L' }' K                        @.HasOrder := true;2 a9 ?/ S  m  b5 q! s9 `9 A( m
                end;5 Q# m1 A% p0 w( d3 Q7 `- L
        end;* s. ]# o1 Z. n* J" d2 z/ h* {
end;        -- of the method
, `4 l0 Y" S( M% l4 E  n
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 1 E# {2 X& t8 H/ j* a" }+ |2 N

; B$ n5 D; J. }6 L) E& z9 ~  y这是AGV_putin中arrive的method。
3 c1 d# ]3 E* Q' I! U- k- h* T5 @5 W8 `- O7 V
当到达物料速度越高时,这个报警更多,% h3 F! u  {$ _6 f; \7 ?8 n2 L
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
# t' [% [+ t1 v6 ?4 g程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?0 l  {6 P5 ^4 W/ _; e) r* A5 Z

: H3 ~. g- q" B5 `- e  z$ p0 G另外一个小建议,就是move,所有的move都可以这样
5 B( `* y0 b/ iif not move() then debug end7 j: ~" T6 e% o& B5 u/ d3 f
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。$ S& N+ W; n( J0 U: O
plant simulation中的free libraries有AGV模板,
& H6 j+ |' e6 U! G里面也有案例。
- D4 J& A; o& A3 {4 c0 H% v我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。) P8 ]4 U4 d; B* r! g5 o" P

; [; W  N. I9 y2 p我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 & J- _% O- D1 c  o+ E4 S2 K( `
" B2 r; D! v6 X
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ! S) H( q8 y2 `) b' x9 q
这是AGV_putin中arrive的method。
3 a  e! O' S# q, V2 u/ E3 j+ f& t/ p7 X' L' m5 t2 V
当到达物料速度越高时,这个报警更多,
3 j' W/ Q( ]5 }) N3 _# _
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-12 22:36 , Processed in 0.020985 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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