设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10226|回复: 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') H( O# k3 ]/ L2 J
*/
9 V' h; Y$ \5 B7 @is
( B1 B9 o. Q; J9 I! c  r        part, GlobalDistObj, assignLObj:object;row,Lan:integer;  N% J4 h0 i2 B  L6 k: s6 |  p
do! \/ L- B1 H6 a8 v: z
        Lan := rootfolder.Internal.Tools.AOLlanguage;
+ A$ R: _* s& R6 g. L5 }" F9 g        if current = @.Destination -- else return
# r* p- O, [4 m  D' D        then
. J4 a7 W# h6 ]( D- e) ~                @.Destination := void;- D7 y$ W$ B. }, Q# w1 l4 c6 }! O2 j$ r
                if @.occupied then6 A# W, u! Q5 P7 Q( e
                        part := @.cont;: ?' F0 t( Z8 }3 h$ A" `1 q
                        @.transpOrder := void;
+ y) P! m2 _; Y) `3 {1 ?0 E                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! i( L" b+ z) ]2 s/ f- F
                                @,root.eventcontroller.simTime);
1 _$ k; `1 I, V: v. n  b6 Q, d                        @.HasOrder := false;
4 F" i! F# V+ u) l* _" A                        @.DrivingHome := true;
8 q$ r- R4 s8 u, q3 W* R8 ?5 L* P                        rgManager.tryToStartTransOrder;
. h/ y, S3 P9 D                        if @.Destination = void
* B9 W) F+ \; W                        then -- no transport order for vehicle @
4 Z0 S$ d% w( U6 H8 [                                @.Destination :=
  F" x: o" X9 K2 g* D3 y( ~9 ~: O  R                                rgManager.nearestFreeStation(@,track.~);/ a$ u, P8 S. i* p; p
                                newDirection(@);   
; r' A, `% F! L                                if @.Destination /= void then
4 P$ C8 ~% m8 Q$ M                                        @.Destination.NumReservation :=
& V8 s. T# \# l% A5 @! d" L                                        @.Destination.NumReservation + 1;
2 T  _# Q* a+ v% }                                end;+ F: A" j( O; f
                                @.CurrIcon := "drivingHome";
: `/ I: P; e9 p% s" g6 Z; l                                @.DrivingHome := true;
0 A3 d7 y" d4 w4 K7 ]" H' H7 s; g                        end;
# K, g8 j1 w7 X9 W* H                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ @* p$ x1 G: y9 W# j+ ]/ F* \                        part := @.transpOrder;9 F9 Y0 H) N! _& U2 {& ?2 A
                        part.move(@);-- load part# y9 @  a# q! w. F) w
                        @.CurrIcon := "load";
( S5 U# F  K1 u/ E. Z# k                        GlobalDistObj := part.globDestination;2 i0 k3 D& e! p4 D, i7 I8 ]& [9 H
                        assignLObj := rgmanager.rgAssignL;* {* R% e9 J, V% ~. r: o% K
                        row := assignLObj.getRowNo(GlobalDistObj);
: C8 {) q% ]+ @8 A3 t' ]5 g                        if Row = -1 then -- since 70
. x9 B* A& b; ]; e2 |                                if lan=1 then
. x4 y% x+ B- w8 M* G$ F3 [                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
  z6 K' e: W2 x- ], n- a                                                to_str("in der Andockstation: \"",?.~.name,"\""));
5 B. x( t/ T2 T& ^" R. Q                                else
5 y0 y" ]  z: m- G. X$ n                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# l, V( ?) N# _
                                                to_str("in docking station: \"",?.~.name,"\""));                                0 p4 {0 ?) h1 I# p! J
                                end;
6 ?  L. Y0 j+ y; }                        else4 g& f) d& ^! ?- l7 u3 n. H
                                @.Destination := assignLObj[1,row];& F8 J5 C! g; O) f
                        end;                       
/ F. s; C( Z) W9 u                        newDirection(@);0 {0 ]0 M! r, N2 `
                        @.HasOrder := true;) U* F& d  d  ~! l- ^
                end;
3 G+ R' ~# m7 Y1 {4 F6 l        end;2 n- z6 Z4 m* c! _9 a9 ^
end;        -- of the method
( r0 u% o# [9 [! _( Z" U7 O
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
: n4 p4 r( Y* y/ I/ L7 L9 D3 s
2 u2 L, a. u& j% ~* ~' j这是AGV_putin中arrive的method。; a/ P3 `" w( H4 e8 ?2 T

' E  N3 h% T1 T4 u当到达物料速度越高时,这个报警更多,; V3 @8 ^+ Y/ c6 S/ u- d
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
& R: W/ o1 v% Z程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?$ P, _; A; u2 m3 V5 O

/ z7 J" z5 U2 {- q( H% ]1 M另外一个小建议,就是move,所有的move都可以这样
$ {: P+ h8 `  X' jif not move() then debug end
: u- x! J3 D  ]1 C" y4 P这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。: X+ {) Y9 [# h7 q
plant simulation中的free libraries有AGV模板,, F7 I  G6 c; D; U
里面也有案例。* n- c$ t1 {3 e8 S
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
6 }5 {6 w1 r1 B/ f/ f. y$ f! Q6 s/ e  I$ {/ ?2 Z2 o
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 1 ^4 ^! W: P2 {, y/ l, c* U: P
& i+ b2 t$ L/ H0 b: @3 b7 f
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 6 O4 Q9 Y7 L2 L; z  c
这是AGV_putin中arrive的method。0 w. {: [& O, G' J) b/ F
% k3 n$ g, e; J$ w8 O, D  u
当到达物料速度越高时,这个报警更多,

% F1 C( I; b1 Q* f$ N4 b+ Y另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-21 05:38 , Processed in 0.020828 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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