设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9158|回复: 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'
) F& E% \9 z% ?+ d*/
- W3 e) U, ^8 \+ m; V4 qis
: m8 Z4 I/ p6 O3 e: p+ L        part, GlobalDistObj, assignLObj:object;row,Lan:integer;( q4 n) ~4 [- Q* l: c
do
; D$ \' ~% Y4 w+ @! R" J        Lan := rootfolder.Internal.Tools.AOLlanguage;
: c. N* y0 M6 p& W. _! s+ }7 k        if current = @.Destination -- else return
" M9 y9 d* o' ?! {        then( l2 Y. c1 J: P# R( E+ {/ h
                @.Destination := void;$ L4 Y1 G) D$ f) P. K6 y. ]3 j
                if @.occupied then9 l/ ~' A. r* j" ~1 f- s
                        part := @.cont;9 h/ J' m1 |9 s% W! N4 h/ `* Y
                        @.transpOrder := void;
1 Q4 s& c. p& q" y                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 i2 x/ M2 K1 ?) L9 z) K                                @,root.eventcontroller.simTime);
- [* |# e# n, e$ @                        @.HasOrder := false;
$ ~2 _2 c$ |/ |- u3 u% ]3 b                        @.DrivingHome := true;
% n3 c' f- S2 x: W8 c                        rgManager.tryToStartTransOrder;
( S9 c/ I# o9 `+ @4 y) ?                        if @.Destination = void. Z; x2 C: \4 I$ J& ^2 z
                        then -- no transport order for vehicle @
* J2 y8 e/ H& k                                @.Destination :=
% _6 j$ \; E0 q5 h, p6 r( N& j! D                                rgManager.nearestFreeStation(@,track.~);' h" V  D) M* q0 Y4 c
                                newDirection(@);   % I; ~" a( R) y2 r# u2 h7 |
                                if @.Destination /= void then5 Z& O1 |+ A# q) A+ D/ s$ \# V7 \
                                        @.Destination.NumReservation :=- [. T& _1 E# a+ n) r
                                        @.Destination.NumReservation + 1;, G2 o2 K) e9 G  ~( a1 i- [
                                end;
$ N1 Y1 w+ H8 a- n/ D/ W& q5 V                                @.CurrIcon := "drivingHome";" ~/ q9 ^0 Q9 w! S
                                @.DrivingHome := true;
: r) H$ [$ H0 U+ s5 ?* ?                        end;) g; {7 z1 ]- J, c' ?$ X  R7 x
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- ~7 G/ p. u8 G: X                        part := @.transpOrder;  |) h+ K  v/ O1 s; T
                        part.move(@);-- load part9 \! f6 [: x* [2 G% f
                        @.CurrIcon := "load";
5 M5 S% |' {. V# s; M                        GlobalDistObj := part.globDestination;. N: A- L# @% \: _4 e
                        assignLObj := rgmanager.rgAssignL;: |" m# U4 j/ C: N% Z" @+ V( I- E1 z( G
                        row := assignLObj.getRowNo(GlobalDistObj);
9 z  z& |4 W& \6 l$ @                        if Row = -1 then -- since 705 e% P4 Q! p- o9 j9 h
                                if lan=1 then
" n, ?" q: q5 t8 H( ?- x                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 h1 B( l4 K8 \
                                                to_str("in der Andockstation: \"",?.~.name,"\""));/ x: [6 m/ M+ z  g, [/ C
                                else
: f9 ^0 o# @; d! w                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 F! q8 J9 v' g4 |
                                                to_str("in docking station: \"",?.~.name,"\""));                               
- M# D3 Z9 g/ b4 W                                end;6 t- N6 l' {2 {6 _* V
                        else9 t" W4 v: M# E4 L
                                @.Destination := assignLObj[1,row];
. W. F! Q) ]) j9 `                        end;                       
- J5 c2 s' ^5 `% G" d. `7 {/ D2 F                        newDirection(@);/ i9 T3 X# @+ X. G: i9 A: D
                        @.HasOrder := true;
: H; q# ~5 q8 w+ K3 b8 X2 @6 x                end;0 j' q4 O) K0 r# a
        end;! F: x& e  k$ S/ b% i3 K5 B$ L9 C
end;        -- of the method; u9 U8 y5 y" n5 r. O2 }
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ' n. D* L* K* N, r- T5 ?

( ~* R6 g7 ^) L1 M这是AGV_putin中arrive的method。+ C- w: Y5 D4 a% C/ g

, ~: X% E+ S0 j" @9 t* u  r$ J当到达物料速度越高时,这个报警更多,$ X7 [) L+ u5 U; `2 v) f; A% b/ D2 `2 J
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。- Y4 B, ]) ?( _* ?
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
* `4 s+ C: I% |% h
7 ?; M4 z4 [& k% N$ D. t另外一个小建议,就是move,所有的move都可以这样8 ]9 ~, h# U: E
if not move() then debug end  D9 U5 ?5 ]6 G# X* I
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
) c: l& t& s7 `plant simulation中的free libraries有AGV模板,9 J1 F3 u' q/ q2 [5 j
里面也有案例。
: d' j% P& ?' e+ K我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
$ {, v! [8 s/ h! p/ ]' H/ @4 e% y: n6 g7 ^9 @
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 5 e* m/ o( B/ f) q7 n# }  H

& E5 _, U! M6 g% n9 {: L6 Z那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 0 c( m5 r4 G- z! U0 ~6 f) I  ^, |
这是AGV_putin中arrive的method。
7 D5 g) s4 C$ P: K5 E0 }( c, D2 f6 \: u
当到达物料速度越高时,这个报警更多,
+ j+ r! P2 ^- c3 N: i- g3 J
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-17 04:33 , Processed in 0.016067 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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