设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8552|回复: 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'7 s  i8 |9 H. W  g
*/
) X( O; s! Z- v: F" U6 f8 z( fis
5 I# Z& x, {. _/ B$ Y8 m& x; g        part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 J, a3 U/ O8 ~* n$ z; H
do
, _% I  k# w5 x! n$ l2 r+ E( H        Lan := rootfolder.Internal.Tools.AOLlanguage;
+ q7 \) P" _; K: [: [        if current = @.Destination -- else return2 g1 N0 p4 p( v$ m$ L" n0 U
        then# C' |2 J4 ]: }  `- j$ O  S" B/ {
                @.Destination := void;) n, u7 ~- Y) I* N# ?/ U
                if @.occupied then
  E. c" Q; x2 E* k                        part := @.cont;5 L4 T' h0 o! p# @
                        @.transpOrder := void;  I% O' y, B; \+ F: J. P
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ x1 g+ x! A5 F2 A, \: k' V5 e$ c                                @,root.eventcontroller.simTime);" c* D# L# X9 T# t4 p
                        @.HasOrder := false;
+ j# H. ^7 n/ R; I" l- G+ _5 m                        @.DrivingHome := true;; E% c3 f) Y" o/ z
                        rgManager.tryToStartTransOrder;
/ }( f  d# _  ]) k                        if @.Destination = void9 j4 b3 x9 a9 }5 S
                        then -- no transport order for vehicle @1 B* z& M) |0 n. w1 s; D; f
                                @.Destination :=( ^7 y' D' R' C- M/ f8 ~
                                rgManager.nearestFreeStation(@,track.~);7 w. B' x" x/ V, D2 ~! S3 J9 g7 p: T
                                newDirection(@);   5 L  Q' X$ W( p3 k+ N* R
                                if @.Destination /= void then
/ |% g6 w: p- m: P                                        @.Destination.NumReservation :=
9 @8 |  S8 ~+ F: Z$ G& e                                        @.Destination.NumReservation + 1;
; R! C% T# S0 V9 |( V. G) w                                end;2 C7 Y% c$ r# s9 s' U
                                @.CurrIcon := "drivingHome";" b5 E0 `" q  P# \
                                @.DrivingHome := true;
0 ~) X# _( R9 t! _                        end;/ C  N$ @8 s1 u" |
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 F$ n7 {# B, U2 o0 u, y. s                        part := @.transpOrder;( O/ N2 s( C# h# W
                        part.move(@);-- load part1 m" N9 |2 B+ ~2 M" T$ F
                        @.CurrIcon := "load";& |; k, o; t% N" }* L# l; O
                        GlobalDistObj := part.globDestination;
1 l- x" X. m) U/ o2 I# |$ X+ R- B, M                        assignLObj := rgmanager.rgAssignL;
: B5 C$ O1 z2 C+ Z; `                        row := assignLObj.getRowNo(GlobalDistObj);# H1 \$ s9 u& e7 B, f2 Q/ W# a
                        if Row = -1 then -- since 70# K3 F( ?& t3 K& T3 @+ u. N; d; d
                                if lan=1 then  t5 V% D3 B$ ?  i4 N: _# R% O+ \
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# O; d9 ]6 ?- I' \( T8 ]                                                to_str("in der Andockstation: \"",?.~.name,"\""));
3 u! W2 p$ V2 a  q% V                                else& O8 A: R' U6 `  F4 x" G- Y
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: ]: [8 C/ w( T
                                                to_str("in docking station: \"",?.~.name,"\""));                                ! r8 _; b) }, M; {6 i
                                end;$ Q# b2 E, A/ K
                        else$ d# |2 x4 v5 }3 }% ^; r
                                @.Destination := assignLObj[1,row];2 J6 M2 g) I0 d) a" U
                        end;                        4 M2 M7 u7 X2 @4 Q
                        newDirection(@);
: |) E& g" d% [% V                        @.HasOrder := true;1 T- o3 M7 g2 L" D* j
                end;
2 V. ^- Q6 ]: m        end;" h2 [1 q0 |, p4 |# ?: x
end;        -- of the method
1 D- _1 X. q1 A; e
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 9 {0 ?& B" p, f

8 P9 V; Z( Z5 ]9 d这是AGV_putin中arrive的method。! W: E5 y. Q% A1 Z+ I

+ l: z4 a* ^2 e当到达物料速度越高时,这个报警更多,
; Z+ I' S# `. R, M8 V  }可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
2 v6 m+ k; d& Y# T3 @% P5 H程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?0 a% l1 F: H4 o, d1 e  X
. }. ?/ t4 g/ W% }1 Y+ B7 A
另外一个小建议,就是move,所有的move都可以这样
$ \7 g5 r* n0 Nif not move() then debug end8 V3 Q/ S3 j+ `0 L" }# i2 o; p
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。" @* R& F) E5 v  w6 c
plant simulation中的free libraries有AGV模板,
2 K0 v' b( g. z1 z3 Q! g' f里面也有案例。
2 F" c% t0 n/ b" p4 e4 `' R! d我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
9 q5 A  F/ Z! }& {. @, i4 l
8 g9 H4 t3 D5 [- B$ ^+ D: {我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ( b* n: z; W  `

0 S* M' n* G' F6 e5 b' C那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
; p) ]+ f* e  F& v8 r这是AGV_putin中arrive的method。3 y8 u4 k" R' y3 K" K$ o3 b, u2 i' j

+ P; \! C9 e9 k% x当到达物料速度越高时,这个报警更多,

0 d  P  A5 w0 Y4 ~另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-11 05:04 , Processed in 0.017910 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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