设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9093|回复: 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'$ b4 B$ S8 ]1 t% K' O! t
*/
! j* j" Y! x( R1 J9 U# Tis
3 C2 d) C9 w- F$ N        part, GlobalDistObj, assignLObj:object;row,Lan:integer;# D" @2 h4 Z' N- w
do
7 q, ~% ?5 b* F6 r+ h        Lan := rootfolder.Internal.Tools.AOLlanguage;$ [* u  Z8 ~8 Y
        if current = @.Destination -- else return
2 H0 N8 b% N& O$ N3 x1 i) }        then
4 M+ K- G6 f' q" D/ O                @.Destination := void;" ~% t& \: w( x$ a2 B
                if @.occupied then) n0 G* @4 L0 ?, d( R- D
                        part := @.cont;/ P$ {! K" u$ F# s
                        @.transpOrder := void;
# H& A) Q* F3 B* A8 y0 N                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' S1 Y( t+ m7 P( k
                                @,root.eventcontroller.simTime);
, v1 a; W* a9 ]7 R) }' o                        @.HasOrder := false;
. n; Y7 Y4 x4 a" K0 Q                        @.DrivingHome := true;
1 I3 \3 j' b9 q# N                        rgManager.tryToStartTransOrder;5 D( e4 K$ h: b- Y
                        if @.Destination = void
( z8 v6 x$ p4 V, N  F0 C) m% ], t                        then -- no transport order for vehicle @
6 N$ L' a- \  u0 }                                @.Destination :=, D- a2 F/ F% N1 M- `
                                rgManager.nearestFreeStation(@,track.~);2 A0 D. u$ K( V9 |
                                newDirection(@);   
6 V- v% _+ U3 X8 b4 T! f4 O. V                                if @.Destination /= void then
7 J0 e; i  @4 b9 J: e5 R                                        @.Destination.NumReservation :=
; J( j- l/ [. x. l: t, y& S& O+ S, u                                        @.Destination.NumReservation + 1;& I8 G  b( }: |2 z; r/ b3 G! o; m, \
                                end;* p/ z" ^( L1 _- O4 s
                                @.CurrIcon := "drivingHome";
0 S% T, i" y# h8 ?  T" n/ z, B                                @.DrivingHome := true;
" p9 ~9 j/ j; [( F. F% b                        end;
7 ]0 f# \, E  q                else -- the vehicle @ is empty, both vehicle and part are in the same dock station) t; \2 K$ ^! ]+ L/ _) _
                        part := @.transpOrder;
5 J) o% B+ ?/ B& ?                        part.move(@);-- load part
$ a( o2 Z' @$ g7 B6 O+ o                        @.CurrIcon := "load";
" R' W( R. N$ {; A# l  I                        GlobalDistObj := part.globDestination;7 x7 P! X  t6 c3 J
                        assignLObj := rgmanager.rgAssignL;6 s% A. S6 Z  p; ^) ]9 w4 G) V
                        row := assignLObj.getRowNo(GlobalDistObj);
/ A7 W  `) C, y/ n! h                        if Row = -1 then -- since 70
9 t8 i; k2 a9 L. I1 C3 |" h                                if lan=1 then1 |1 k, D5 \& }5 i* f
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 @( `6 J# h% {( N7 K: f" m& J: b
                                                to_str("in der Andockstation: \"",?.~.name,"\""));) V0 f: D$ N/ r4 {4 `, @* Q  R. [
                                else) Q4 |9 ~+ \) e) D, q! b
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 Y4 X3 A* T, \                                                to_str("in docking station: \"",?.~.name,"\""));                                1 ?" _# W- f$ N" v" X
                                end;5 Z/ Q# X! U* Z' C, _+ Q. z
                        else
+ i; h' a" D3 _4 v  x; i; N                                @.Destination := assignLObj[1,row];
" @4 S, j7 ?5 ]0 X                        end;                        ) ^' p* b8 x: r. F9 D
                        newDirection(@);
0 G; O2 X! J2 z/ `1 X+ s8 C                        @.HasOrder := true;
2 ^$ m# A. N$ B" K+ Z                end;. I( G' o1 q( u7 z, W7 `" L2 ?( [) \7 D
        end;
" \/ V0 Z* d' r" t4 I7 Send;        -- of the method4 I! G" S; w* `& p# Q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ) D5 B2 r3 t% \( J

( }7 [7 a* P' M; E8 y+ o: n这是AGV_putin中arrive的method。& s, k4 m5 ]1 b  m' z
+ t! F1 d: Z$ L! {, a( b! S
当到达物料速度越高时,这个报警更多,
$ u/ p! O9 {: ]可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
4 y5 k. ?: a1 n2 X; X程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
) T! X  ?4 s& W) m* P- R8 @7 F% \
- {6 I* g- O( ]# j另外一个小建议,就是move,所有的move都可以这样0 i. W% i' ~" {
if not move() then debug end
3 A% C, z; d- [# H$ N# Y这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。4 b7 y+ }" o8 C8 v4 s% s7 O
plant simulation中的free libraries有AGV模板,
) S4 X$ h. A' g3 U里面也有案例。) r- k$ v0 s$ j( m! g
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
4 k' U- q: Z8 g' T4 c: \
9 T+ R- ]8 T7 t& v' c# m& g# x# _我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 9 ?. [) |- g4 ^- C

( J! }, O/ h4 }那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
% N+ ^8 N, B  @, L这是AGV_putin中arrive的method。
+ M0 `; m* T8 l0 V
' h# l) D1 s, s) P0 D当到达物料速度越高时,这个报警更多,

2 P5 `4 I* ~* Y另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-13 09:25 , Processed in 0.015833 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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