设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7413|回复: 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'
, X7 _! x- e+ p* z; {*/
# r1 v8 C: Z" ~# t9 Eis5 Y) a: t7 x8 r7 `, q. h
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 V" U% b  p8 b- W0 U% M/ e
do6 Q5 d9 v3 L. u( Q
        Lan := rootfolder.Internal.Tools.AOLlanguage;" s" r6 Q  [5 L  x7 O
        if current = @.Destination -- else return
; A; S7 ~* d1 l        then% n6 B5 S0 A7 J4 k1 ~6 W
                @.Destination := void;! Y) _3 N2 l. c' z- n" D- B
                if @.occupied then6 m0 Y" K+ G# }* V. w
                        part := @.cont;
" N* K2 k7 [8 D) O/ s                        @.transpOrder := void;( |) l* B& c8 \0 q
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- {# A8 j  w# e
                                @,root.eventcontroller.simTime);, c' |! E8 q  d8 P
                        @.HasOrder := false;
' D7 w4 U1 l& E% c& |1 k1 W                        @.DrivingHome := true;1 k5 q# [+ M6 V  I9 d! i
                        rgManager.tryToStartTransOrder;
; U! l. M' g! O4 }: e. ]" u  d                        if @.Destination = void
8 l7 d  X. q$ d) p- N7 l, s                        then -- no transport order for vehicle @( s9 C2 f5 q* H% E
                                @.Destination :=
4 r/ B9 R0 ?8 m: V* Y1 |% T                                rgManager.nearestFreeStation(@,track.~);
% `* }, Q1 p4 h                                newDirection(@);   
/ \# z8 ]) H" Q/ e* l& h                                if @.Destination /= void then
+ U: N/ h3 i1 U: H2 ~" B( `                                        @.Destination.NumReservation :=1 s/ f( `1 l& J  ~8 |! Q# f; v
                                        @.Destination.NumReservation + 1;& A: j( _$ {1 ?. O" D
                                end;$ \7 X5 `* u( u3 F! N
                                @.CurrIcon := "drivingHome";) `* f2 q3 W  \" c1 ^  Z9 o) d. R
                                @.DrivingHome := true;
0 I" N! P' _, j, Y$ [  N- w3 n                        end;9 P. ~. N& ]6 s: P
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 g" }8 [: O; m$ c                        part := @.transpOrder;) ~6 x6 |8 s6 l, c$ ?) ~
                        part.move(@);-- load part5 d1 L* Y8 m! {9 U
                        @.CurrIcon := "load";# i2 O& Z( y6 e; H" e  O1 t' v
                        GlobalDistObj := part.globDestination;
6 R" S8 L8 w+ O6 d% o; I2 b                        assignLObj := rgmanager.rgAssignL;
, }( ~! W1 Y; \/ M: S# x) U) ~                        row := assignLObj.getRowNo(GlobalDistObj);
4 c5 W1 R2 p- v$ O                        if Row = -1 then -- since 70
0 {% Q" X: b+ ?5 r6 v                                if lan=1 then
& c( ^$ J. e9 ~0 X0 B0 l" W                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 q+ A4 m+ d. X: j9 ?- h) C+ J
                                                to_str("in der Andockstation: \"",?.~.name,"\""));3 Q; z0 r6 C0 S- |
                                else2 t% ?8 ]* _: Y( V! `
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 X+ \0 f; \6 ~$ a- H0 s! O                                                to_str("in docking station: \"",?.~.name,"\""));                                - G" Q+ q& ]) ]! f: Z
                                end;" R3 J" V- r& C8 k) _1 {1 [  h! r
                        else
1 f; o! v$ n1 y0 R% B7 g                                @.Destination := assignLObj[1,row];" a) d# A2 r. d2 `5 c+ y
                        end;                       
2 p/ E8 c& v% B- N) ~' Y                        newDirection(@);5 W0 H( h& W+ B0 ]( o
                        @.HasOrder := true;0 s# S$ D5 {7 H9 w3 \( l
                end;
! X& L: {% g9 z. l  Y2 V. r        end;' V2 v& x! ]5 O$ @% j% M& h0 V/ t) l1 Z0 O
end;        -- of the method. |0 k. Q' u! ~  Z, Z7 Y: F% i
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
* u# ^! u2 U$ g+ L1 N3 @  b% p# q& l; ?% c: {) m4 q/ e
这是AGV_putin中arrive的method。2 s, a! ^6 U: k! [
( T- U- J  c% [. d
当到达物料速度越高时,这个报警更多,: f& l! `$ p$ x7 i2 k+ d
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
; P, G6 E- d) \3 i程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?  K/ H" N4 D- q) k. t. c; H

8 i& v: \2 v  ?! A3 b另外一个小建议,就是move,所有的move都可以这样
  x' ?2 U9 k$ T3 a. ?if not move() then debug end
: I& j$ K) a" G- x  x7 H这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
; I# ~- Y8 p0 ~2 v# d* c( vplant simulation中的free libraries有AGV模板,
( I( F5 q' k+ O1 h6 I* C里面也有案例。$ E! v3 A/ G( i' Y
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。9 T7 Y/ h% H/ i
2 S2 ?0 M9 U( X  x
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
. {# q6 n: w! {. M
. i, {4 @! q8 [4 A' L那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
( S4 L! [8 x6 H! F) U. m这是AGV_putin中arrive的method。
$ E: u8 Z  Q; x8 t! A
  W) l& [0 h; U! q  Z; g当到达物料速度越高时,这个报警更多,
: Y+ h/ h8 J; p7 q
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-10 05:41 , Processed in 0.021084 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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