设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6873|回复: 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'
3 e, X( G  }. Z1 N*/" ^$ T; O1 l& J; v0 i2 ?6 H
is: j0 K. f# C- O  F1 j6 g" k
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;( V) _! i- v3 Q/ m! ~2 y& f3 h- d
do
! d" j5 B; P: p# M        Lan := rootfolder.Internal.Tools.AOLlanguage;' W1 C3 N8 o4 H( T
        if current = @.Destination -- else return
1 q9 |6 T4 X5 u$ t. u) A5 J- ~        then3 x: m3 N9 g  U0 ~$ F+ D) j3 p
                @.Destination := void;
# w1 Q  z. t" }- M6 M! s                if @.occupied then7 l/ i8 N' q) }5 ]( ^+ b3 w. n
                        part := @.cont;
) F, R; f% i: O5 D% t6 s' b' A3 c                        @.transpOrder := void;7 \& t) S( X; [# t
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( N; Q. S: J& H' s8 F& H) o" R                                @,root.eventcontroller.simTime);, M6 i3 s9 T4 w1 \  Z5 T
                        @.HasOrder := false;
! q$ ]; `3 u. M7 N) [! ?6 |3 m                        @.DrivingHome := true;( F. [* q3 j( e
                        rgManager.tryToStartTransOrder;0 F4 q% O1 i& A8 O
                        if @.Destination = void( e- ?) X; d" ?( I9 }; Z8 e: L
                        then -- no transport order for vehicle @9 p/ G6 ^: y1 @( s( Q% ^: a1 E: h
                                @.Destination :=
7 D% }# i' i" ^                                rgManager.nearestFreeStation(@,track.~);
5 q  V! c5 r, k9 ]                                newDirection(@);   
6 j  m. |* k# J  B4 \9 L, r+ V                                if @.Destination /= void then0 `& x7 ?9 A0 |4 l  s
                                        @.Destination.NumReservation :=6 `% ?# G* L2 ^5 W6 l) n1 M
                                        @.Destination.NumReservation + 1;
9 n) w9 Z7 @1 {( O! t                                end;* ~) Q( D+ @8 m1 v6 G
                                @.CurrIcon := "drivingHome";! N7 J6 J3 a0 ~; Z4 w2 p/ ?1 x9 b
                                @.DrivingHome := true;
; k. \( N$ W! U3 h$ }$ F                        end;+ Y. @( k' t0 K5 q. i/ p. f" W
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ E+ k0 ?0 F5 H  \6 n% K- P
                        part := @.transpOrder;! L) A$ J) M, W5 c3 X# y5 ]- b
                        part.move(@);-- load part* r! |7 g6 G$ R/ U* G
                        @.CurrIcon := "load";
" @2 O4 m1 t3 Y6 h1 P  H5 m. s                        GlobalDistObj := part.globDestination;6 g' S& Z: K% s9 R2 x. a
                        assignLObj := rgmanager.rgAssignL;
0 G" i% Q  H: e  R' Y                        row := assignLObj.getRowNo(GlobalDistObj);9 p$ S8 I3 S1 u* P% I$ }' @0 Z2 f
                        if Row = -1 then -- since 70
6 f* F7 E5 ^* v3 f+ S                                if lan=1 then, M( A& n3 b: l9 d$ f
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 c! j+ r8 v# O0 `! C                                                to_str("in der Andockstation: \"",?.~.name,"\""));
  q  `0 b  t# V4 n                                else
0 @7 K, ^! l; V8 }  V  s; }: `                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 Q# D! o& l$ @9 s8 K! b' U9 ^5 M# o
                                                to_str("in docking station: \"",?.~.name,"\""));                               
/ i7 W) M' b# f7 E  C9 @2 X1 H                                end;8 |0 c2 X* C0 v9 X9 x
                        else+ E( Q- l2 M/ P" D+ k0 Z! w
                                @.Destination := assignLObj[1,row];1 _7 ^: Z4 X# n' w7 w4 v2 f- t- l9 V
                        end;                       
! ~" _# k  ~- w$ _* j/ n                        newDirection(@);0 H! w& h( g9 r1 ?
                        @.HasOrder := true;% p/ t) `2 T+ }1 i
                end;
$ G1 L2 d* y. z6 c4 ]        end;# d5 ]. Y2 t$ C: e
end;        -- of the method* e+ f8 z# v6 U4 ^
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
4 P: r1 |$ W' U7 M  B1 P$ p5 A# L1 Z1 u8 @% C2 F) ]' I# a* z
这是AGV_putin中arrive的method。9 u/ |% N- I* x. W9 T

/ q" N* S+ K" X, {当到达物料速度越高时,这个报警更多,- t4 c6 n9 G' ]6 _/ B
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。: _" b9 w, C- F7 ]/ X
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?5 u+ J3 ]2 d' Q& q* q7 e4 {
  {- Z+ j) I6 a: Z1 x" |' Q
另外一个小建议,就是move,所有的move都可以这样
' w+ F5 \2 O" n: M! M0 Hif not move() then debug end
: g  j: v* a. ], j7 Y这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
# u7 p* ]6 o+ o& ]2 U2 H  K* ]' N' Cplant simulation中的free libraries有AGV模板,
3 c' ]3 \2 u3 h) x' M里面也有案例。- f5 g& @8 a% z* S# U# ~
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。5 T% C) W% N  s5 u  m2 \+ c) V

* \, y; \# R1 S) ^& \0 K: Z我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
- z  `9 {6 T- t7 ^
& J; Q! ]  l1 Q2 z+ F  j3 Q那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 . T  M# y$ h* [
这是AGV_putin中arrive的method。0 O! b: h& \& U) v% ~

- _# W) i% t8 o/ I! V当到达物料速度越高时,这个报警更多,
; D. w  b9 O% E& a
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-3 23:15 , Processed in 0.029798 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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