设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8628|回复: 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'$ a6 q' H3 U& G& k
*/: T6 J: f/ B" a& v) |$ i6 P
is
  ~$ T* T% d& h        part, GlobalDistObj, assignLObj:object;row,Lan:integer;: S1 K; `, b) p% C0 D
do* r' b& B1 d; P, O
        Lan := rootfolder.Internal.Tools.AOLlanguage;
; L+ b& a& m/ N# w' ^; B, ^        if current = @.Destination -- else return& ^1 T7 E" r" Y& r3 `
        then
) w/ ~6 `3 o4 W                @.Destination := void;
2 R# n4 I* n. q' V                if @.occupied then; b2 {' a: v% U! D( U4 x4 @9 r( e
                        part := @.cont;7 E+ w2 E6 X/ F0 o# V
                        @.transpOrder := void;( T2 ~! w8 N0 m, W2 P! r7 T
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% `/ j4 i- I9 f. V; T$ G" w
                                @,root.eventcontroller.simTime);
/ k" g# x$ E, T+ z$ s9 f2 h5 Q3 d                        @.HasOrder := false;
( D* q0 L# Y3 f5 F0 M                        @.DrivingHome := true;
' U3 a  U1 l% P6 D9 U6 U$ X8 V                        rgManager.tryToStartTransOrder;* A4 |+ L8 |  K7 }/ A
                        if @.Destination = void
* l9 w/ z& v; T( f4 L% {                        then -- no transport order for vehicle @
; i/ @' G, Q( t                                @.Destination :=
( t& {; _, w! \% \; P* y                                rgManager.nearestFreeStation(@,track.~);7 I: c9 Z' D6 z2 }& c
                                newDirection(@);   * X6 H" b9 k/ t2 V6 W! s4 H3 V/ a) h
                                if @.Destination /= void then1 e; Y# i9 I+ |) s# i
                                        @.Destination.NumReservation :=
6 Y$ D, x2 ^7 W3 h* N% s' N; A                                        @.Destination.NumReservation + 1;
7 d; B) o1 a& g, R# R                                end;
5 T' w$ G4 }8 k1 q                                @.CurrIcon := "drivingHome";$ e1 C6 O( b5 m( w
                                @.DrivingHome := true;8 \7 e2 {) J4 V% [
                        end;; H% I7 d( E6 Z1 Y9 m: D) I
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) f/ N. V& r: G                        part := @.transpOrder;+ V3 I3 N% P  o" C& i
                        part.move(@);-- load part, }: l/ X8 L! f5 z' ?6 ^
                        @.CurrIcon := "load";; J, i$ M4 Y; X( p
                        GlobalDistObj := part.globDestination;8 t, Z7 s2 A7 z1 `1 Q# r  f
                        assignLObj := rgmanager.rgAssignL;# t8 b4 T9 B' T
                        row := assignLObj.getRowNo(GlobalDistObj);: u" Z" t4 x& b  x( v# Z4 j
                        if Row = -1 then -- since 70# |/ w- S$ O$ \  h
                                if lan=1 then
8 ~; @8 `+ ^, M, x8 U0 F( i                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, m4 c% T& L5 c. `* Q! N: E3 ^5 r/ J* j
                                                to_str("in der Andockstation: \"",?.~.name,"\""));* ?2 j* Z2 }6 l  Q0 g% G* K
                                else
' G" I- ^2 @; J0 c7 Z) L                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* w# C( \% J1 @. S) x8 p                                                to_str("in docking station: \"",?.~.name,"\""));                               
. Y3 ~( Z4 k! T" i- N; O                                end;
: o! w4 p& j& ]' F. t7 ]                        else
6 }1 F% R* C) o$ y4 W/ d+ C) V" f                                @.Destination := assignLObj[1,row];5 v9 {( W) Y3 U2 j
                        end;                        + y" l$ p1 C- w3 @" f: B
                        newDirection(@);
& j) }! u6 G2 N& s' F' Z0 Z                        @.HasOrder := true;
5 \. Y' ~0 [+ k' \0 {& ~& J( h                end;
" r" j; P) s9 [. A8 b3 a: G) }        end;/ V0 W  h) U& F, d2 S$ B' e
end;        -- of the method0 Q5 B; T, p% K
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
5 t0 g5 ^1 Z' Z3 o! x
/ K, E: _- V5 x0 d. p这是AGV_putin中arrive的method。- `6 J" S/ q% m+ K% N
8 e* v3 {3 ]" n3 B
当到达物料速度越高时,这个报警更多,
; w+ A# {; y4 H) {3 ^. n7 o& B可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
; \# I5 @  b; K6 |" N程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?6 N7 C% c3 j; ?

8 C2 K- z! u$ P. p$ k; w3 v另外一个小建议,就是move,所有的move都可以这样
1 h, I) u5 v- vif not move() then debug end) ]$ s9 d7 Y2 S4 s4 d8 f+ j
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。. n: e) P$ x# s! G8 k
plant simulation中的free libraries有AGV模板,
# `/ p, d4 f0 `. M0 ~里面也有案例。; w4 |$ \0 c6 ]3 f# Q
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。9 c5 k5 i- s* g6 P6 J; s! B
. N$ v: h, G* }$ P* P
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ! |- j( e0 i) Y0 @% T- b
0 `8 q* `/ x8 [1 l; W( C  o0 D
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 * G7 `" r7 g1 ?3 [! y9 ^
这是AGV_putin中arrive的method。+ q, p/ H# j5 m+ _

8 Y/ C3 {3 b. {当到达物料速度越高时,这个报警更多,
+ q9 D2 e9 a4 t# K
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-16 21:04 , Processed in 0.016430 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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