设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7624|回复: 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'
2 Z4 O- N1 l$ q" A. G9 _*/
; h2 Q) h9 |; p" e. Q$ T* Bis8 P3 H/ ^5 b/ ~2 Z5 Y. m
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;- K; C- H. Q  t3 s# I2 K
do
/ t# L, K# _( X- i        Lan := rootfolder.Internal.Tools.AOLlanguage;
& ]% [8 |. N3 w0 ~8 T) A" ^        if current = @.Destination -- else return. C$ B5 O. Z0 M5 \2 \! o: m
        then% W2 C9 Y4 d: |6 ?' {
                @.Destination := void;
1 x( o+ x% d: B& |1 F- k                if @.occupied then
5 [  K" r" ]! \" s6 h                        part := @.cont;2 n3 m* V2 [# i1 s" g/ L8 |7 r
                        @.transpOrder := void;
/ L; V) D3 ~6 d# P) C* }! ~6 i                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# U# @$ E& e4 v1 Y. a$ I6 n8 F
                                @,root.eventcontroller.simTime);3 ^* a. F# o" b5 D- G
                        @.HasOrder := false;
' D$ W2 P% ~4 {                        @.DrivingHome := true;
$ g1 D8 v6 |+ z. X8 F5 @' f                        rgManager.tryToStartTransOrder;0 \' `# p$ O+ m8 E/ k
                        if @.Destination = void6 j3 x8 M8 d  ^
                        then -- no transport order for vehicle @. c- N% D1 y9 R
                                @.Destination :=" G+ j9 i9 R8 e' Q' E
                                rgManager.nearestFreeStation(@,track.~);
) e- ~+ `" A4 |' {3 p4 E1 n" a                                newDirection(@);   6 {& G) f8 Z, c" |
                                if @.Destination /= void then
* A; o! l1 h5 o' k) o8 l. G) o* |7 C. n                                        @.Destination.NumReservation :=
( M9 i  \& r3 j  }" `) l; B* w5 Y4 ^$ P                                        @.Destination.NumReservation + 1;
; G- X6 q* H7 C1 g& J$ s; s, [# y                                end;
% C; u, F# q: J' J0 E0 ?7 `                                @.CurrIcon := "drivingHome";
+ B' Q2 N3 l1 l) D. C+ ^                                @.DrivingHome := true;' X) `7 j& i, z3 \- f- r. z5 Z
                        end;
6 g" v1 F& o1 ~. G: |$ u6 H, _                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. p1 T3 g; M; @                        part := @.transpOrder;
  h5 V- b" K$ y4 N# u: d7 F8 B                        part.move(@);-- load part
+ b8 y7 G1 `) ]4 E                        @.CurrIcon := "load";# |' ]) l) X' l6 t1 C7 i7 M( u
                        GlobalDistObj := part.globDestination;' V7 d3 a0 k; ~# Z% Y* X( J
                        assignLObj := rgmanager.rgAssignL;
; P7 c) \. _) P: m' @                        row := assignLObj.getRowNo(GlobalDistObj);
5 C# }* J" u0 |  ?7 R                        if Row = -1 then -- since 70, O1 Z8 q# n: u  T) `7 V* d& r
                                if lan=1 then8 V* [; h" _' a* _& i% Y
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. j; N' F! q5 a3 }5 u7 Q8 {
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
  |5 o4 d$ b( }                                else
% S  w7 K5 J% J, \% V- \  O                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 B9 a/ ^. x, M                                                to_str("in docking station: \"",?.~.name,"\""));                                8 E2 P/ s$ n6 ^; W' D7 t
                                end;. D2 `- w  P+ c  Q3 S: m9 J
                        else
: Z) h" ~! }$ S                                @.Destination := assignLObj[1,row];0 q0 f! S# G- I' h; D( |- y. l, J
                        end;                       
* F7 R4 O6 @8 @$ c; D                        newDirection(@);
, |( Y  p! ?" X9 U! o( U; ?                        @.HasOrder := true;8 K- `' @& Z& x9 U3 ], Z- A9 ?% v9 @
                end;7 o3 S; O+ s* K2 u
        end;
) @) D2 `3 ^5 B6 h3 q: J; X% b% @end;        -- of the method
6 g$ m7 A7 \1 N0 e  Z7 P5 w- ~
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ! ?) ?0 u/ c- y$ Q* ^) [. w  ]
* K9 b: G# H- ]4 z& [
这是AGV_putin中arrive的method。6 K) p! e1 ?1 H: R+ X6 \9 N

- k' ^* L/ z. S! {7 ?当到达物料速度越高时,这个报警更多,
& t7 y1 M5 m( C/ e可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。; v* H# _; ?, z5 f+ T. d. |! u
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
$ l" r3 ], A; f$ q5 b
# |4 g/ i, m+ i" J' {; s另外一个小建议,就是move,所有的move都可以这样
0 Y3 P& H4 [/ C; Q  ^" l( X) U; Yif not move() then debug end
1 v1 Y+ R7 c; ]1 U/ R4 g& g这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。2 ~. {4 e, J1 w3 [, ^
plant simulation中的free libraries有AGV模板,. O0 d6 H% d- F1 t5 k( Q
里面也有案例。' d1 V7 H; l" a" \7 b. _  d
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
# D5 I$ {/ Z4 E1 ~0 Y& _3 v5 i
7 H+ T& s& d# a& B1 s6 F9 g我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
2 E, t1 G; Q1 I  o5 d) I
* M- [( ~0 v* T% Y+ n, f6 O那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ! }/ u, d; d: J: \
这是AGV_putin中arrive的method。9 \7 ?4 `; E, c' J

' {5 G3 x/ ^5 Z0 w当到达物料速度越高时,这个报警更多,
4 H, {; T) r* n8 B7 I6 o+ W* `
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-20 21:20 , Processed in 0.018767 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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