设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8871|回复: 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'( T8 P/ [. Q; l
*/
* T2 p# t0 J" W* `. Y/ G/ iis6 ~1 L3 I( D: g( Q
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;, U  ~9 D8 {' ]
do: z; i! J- Q7 L! \6 R
        Lan := rootfolder.Internal.Tools.AOLlanguage;
0 j0 N# \, \5 B        if current = @.Destination -- else return
; @- t" W6 z1 Y. Y6 U1 f0 v, u        then
" H; B" ~8 _8 v* J) g9 L1 Z+ f                @.Destination := void;0 [. `  ]2 c+ b( ~
                if @.occupied then* f% w+ S1 B# U7 w
                        part := @.cont;. d5 r. H; `! m# h8 H# n3 N8 C
                        @.transpOrder := void;
, W7 ^7 `( h, _0 ]( F% z, I' s5 [                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- \' z+ n% U% |9 F! u
                                @,root.eventcontroller.simTime);
# t+ g  q$ t1 {2 P2 B! v4 E& s                        @.HasOrder := false;
: v/ R9 l( {' ^7 Z$ X                        @.DrivingHome := true;
" ?  _+ V! f/ S- l# m( B( r& b                        rgManager.tryToStartTransOrder;  n4 M( V2 [3 {9 E
                        if @.Destination = void
: `( F- Y- }( M$ n/ V5 N# B* k/ \/ P                        then -- no transport order for vehicle @
  o1 f! l/ {# ?9 q6 h9 v9 F                                @.Destination :=% _0 [6 o& U7 |# P5 N. b
                                rgManager.nearestFreeStation(@,track.~);
' r+ @5 q( x0 H' N) w                                newDirection(@);   - L- a9 J% S' h6 J' \& I
                                if @.Destination /= void then
9 ]( Z( O! X/ l3 j                                        @.Destination.NumReservation :=, U, J3 u  t# A% D. m
                                        @.Destination.NumReservation + 1;0 Z: `: D$ I) q9 c7 ^
                                end;6 X. h7 F4 a7 G' i
                                @.CurrIcon := "drivingHome";
, u: `+ V/ Y: G, S* M5 S& h( M/ W                                @.DrivingHome := true;
4 C0 S! B0 ~5 L7 \4 r  f: ]7 C                        end;
# B$ c) H0 f6 u& Z* k* K                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 J  B" |6 q. O* D# M' G: R3 \                        part := @.transpOrder;8 N2 K' o/ q- v' ]
                        part.move(@);-- load part1 N& ?/ ~' d" B8 O# D
                        @.CurrIcon := "load";/ ~8 |1 {/ |+ ?0 w
                        GlobalDistObj := part.globDestination;
$ N. P/ e" x! J1 n8 r, E% ?                        assignLObj := rgmanager.rgAssignL;0 P6 c5 K" ~# x+ o8 b
                        row := assignLObj.getRowNo(GlobalDistObj);  {2 {9 v* b( a! Y2 C
                        if Row = -1 then -- since 70& A* R) U) E& @0 k4 R  I4 w( {
                                if lan=1 then# t/ G2 t# z2 i' x2 p- A
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 c( _6 p% W3 q$ m& c) c* Q8 _
                                                to_str("in der Andockstation: \"",?.~.name,"\""));' [6 ?8 J$ Y* ^
                                else
" I: j4 ^( \* Y                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: l% y( s' X; g                                                to_str("in docking station: \"",?.~.name,"\""));                               
6 o0 H6 W6 G3 x. E2 O                                end;$ K, s+ i5 T8 M$ f" T# a
                        else6 z. Q9 r7 F: f
                                @.Destination := assignLObj[1,row];0 W1 ~. W  x7 F: x: o1 l1 {# h
                        end;                        # u$ t. V/ m/ k; w0 i" K4 U. I
                        newDirection(@);
  r& N& F' r9 h* t) I3 m                        @.HasOrder := true;4 M/ W( m, o/ w+ h) F9 R* n( i) \: i
                end;
6 \, Q4 X5 t$ e# b9 Q# ^1 A        end;
. s* m7 b5 P4 oend;        -- of the method
0 P9 I0 `5 F8 I7 I& B: c
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
  s/ m. ]& }/ @
4 @6 X4 M  i: U. {这是AGV_putin中arrive的method。
0 c  Y) O$ x0 U. ~$ y$ N/ M2 h" s, Y& ?+ R
当到达物料速度越高时,这个报警更多,
( x+ J  C" T  |8 c可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
  `- F7 Q$ x. R; b程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
2 m# S5 c$ }/ V; J( w# e' U+ v" ~5 O) [- v. I& D: n
另外一个小建议,就是move,所有的move都可以这样
( I# a  D, ^* W7 b, D: f+ Kif not move() then debug end1 b; Z: l3 V, o1 d" ]7 O5 i
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
* s, y: T$ a8 x& E& pplant simulation中的free libraries有AGV模板,
1 d7 Y4 }. S7 v& j. ~0 m里面也有案例。
$ I0 D  S0 @+ R3 W我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。0 ?0 r0 i" ^0 J& h* q, O5 \
' z( M: R/ l% r) Q
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
. C2 I: n- O' X  t$ h3 s6 t7 Y6 [7 V- q& S- J
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
8 y5 {9 P$ `4 y) R7 j& t: i这是AGV_putin中arrive的method。
+ [8 j. a* t1 x( @( I$ b& G; x0 A7 x' n  `5 k9 R3 D( F
当到达物料速度越高时,这个报警更多,
, P6 m3 d, ~" A) o$ k  P
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-1 13:11 , Processed in 0.017713 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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