设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8579|回复: 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 }# B8 j0 z0 x% m& e* ^8 O
*/
3 J. Y# v5 ?% R4 c& his) K4 L" P8 K; S/ {
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ ]  D7 N2 _( ]# u- W/ c1 j
do0 }& X; y- ^) y, ^1 [3 V. I( V
        Lan := rootfolder.Internal.Tools.AOLlanguage;/ U5 `' K1 l* M5 c8 _
        if current = @.Destination -- else return
. E8 U, |* @$ p4 ]2 G        then. e2 m/ E; Q3 N4 [* @
                @.Destination := void;
% A6 t. G, M: {% L, @  S9 e. e                if @.occupied then
6 P$ k" E: f. J4 k) o: y                        part := @.cont;
3 E$ ?4 w) N% ~, ~1 t) [. ]                        @.transpOrder := void;/ q* ~" `5 f/ v' }
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( G1 U1 I0 M6 U/ w+ P' P3 X4 N
                                @,root.eventcontroller.simTime);! ]8 [9 ?* ?9 O7 {/ i2 G* P% e
                        @.HasOrder := false;0 Q9 K7 n2 D, F) t: n, @. v
                        @.DrivingHome := true;& M0 h  \0 I3 D% V# K
                        rgManager.tryToStartTransOrder;7 d9 n8 i8 }0 C) O! L
                        if @.Destination = void" W% {4 k, _! h8 q7 ?6 U: P: a( Y/ k. |
                        then -- no transport order for vehicle @5 s; |! R5 r, O6 ^: _& ?3 M& x, [
                                @.Destination :=% [* M% M  x: G- Y+ q, Y
                                rgManager.nearestFreeStation(@,track.~);
0 R7 l' W! |5 c7 d. D5 N: d                                newDirection(@);   + @4 O2 i$ E. S$ F+ u
                                if @.Destination /= void then
5 g9 z* O7 B0 g3 C                                        @.Destination.NumReservation :=
. ~. m- Q& O% x, z9 b( U                                        @.Destination.NumReservation + 1;, h1 e8 U) C) Y
                                end;
: C, a  l6 W5 p" L/ [                                @.CurrIcon := "drivingHome";
3 }0 W* d+ r2 f' ~  n                                @.DrivingHome := true;
% b: |4 G) t+ I                        end;
4 i+ s$ v/ B2 \: c                else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 ?, m5 K5 @& }7 \7 x& }
                        part := @.transpOrder;# _3 F7 a. u* T5 e; l
                        part.move(@);-- load part$ A0 ~6 Z" Y. P  |6 ^- N4 q6 L
                        @.CurrIcon := "load";' v2 e' v1 Z/ @4 V7 I# }2 C
                        GlobalDistObj := part.globDestination;, ^% e* k. q- D! u1 \6 V4 m
                        assignLObj := rgmanager.rgAssignL;
7 U7 c0 a7 f6 f- F5 K" e5 j                        row := assignLObj.getRowNo(GlobalDistObj);! p7 _, d- g5 r2 }& N: F
                        if Row = -1 then -- since 703 W( G/ ^$ L  b; l, e6 T
                                if lan=1 then  A$ f& L7 `( f5 A; @
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 w, Z) c; B3 a$ F: D$ D/ R                                                to_str("in der Andockstation: \"",?.~.name,"\""));- [4 C% D3 _, S4 b5 i# q6 _
                                else. u2 U# r: t% V" Y
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 F& C2 F" x* F# W" ]
                                                to_str("in docking station: \"",?.~.name,"\""));                                3 J( P8 K$ Z( b& V/ y& l5 `
                                end;' ]. V, ?$ u( c, |4 B, D
                        else
  \/ b& S: u% L5 ~6 |- `+ t5 s                                @.Destination := assignLObj[1,row];# O# ~7 X7 Q# B3 m  C4 |
                        end;                        , I. ?# k9 o0 ]' a, [
                        newDirection(@);
8 {  [; A. |# h: a1 h                        @.HasOrder := true;- K+ `! i% N& e1 X
                end;+ `9 R0 ~" T$ a6 b% b% O
        end;1 k% X' U( N) q2 C1 {7 {) _
end;        -- of the method. t7 N  R) `$ x$ }  \* \
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
5 M, |) K! e4 X; q2 W( o* w8 }# v3 w' V/ Y. P0 k9 {- v4 i) W5 h
这是AGV_putin中arrive的method。
( C6 d& D0 t  z' N: o
* O" Z5 H' p$ l, Y0 e  [当到达物料速度越高时,这个报警更多,
* ]! k' C1 W  d) q6 L2 W可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。8 C; T# l( L& ^
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
% L) r0 I. s( `" @- c% @+ ?* g3 q+ I8 E. T2 W! m2 K$ R
另外一个小建议,就是move,所有的move都可以这样
6 M# H2 y& i  r/ T9 M" Aif not move() then debug end
' w3 j& W9 {; r: ~, u1 m这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
! `' K) o' G% a  m- y# A$ Aplant simulation中的free libraries有AGV模板,# Z2 s% b( t2 b5 J" V9 h$ m! t
里面也有案例。' e( n4 U' C+ c5 k( M' g: e- Q1 B. O
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。0 q+ @0 j, M$ {, A) Q
% y. ~* S6 i/ u. Y) _, D; G
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 / K# A1 K2 _" t

/ S2 B) m2 O: W. i& o那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 / @7 O2 G# m8 }; }
这是AGV_putin中arrive的method。
2 X6 k) ~* U* }2 z0 _
# s- O7 f( `. `! j: b1 B" f当到达物料速度越高时,这个报警更多,
0 v- B9 d+ \4 s7 V; F. t) {
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-13 09:27 , Processed in 0.014432 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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