设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6234|回复: 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'
: G+ Q( J; C$ l*/& q4 p; T& L. I$ L4 a: x: p9 f
is
1 u. n3 B  a' X4 \$ l- b        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 p; o# P9 Z7 z5 e+ B5 p3 ydo
! s9 S) ^$ e1 n        Lan := rootfolder.Internal.Tools.AOLlanguage;  }! r% E* P( ?% f1 `
        if current = @.Destination -- else return  K% C6 ^0 R+ q7 i. a$ Z0 u
        then4 @! `. b1 }/ e
                @.Destination := void;
0 O8 F! V+ K5 @& ?4 Q/ ?/ @& d# u                if @.occupied then& [' j8 [; C0 n) o3 a
                        part := @.cont;
$ W+ a' G) o- h+ T' y8 a; o; H; V7 J                        @.transpOrder := void;
9 T3 a$ P) {2 j  [                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) l4 y3 j- ?% y4 M1 h1 G. Y                                @,root.eventcontroller.simTime);
( K: p! k; O5 T7 }3 l                        @.HasOrder := false;
# e( E0 V; z( u2 h4 R& s' U                        @.DrivingHome := true;
! p! F! B3 o% X$ G0 X                        rgManager.tryToStartTransOrder;
4 }% I5 F/ ]3 `  n4 f, F                        if @.Destination = void
$ k  D2 F; W' r+ a" }                        then -- no transport order for vehicle @4 f: I& u7 M- P* f( `. X) f
                                @.Destination :=
% Y( J, O7 t: z, o2 A3 E                                rgManager.nearestFreeStation(@,track.~);8 Y, p# [/ I$ N0 s* ]$ e" T
                                newDirection(@);   % H& P( W/ M9 B- E  \" P& T
                                if @.Destination /= void then; ]3 v4 G/ p4 S
                                        @.Destination.NumReservation :=9 ~8 B) i5 Z3 y& M  f
                                        @.Destination.NumReservation + 1;) J4 y4 h' ?% f$ P* s3 Y' @; y
                                end;4 \$ K% @/ o" i& e5 u
                                @.CurrIcon := "drivingHome";
& y' V6 o( ^' j' M0 h) @8 Y) L                                @.DrivingHome := true;* j7 K, K2 H- X5 V& q
                        end;
3 Y: A$ U. P7 J  u& e% a/ @1 ^                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 j. h) x7 _' [5 X1 v" |' S' M                        part := @.transpOrder;
' |. G8 A8 u" C6 _( c1 e4 o3 B                        part.move(@);-- load part
: o& M/ [/ t  E* a% P                        @.CurrIcon := "load";+ A0 I/ d4 s! i2 O. h( {
                        GlobalDistObj := part.globDestination;
" R9 G' _/ Q$ N/ n( F& X, D. K3 d$ F                        assignLObj := rgmanager.rgAssignL;
' ^3 n0 G$ ~& W6 R0 [                        row := assignLObj.getRowNo(GlobalDistObj);* C1 y! J. v8 ]
                        if Row = -1 then -- since 70
8 @0 Q6 O7 z* e- ~6 R, U1 ^                                if lan=1 then; `4 j6 m  j" ^5 Y$ [
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! l- H$ }3 Y( O1 I4 l* C* s, \# I$ w2 |
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
2 r" x; ]4 Z* L3 F                                else+ p, P: p  J8 w/ O6 n
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& t$ O7 B8 y: W$ u3 j6 T; l                                                to_str("in docking station: \"",?.~.name,"\""));                               
/ v5 U9 X) E9 g6 \: b  U" T                                end;2 [4 a- T1 b0 \# Y
                        else0 e% F) W. w5 n: s, f, T
                                @.Destination := assignLObj[1,row];4 K$ k$ Y; A- i7 V6 s( \5 Z
                        end;                       
. h: K4 S) q( }1 K7 L                        newDirection(@);
2 }  Z* ]2 S1 Z! o3 v* ?3 R. q* F+ x: i                        @.HasOrder := true;
4 n& g8 \2 o  A  f' u0 g% f7 U                end;8 n; f4 `8 O. n9 M1 {; @. \. d* M* x
        end;
, @( N5 S; |! c, L6 K) K5 Uend;        -- of the method
  t) s5 A3 E, E- D
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 1 U) @  v2 G/ z8 e' c5 n: r, B& @! x
! A3 B8 ~. U' I# W3 \% f4 _% K
这是AGV_putin中arrive的method。9 R* V1 ]6 r/ w* V/ u1 V" |
0 b7 t# E( t: I0 R) F- S% Z1 F. P
当到达物料速度越高时,这个报警更多,& \$ b& T7 q- b+ c9 a0 [4 f
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
9 o* b/ o* s( h# y* y程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?& p9 g% {/ n. {5 z( |
9 N1 }. L/ h- d$ c0 d6 Y4 T
另外一个小建议,就是move,所有的move都可以这样
* \8 b/ j, K8 i" q% pif not move() then debug end4 k5 f( R* k, C- q# r0 A1 r
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
$ ^3 ]$ M, ~: T. t$ vplant simulation中的free libraries有AGV模板,
8 q& Q1 c. J  v# N+ \& N; @; Q* N里面也有案例。
  @: V# [  o' d! W- H: {0 `+ \6 Y我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。& @, L7 U9 S& G0 [

! X. J+ _4 ]; ~$ R% ^6 V9 U我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 4 A% T6 z$ e" N( E# G
- Z  |, h. P5 h( ^9 @
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
8 z2 b" M5 Y* g* ^. B& X( F这是AGV_putin中arrive的method。
* Q- _4 u% O1 o) v! F+ \- q6 E8 }4 L7 d1 _/ o! K$ i  R: x! [/ M
当到达物料速度越高时,这个报警更多,

- T$ s% b! X; \+ \( q! _" u: B另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-26 08:06 , Processed in 0.028342 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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