设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7453|回复: 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'9 b/ |' d1 A* C" P; o; I0 ?) W0 C. I
*// D( z9 s3 K+ h1 I& G
is5 B' m& `$ e+ E% Z& i0 |1 J
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# _9 F4 ?7 O* G) A8 d' Cdo( v2 u+ u3 S/ [0 i: }
        Lan := rootfolder.Internal.Tools.AOLlanguage;- R# J( O, {) \
        if current = @.Destination -- else return6 e+ n) u  l% [/ g& c
        then$ w& D, O7 v$ |" X  [* l/ f( h
                @.Destination := void;
5 e4 U: s/ t0 \% S7 B                if @.occupied then
. ]- S2 ]- d% \* B1 P                        part := @.cont;# Y1 X5 E0 L9 u+ F
                        @.transpOrder := void;; B( ]' {, x( R5 r) k& d% a
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, n( p' ^0 v- L# O9 s                                @,root.eventcontroller.simTime);
1 E. d  g! Q) x+ w- p                        @.HasOrder := false;0 V( q1 ~, i6 l  d  B1 m- a
                        @.DrivingHome := true;4 e( i: o; W4 B% ~% t$ X0 k
                        rgManager.tryToStartTransOrder;0 X# {( v# K' q2 ^9 @% l
                        if @.Destination = void9 V  ]: B7 k. T% h& Y
                        then -- no transport order for vehicle @& ]1 m  c" x! _, r2 w8 b7 p
                                @.Destination :=
. a% R3 b# b$ E3 p7 U" y                                rgManager.nearestFreeStation(@,track.~);
* P) I  S! c% p; Y                                newDirection(@);   6 s' m/ q  \8 `9 t- r) a# z6 d) G
                                if @.Destination /= void then3 b; k, Q! Q3 Z: i& ^) G
                                        @.Destination.NumReservation :=! h8 U3 }" ^  _2 v; W
                                        @.Destination.NumReservation + 1;
8 Z4 ]0 a7 P9 u( K                                end;
% C' w- `& K, z0 q7 U                                @.CurrIcon := "drivingHome";
. ?( Z  M1 d5 S6 g$ T4 E                                @.DrivingHome := true;- N2 ?) ?5 @& s* q
                        end;  @; D" _9 H1 b
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station" ?, R6 X3 c8 d1 a( J" k) E4 b, G
                        part := @.transpOrder;
8 k) Z+ _0 |8 Z7 {+ b& ]& Z  I  g( k                        part.move(@);-- load part
; ^1 i' p+ `1 I) _                        @.CurrIcon := "load";3 K  W2 W; t4 F# C. t( f% o" k
                        GlobalDistObj := part.globDestination;
$ h7 L2 o4 I0 a$ {) h: T                        assignLObj := rgmanager.rgAssignL;
# o# t, Z) [' O7 h                        row := assignLObj.getRowNo(GlobalDistObj);
9 }. o  f1 z' b4 n$ z! t                        if Row = -1 then -- since 70
  Z) \/ o0 \* G  O- q                                if lan=1 then
. S) J+ O5 x, |* M. K6 X                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 q9 D% G8 C4 `
                                                to_str("in der Andockstation: \"",?.~.name,"\""));( [/ |" Y+ S' G4 P- [7 }1 z. J, q
                                else- Z  Q- o8 T) W
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ J7 c6 Y9 c9 D! T9 t: R& D2 Z2 m
                                                to_str("in docking station: \"",?.~.name,"\""));                                * A7 f" m" ?- Z& a
                                end;) P; u& m$ L* c1 O: J
                        else$ [0 g1 T% K& K' D5 |, L' s! I
                                @.Destination := assignLObj[1,row];
3 l% [8 @) M, |# Z. h* A- C) ]( E                        end;                          i! f6 S& d0 V" w6 ?, Z( N4 n
                        newDirection(@);9 Q9 ]0 `' C. N
                        @.HasOrder := true;
+ b$ g8 X. {# f3 Y                end;
% k) @- T$ Z1 K9 O) H: x; l7 s        end;" C) F4 z, J: Z' s( o7 @
end;        -- of the method  o# K1 a, L# @" W6 X+ r& k& M/ U# v9 g
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
: q: e  @' k' z) F" E
! q3 e9 v0 [% M这是AGV_putin中arrive的method。. v' y' A  ~, R

, i1 K- |2 B9 ], I; X4 L当到达物料速度越高时,这个报警更多,
9 \3 a% J) ~2 n! s5 e7 R" p5 Z6 A  u可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。& c4 C' A, y5 j' [2 m/ |/ I
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
, H5 [3 g  q2 r; X6 U  u* B1 `
5 S# E( j, y: p  m3 U9 {5 ^另外一个小建议,就是move,所有的move都可以这样5 n% x7 e7 \' y
if not move() then debug end2 Y" M) `7 P+ [
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
* T0 O, a5 p$ A4 Y( a; H% s6 Gplant simulation中的free libraries有AGV模板,4 Z, j: _9 y) ]( S- [' `' r% M" y
里面也有案例。
! f/ C, v4 u+ L# e* g: N我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
  j/ ]& v( x7 r. J. d
+ b2 m* E: Z$ q2 j我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
! R4 `% e2 j# [& i" I9 d- V& I- u  k" c+ n2 G
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
0 P% c$ E% \, Z. o这是AGV_putin中arrive的method。3 Z% k7 `9 U: x% X/ a% K' U

  H3 G& J6 C7 }8 h) \* ?0 \当到达物料速度越高时,这个报警更多,
2 ?; C* h% C6 ?9 @7 c6 K1 C
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-12 11:59 , Processed in 0.018134 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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