设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8891|回复: 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'' V5 s& M: D6 P3 S( {: G
*/+ I2 p6 ]  w6 D6 q' L
is
8 G" g# R% j/ P# P# [  `* w# v        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 b& N- Y! M0 n, i7 l$ H0 ado
" H0 U+ V! W$ N; ^        Lan := rootfolder.Internal.Tools.AOLlanguage;1 T7 d. p( I- [, N1 K% f5 d
        if current = @.Destination -- else return) }" ^8 t+ S1 [% `% o: e' s
        then0 [! [7 Z2 ?" V# Z: \1 F% f1 `
                @.Destination := void;
. b9 ?9 T( c0 a( t3 f5 U4 W0 i# }3 b                if @.occupied then' y; U" B4 C( i2 c4 }; J/ f  u) U
                        part := @.cont;
$ h5 ~& M9 n- m( M6 j& H                        @.transpOrder := void;
, q( Y: Q7 r' D                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 H" Y5 E6 Z9 F2 d8 P                                @,root.eventcontroller.simTime);
, V7 v* M0 A2 b* Z6 D; Z. d' [* S: Y                        @.HasOrder := false;
8 U8 ^3 V# r. v1 z' I% L4 s                        @.DrivingHome := true;
8 ?3 ?3 s- X9 T5 W  L9 [/ {                        rgManager.tryToStartTransOrder;
$ d; R, R, v, a1 Y                        if @.Destination = void
, z/ M9 K) V5 b5 x' |2 q4 h                        then -- no transport order for vehicle @
/ D# I! R3 j. M" N2 b! c" Q                                @.Destination :=9 \7 J6 F8 D8 o9 c
                                rgManager.nearestFreeStation(@,track.~);* Y% W. S: s( e6 R. t
                                newDirection(@);   2 R3 }4 J' q8 C/ k( m
                                if @.Destination /= void then6 @" S# S& m: W1 p7 T0 H
                                        @.Destination.NumReservation :=# f8 b! G( ?* u2 w; L' P; i2 ]1 F3 E8 ]
                                        @.Destination.NumReservation + 1;1 s& w) r$ c+ C5 c
                                end;
, e3 a7 }" n" z! D                                @.CurrIcon := "drivingHome";
0 V% g+ m4 p6 |; W- d' y  P4 p                                @.DrivingHome := true;  ^* P& B2 D- t
                        end;
) Q, h; l" x- W                else -- the vehicle @ is empty, both vehicle and part are in the same dock station& C- r- T9 s6 n+ J5 w
                        part := @.transpOrder;% w9 ?: x; m! \' ^" a) P
                        part.move(@);-- load part/ Y0 F4 i) Y5 m4 ^* m
                        @.CurrIcon := "load";1 c: }, b+ n! H# b* L6 `2 \
                        GlobalDistObj := part.globDestination;, A( i9 M) b' v& j2 E
                        assignLObj := rgmanager.rgAssignL;( @! [7 n' c! m9 h' A* j
                        row := assignLObj.getRowNo(GlobalDistObj);
! t+ e  |/ X6 N! J! a                        if Row = -1 then -- since 708 x: G0 P; C; o7 F9 h
                                if lan=1 then
1 G$ [4 V+ c* f/ m7 }1 h( u5 a                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: a: K: J6 q0 }. C  t                                                to_str("in der Andockstation: \"",?.~.name,"\""));4 V0 |' q& r1 H
                                else
1 f$ C) V' U/ r  o# J+ C: S- D1 Q                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 D( m5 J# U) F: J/ V6 ~5 B9 F                                                to_str("in docking station: \"",?.~.name,"\""));                                - C1 j$ ]1 `0 \5 v. A, h: m8 U
                                end;# `8 c' x9 M( E7 M5 o
                        else: _+ a8 E' Q. w/ B: M
                                @.Destination := assignLObj[1,row];
6 b8 o# _) j8 u$ [4 b! u                        end;                       
, L! B+ M7 v$ n3 b* e. [2 j                        newDirection(@);$ S0 c5 W$ Z8 f/ g4 I1 Y
                        @.HasOrder := true;% B: S& [1 E' u2 S
                end;
, h" M" ^( I" W        end;# T6 f* G- ~8 J' Z6 U
end;        -- of the method
- |: H5 J+ }/ F. ], m- i
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 - P7 M. Y6 J% h# I/ T

; X' B6 r4 S* W! f( l" g这是AGV_putin中arrive的method。9 ~# \* ^! X1 G  J2 w3 P

& F1 w4 H* i3 U; o: V当到达物料速度越高时,这个报警更多,3 m) Z$ Q; @, s7 T5 {# O0 z
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。* w7 s8 P, V8 B. \! @% r! F
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?+ j1 T  L4 G; b; J3 q2 k  o
9 y4 G: t1 M2 l* t. V7 m0 o" o
另外一个小建议,就是move,所有的move都可以这样
7 v  o8 l! Z" |0 o: X& uif not move() then debug end3 F3 ~5 q# @& Q9 E) S6 t3 {2 }" l0 _
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。+ O; B  ~! v+ t  X( ?2 V
plant simulation中的free libraries有AGV模板,6 n5 L4 A0 x% s+ p; M7 ?
里面也有案例。& i- R3 g/ u7 ^' R
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。0 p1 V: B* [* b7 W9 S

3 M' T6 e, h% t: J9 \/ e/ k5 K" s) Y我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 3 Z& z2 n  A( K* e/ ~! c
& [. g4 \7 `1 \( p" D
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 : l9 z- g2 G4 f) g! e+ F
这是AGV_putin中arrive的method。
1 G* o! w( z+ c% K
6 B9 C4 p# M1 R" v) S' J# B当到达物料速度越高时,这个报警更多,

- A5 v# l5 x$ C4 g, J另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-2 20:38 , Processed in 0.018356 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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