设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7716|回复: 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'$ N1 y9 R, e8 V- Y  R; l4 L
*/
9 Y- r+ w" h+ f  ]9 S8 u5 Bis) A4 z0 ^- D8 ]! d
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;- H( |* g% v% q: n. M7 H( F9 H
do
. Y/ s0 u% A. m) W7 p, u        Lan := rootfolder.Internal.Tools.AOLlanguage;( |+ U" T- T0 P5 {5 s9 T/ n
        if current = @.Destination -- else return
- A+ a3 b4 E; f5 _( X        then
& O  [% E8 ]. ~) K" j                @.Destination := void;0 N: |: v" i+ |  h
                if @.occupied then1 D9 _6 s9 i& i7 i& l
                        part := @.cont;
: d1 b0 r- ?! u& ?                        @.transpOrder := void;
  G7 T) ^: y. P                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( Z' a' p/ I  b
                                @,root.eventcontroller.simTime);
2 w  j4 l9 z9 Y) o( [2 F' H                        @.HasOrder := false;
' Z( o" K4 g0 Z7 Q. ^, g  _                        @.DrivingHome := true;
% E$ T4 B6 C1 h& N                        rgManager.tryToStartTransOrder;
6 A& J2 I; F& f8 S+ S3 {3 A                        if @.Destination = void0 X% a3 J* a' \& f$ D
                        then -- no transport order for vehicle @
# w* ^4 V7 t- I% W) g                                @.Destination :=
0 ~7 l8 o# ?9 [7 w( L8 _) p                                rgManager.nearestFreeStation(@,track.~);4 p3 O- S+ O7 V% M6 j. P  Q7 K5 A
                                newDirection(@);   / Z( l) e" V, j1 h' x$ v' m
                                if @.Destination /= void then5 [5 V* a6 Z; b
                                        @.Destination.NumReservation :=
; D, |% V2 K* Q2 z# h                                        @.Destination.NumReservation + 1;
# c7 ]2 y. Q5 i5 Z$ [1 k0 {+ Q; b+ j                                end;
6 r* z: G6 C* l                                @.CurrIcon := "drivingHome";7 X0 j# t$ T; S. J, r
                                @.DrivingHome := true;
5 @; B) Y& o6 U/ ~' j' A, d; E6 D. v                        end;
- H' @0 X0 {: d4 |                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 P' x! @* J/ g# ~; l! ?: ~                        part := @.transpOrder;& f( r- y5 I/ x' W' h- c
                        part.move(@);-- load part
1 Y: w$ ]! j1 J, }                        @.CurrIcon := "load";4 [/ ]6 h; K- V' X4 T
                        GlobalDistObj := part.globDestination;
2 J9 i5 E- Z/ L& F. q                        assignLObj := rgmanager.rgAssignL;
& g& p7 H: v. ~# I6 ~8 l                        row := assignLObj.getRowNo(GlobalDistObj);5 E' d5 R, |/ i( P3 Z& W, B# V1 W
                        if Row = -1 then -- since 70
, ?- k- k8 a8 S( l: n; ]                                if lan=1 then* N2 A, V  x  ]' c! [2 |' @
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" U& F$ Q; W" W( {$ J                                                to_str("in der Andockstation: \"",?.~.name,"\""));* d5 W5 i+ B! V$ W5 k$ T2 ]
                                else: ?) o6 ~  y9 G8 X
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" I9 p, v7 e4 A- T7 R8 H1 p( j                                                to_str("in docking station: \"",?.~.name,"\""));                                7 D: s# J( L1 u8 g2 X) I1 g
                                end;, v5 A* ~; l9 J
                        else/ C8 s. }8 A2 z+ x  Q
                                @.Destination := assignLObj[1,row];3 j7 O2 q1 x$ b+ M& ^
                        end;                        7 ~$ o- p3 g/ q8 U0 S
                        newDirection(@);% o( ?, ]+ f  G8 t
                        @.HasOrder := true;6 [. O3 r$ j; a; `' f
                end;8 _7 Y  Y2 P4 i; D9 E2 r
        end;
! C4 R' R8 p0 c+ N' hend;        -- of the method
$ x% B; F9 E, s* B* C
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
" I9 c& {  E: V! V' N8 t
1 V% P, V1 J: ~, U/ P这是AGV_putin中arrive的method。
7 `* z+ Z, o5 r" }$ L) `
6 W$ l! a2 j7 |当到达物料速度越高时,这个报警更多,, h; B0 ~) A  ]7 C: \3 T& i5 e
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
$ i' G2 Q8 Y  v; }程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
/ z! K: C# N6 {6 a3 S; p5 q& U$ ?: G) h) Q6 x8 q" ?
另外一个小建议,就是move,所有的move都可以这样" z0 r$ V0 \4 S1 z! ~
if not move() then debug end, a2 M! _2 S4 l- d& }5 T
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。4 ?' V# ?- C9 s0 J) E
plant simulation中的free libraries有AGV模板,) h3 o. b# {0 O& @
里面也有案例。- C% [0 O& k$ c/ r  E: o2 Y
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
& f% I0 S1 U" c, H9 i% U9 X: C/ u' k$ f& W- Z, c
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 $ s1 v7 d0 Y+ R  I6 n( \. g
* `& Z8 H2 F  l# N
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
! t; e" T- S' i7 C这是AGV_putin中arrive的method。6 r# u: z* L& ^- u/ J. p

% y' M" F! @( _$ ]8 J$ n3 m5 r/ d# s当到达物料速度越高时,这个报警更多,
# O) V5 g9 K5 ]' J
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-25 19:34 , Processed in 0.022118 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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