设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6691|回复: 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', E4 J" ?8 a3 P0 F- a
*/
. C3 }( e6 z& O, p1 t3 n  Eis! }( A0 z0 ^# }
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 F6 C$ S7 Y- I5 \9 F! R7 c" @
do
+ |. t) A5 t$ b& {9 Q- E9 m# a; g        Lan := rootfolder.Internal.Tools.AOLlanguage;5 m$ ]8 v: w1 a$ G1 W" O+ F
        if current = @.Destination -- else return
: D* G* _8 o7 Y$ f7 {+ W) r        then
3 E& D5 n& S7 _+ a. }! G                @.Destination := void;
( v% q% p1 h/ f8 f: ~: [6 a  o" u                if @.occupied then6 B3 f1 F# ^6 x! b+ X, D* j
                        part := @.cont;2 W/ C& c8 ]3 K! k  o
                        @.transpOrder := void;2 d$ p& s- q2 l! E% ]- e
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; W" h' ?0 D- z
                                @,root.eventcontroller.simTime);
5 f1 C( w# a0 \1 G: H( k2 m                        @.HasOrder := false;
, l9 R" r6 y, R5 D/ C! T# I                        @.DrivingHome := true;
! E$ t/ J! ^, F/ A1 Z                        rgManager.tryToStartTransOrder;# B- Q8 b) t8 D+ K
                        if @.Destination = void- H$ Y9 N3 y/ P5 ?
                        then -- no transport order for vehicle @' e( S8 i3 A2 t& [- i) g, l6 i
                                @.Destination :=
/ ]# y! Y4 B1 ?2 _) }. l2 N. [                                rgManager.nearestFreeStation(@,track.~);
9 l; W# [0 p3 P+ q  m- R& E) Q* U  Q7 M                                newDirection(@);   
( h' _) B, c! x# Z' d2 `5 S$ B7 g: Y                                if @.Destination /= void then
6 l7 ?" ]- ?7 _5 j) W1 R                                        @.Destination.NumReservation :=3 j6 c( N1 I0 P, P
                                        @.Destination.NumReservation + 1;
/ V3 ?3 I0 g! W- P2 k  f3 a                                end;
1 P( V  |; w8 p) y4 F* H  r                                @.CurrIcon := "drivingHome";
3 E& y( U: p% {. f3 j( ^; P+ F                                @.DrivingHome := true;) l( Y  D. {' h5 C! U9 E$ P" z7 ~
                        end;/ b4 w" t# r" B! L* t6 C1 G
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 V9 @# A2 f0 q                        part := @.transpOrder;
1 R- H* K& n) x$ o( J6 r0 |1 I5 a                        part.move(@);-- load part
5 J9 H/ g$ w7 D/ A; f* }6 t4 H                        @.CurrIcon := "load";
+ Y9 P9 z5 Z) o7 [0 {* J; I                        GlobalDistObj := part.globDestination;
. R( X. r" K8 [  w                        assignLObj := rgmanager.rgAssignL;, v6 S- h1 g0 E2 |& o$ [
                        row := assignLObj.getRowNo(GlobalDistObj);1 O* b# h+ a  `$ ?( \. A
                        if Row = -1 then -- since 70  L5 |( N0 ~# r" y) S/ P* ?* u! j: K& `/ Q
                                if lan=1 then, J+ W$ Q9 @, z! c2 C9 g
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 F! p, A) e& @
                                                to_str("in der Andockstation: \"",?.~.name,"\""));- N: k" k2 p& d6 ?8 }9 m
                                else& I, {" R7 o" ~' u
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 C, s4 T# l/ {
                                                to_str("in docking station: \"",?.~.name,"\""));                               
/ S& I/ F+ E" ?& \) f& _                                end;1 Q& J" |7 @4 I$ {2 r, J' T
                        else- u, ^0 L2 P) U
                                @.Destination := assignLObj[1,row];
& A' [$ }# w& `- Z$ t, X4 @                        end;                       
& r# {$ D  B6 N7 m) U' R& [/ x8 t  ]                        newDirection(@);
" D9 Y* b% e9 e3 Y2 Y$ R9 C6 B                        @.HasOrder := true;
; h5 p5 [' y" s) L3 K. \/ r8 Y" X                end;
- w5 R0 J! W% V# h! T8 @, {1 r9 o        end;
; {! L- k! S4 e! ]! [8 \; Hend;        -- of the method
+ K9 l# [% J* c. S: o# |, Y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 # Y  q- v7 C; ?

; t! I- J5 U' q, J! L这是AGV_putin中arrive的method。( n% `" {- t  f/ J% ^
& I, h- e# h* U& i
当到达物料速度越高时,这个报警更多,# J& x! C3 A  c. [) m$ o5 \
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。4 l9 A: E7 H2 P, F+ [8 [$ `* }( a
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
6 B6 a# t" B! h4 j: l" d; ]  I# X% S' j( u
另外一个小建议,就是move,所有的move都可以这样) R! N, v8 {0 ^5 ~3 s& F
if not move() then debug end. Q( F) v6 a- m# E5 t( |) h
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。' b1 P& p# Y3 }+ j# `9 W
plant simulation中的free libraries有AGV模板,9 W' I' l/ J; y  Q: K0 _! |
里面也有案例。
3 J$ j+ \7 Q  H我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
5 E! _! a. m% i
3 ?  o2 f, G7 Q) J! i" `我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 + c! G- U9 H2 i
0 }; N* L; H; }" X3 \
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
4 q- R6 U! g$ Z% L) k- E& S这是AGV_putin中arrive的method。+ M# M9 K9 l$ Q9 ?$ J

2 e2 R/ ]1 i; i4 A当到达物料速度越高时,这个报警更多,

+ u3 w3 O. V/ x, Z* Q9 e9 s另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-21 07:35 , Processed in 0.026346 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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