设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6397|回复: 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'
" e+ H6 d2 y7 `4 e( }* ]*/9 e+ Y% P6 g& J- Q/ W: E
is( r& r. P/ P, `. H4 P+ s
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;  U+ W/ [8 A8 Q3 h! S  w" B' z3 `* P
do9 Y. r- }2 e" B' W9 x( B2 F
        Lan := rootfolder.Internal.Tools.AOLlanguage;
2 [6 A& y- {  B/ [) g- _3 v; l        if current = @.Destination -- else return* h0 q0 ]9 b! b# B5 s! y; z; l' ]
        then
( @9 j# V' }. r5 ?1 b                @.Destination := void;
, j1 U* u- R/ P7 Z4 A$ Z& e                if @.occupied then' a7 R* C" s7 `
                        part := @.cont;
$ }5 g7 a. P% D% v7 l! R" Q                        @.transpOrder := void;/ ]: d3 X# g+ _- B" f4 s; C" V
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! z5 V2 ]. _8 O; h8 Z                                @,root.eventcontroller.simTime);" ]3 {1 ~% h, x: G3 c1 |
                        @.HasOrder := false;4 Q( W4 i9 G* j: g6 `: a
                        @.DrivingHome := true;
4 v- T3 l* z. H$ w& \                        rgManager.tryToStartTransOrder;1 T; B1 c2 s- Q. V5 B# K* _* [: S
                        if @.Destination = void
  F+ n7 Q' O+ K; h9 V2 ^' a: \                        then -- no transport order for vehicle @
5 K( [- b+ W/ Y+ r! }                                @.Destination :=
1 e8 _/ E( F6 N/ B# h% z3 u                                rgManager.nearestFreeStation(@,track.~);+ A! k1 i* b1 _3 ?
                                newDirection(@);   , ~" s3 \9 P% N( P: |8 e
                                if @.Destination /= void then- x5 _3 U5 U4 C' \8 U  w
                                        @.Destination.NumReservation :=
0 u$ N2 X0 m9 E5 m% M% ?                                        @.Destination.NumReservation + 1;' s1 G- i: e8 s
                                end;2 F( F/ Y- b3 u8 Y: m
                                @.CurrIcon := "drivingHome";
6 l* _; U' o" y* g; |) ~+ @                                @.DrivingHome := true;
. x6 f( m  a$ j+ e1 ~                        end;+ T, ^2 J& c- Q9 ]. n
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station" p- q8 j7 R! e+ d! Y
                        part := @.transpOrder;! `# r3 {( T/ Q4 y
                        part.move(@);-- load part+ ^$ `1 O7 G0 z7 ^8 ?
                        @.CurrIcon := "load";
: ?6 f1 k, K& N% M, |4 H                        GlobalDistObj := part.globDestination;/ ?' o4 d7 m% k8 r0 I- B# [" H0 P
                        assignLObj := rgmanager.rgAssignL;
6 B  N! l+ h7 ?- g, X% L                        row := assignLObj.getRowNo(GlobalDistObj);; f  n3 a1 ~) Q2 u* [2 Y* i9 F
                        if Row = -1 then -- since 70
' Z6 R! d6 w( o+ `                                if lan=1 then
: E  x8 p- C5 G                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: p) t" o8 B. J9 a* a5 \- e                                                to_str("in der Andockstation: \"",?.~.name,"\""));! a, c' u: f1 a+ p$ q: @2 z4 S. W. k
                                else6 U6 A9 r5 I. X
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 e( z% k* y  d
                                                to_str("in docking station: \"",?.~.name,"\""));                                / F% A0 w+ U" W) R
                                end;' B+ ^" @' M9 K
                        else
( j& g& U+ z: b! H/ A9 e' X                                @.Destination := assignLObj[1,row];
/ F: q3 p5 \6 k1 _6 f/ P2 o                        end;                       
* Z& U, K3 g9 w4 B8 F1 R6 {                        newDirection(@);$ {" U. X+ V2 s/ {/ K. G
                        @.HasOrder := true;
& o$ d! o; M$ O  K                end;
  [1 u, {# t  b8 X7 \# O        end;- E) k6 s9 i0 f  b5 r
end;        -- of the method2 P# S7 \; K$ ~2 q. D8 A
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
; v, w; g( K, [! H
. e( s: \# g% Z) [6 E7 e5 X0 S) u6 o这是AGV_putin中arrive的method。+ l4 l/ @( \4 C# }: z1 T

8 _( U8 `9 k$ f# U# Z当到达物料速度越高时,这个报警更多,7 `4 c4 C% Y, k& a  u/ M5 X( u
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。, F! f: \& g3 A2 a4 D) i) s' j
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?& M$ E& C( x; C% ?* ?
) i- R% j. p; f6 X5 X
另外一个小建议,就是move,所有的move都可以这样
1 [: J1 ~' M) m  ^if not move() then debug end: V  g' W# O6 g. g
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
6 O4 s! N4 F- ?; u: i, @plant simulation中的free libraries有AGV模板,2 B4 @/ G9 j  b" N, \/ Z3 p
里面也有案例。  H7 ?% |. T. S/ Z! J( C3 h% f
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。; k7 {9 l& e* T( p

; g0 J6 O3 k) ?" j我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
) k2 h: J! F- g% a' t4 K* v( w1 p/ f" S0 e- X/ u. e2 ^
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 5 V8 e* q# \+ }/ Y
这是AGV_putin中arrive的method。
; s4 x2 e" g7 |5 @, r9 t2 b3 g+ Q& B& b, `9 d! M3 q9 s
当到达物料速度越高时,这个报警更多,
# W2 f9 l" u8 ?
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-4 10:18 , Processed in 0.016280 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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