设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8329|回复: 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'/ Q+ Q' _$ k% U  l8 s. V6 f
*/7 l% q: O( B6 a4 `/ T) T
is
* Y) P5 Z# g4 u4 s3 C        part, GlobalDistObj, assignLObj:object;row,Lan:integer;  V* R) n8 i% @- P& b# p
do
; v- }% U" S# e6 J( n1 i: q        Lan := rootfolder.Internal.Tools.AOLlanguage;
* U  c5 k( s- n( n        if current = @.Destination -- else return5 ~! a$ o2 P* |- [9 m
        then3 K; }# x% Q! t$ c6 a4 ?2 i& l
                @.Destination := void;! W$ [; W+ Q. @% ~
                if @.occupied then8 P3 D8 e' y  ^. V8 y, A# R
                        part := @.cont;
; \* z6 V$ n, A7 v0 m/ O5 n) F8 a) E                        @.transpOrder := void;
1 \/ b) H' v5 `4 x  F                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 W) g4 R1 ^6 X$ A3 i4 I
                                @,root.eventcontroller.simTime);2 k% _  e. ?. z2 o( ?  `7 j
                        @.HasOrder := false;
7 V: q# d0 w' d                        @.DrivingHome := true;2 G2 o5 |3 f* q; \7 R
                        rgManager.tryToStartTransOrder;
( i3 O, C' x9 _, I* `0 X                        if @.Destination = void  b2 c3 d* d4 H; `8 o, m  I
                        then -- no transport order for vehicle @
' w) A* w: p( }8 W                                @.Destination :=: ~4 Y6 M7 f- w( w9 ]3 H6 Y1 t6 }" o
                                rgManager.nearestFreeStation(@,track.~);
: ~0 K! t# M" t- U% E1 F                                newDirection(@);   
6 B" b% j8 d) P/ k                                if @.Destination /= void then" f0 ?% C$ D0 G6 v6 @
                                        @.Destination.NumReservation :=
, m" \) `; O' g' V( J                                        @.Destination.NumReservation + 1;- o# r9 g. _' W1 _0 j
                                end;
! q- b! [) y: l. Q, W8 V+ S                                @.CurrIcon := "drivingHome";% O( {7 N# A8 `/ C
                                @.DrivingHome := true;
. I6 \- r4 L; }3 h                        end;2 w8 ?% O! J) y- f7 J2 y
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station. L# t1 ?/ c' [8 v1 E# h6 E
                        part := @.transpOrder;3 u4 L5 {# z. v# u2 D* a
                        part.move(@);-- load part
; L3 Q) M  p, _3 a  g& n                        @.CurrIcon := "load";
3 ?4 u: C7 q* z" B& \                        GlobalDistObj := part.globDestination;9 ~+ u2 m' ]- o5 N- O: A% J
                        assignLObj := rgmanager.rgAssignL;
, D; o$ o! z8 _2 |: n2 i, j                        row := assignLObj.getRowNo(GlobalDistObj);
" g- ]. @% |/ w- Q% ?9 Y                        if Row = -1 then -- since 70
; d* L0 S$ F7 y* ^# ^* E/ N* t                                if lan=1 then
8 ^' N; ^3 a3 U; H/ x0 \                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' x* G9 n+ N& t: L; v                                                to_str("in der Andockstation: \"",?.~.name,"\""));$ d+ v+ `* H5 e( `$ c5 D/ \
                                else
+ \6 c4 j/ K& d. R6 q5 }* g$ c                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! _8 I# i4 q3 j) a" U* G, f2 z, ]: C. A
                                                to_str("in docking station: \"",?.~.name,"\""));                               
2 l: m/ k3 r1 v6 ^& }                                end;
0 }8 i3 K7 {4 E9 @" y: |- e. g% L0 c                        else: ]; I5 |" {; t* L
                                @.Destination := assignLObj[1,row];$ ?1 V/ a0 l: }+ q
                        end;                       
' z% S& L, y- d5 n7 Y1 j                        newDirection(@);; W# v& Y" T: {. N  L. o, z
                        @.HasOrder := true;! i/ @/ q! j! |' Y$ e5 U# B9 ^
                end;3 z" R, u0 r. h8 v; A3 q3 B
        end;2 ^+ P, ?7 f1 w1 _0 s( ]
end;        -- of the method' @1 U6 f# R) ?8 I, f& e# }. w' y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 9 ~8 g6 t) N; Y7 X

" H7 `8 p  t/ w: x  ^1 j: Y这是AGV_putin中arrive的method。/ {+ g2 t; V" l+ B. D7 m

' d- {: M) k3 K5 S当到达物料速度越高时,这个报警更多,6 l4 u4 L) L) C( I3 s- d
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。! s; S6 }) [( I, Y* R
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?8 _' l* ^  E, }5 u# k
& |5 Y$ y7 U: b5 z$ w$ A5 Y
另外一个小建议,就是move,所有的move都可以这样
; F& a; i; n/ E9 C  d2 d, k7 K: [if not move() then debug end
; G! h( ]2 ^7 L4 f  |' R2 o这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
7 X, H4 s/ v1 }8 ~6 xplant simulation中的free libraries有AGV模板,2 w9 Z+ ?6 C# l
里面也有案例。
% v5 p* u: s) u6 ]  W% {我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
- Z0 S/ Y9 ~6 J  H* {7 T7 ]9 Y' M8 x- K& `) Z) a/ G
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 " f7 H" J: E) L( D) _

# @  J, M$ x4 z& Z5 V那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
' z) W8 I7 Q; ~% _这是AGV_putin中arrive的method。6 Z2 W6 |0 u6 \% g  C" T0 h
( v, S2 N1 C" _$ U- F5 {6 w' n7 O
当到达物料速度越高时,这个报警更多,

) a' ]% V  |6 h另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-28 03:57 , Processed in 0.015701 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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