设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9585|回复: 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'
0 v6 _4 j, t  z& |/ @6 [  {% j*/
7 b5 t, r3 s% cis
- ~) k0 B; k% ^; G5 N        part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 `4 O0 |, {. W4 E
do
- L8 p8 m% L% {* K        Lan := rootfolder.Internal.Tools.AOLlanguage;9 j' ^' n1 G* d1 ^9 E- M. E3 e
        if current = @.Destination -- else return, z* s" C, S1 R5 a" T* a" P+ v9 c
        then4 A. ]( k9 W" {" }
                @.Destination := void;
/ m% c1 r7 }8 O, f2 [: _, h8 c                if @.occupied then
5 U3 y1 }# h, ~; J3 j$ k+ R  _                        part := @.cont;
, R2 [, M. Z9 B# B/ C, y+ s' \! B1 ]                        @.transpOrder := void;# L& B4 i  K5 k5 n
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 s0 G5 s3 u5 i" {: C- T9 x% p                                @,root.eventcontroller.simTime);
- R1 C0 F8 h. A; C                        @.HasOrder := false;9 @7 r" I- u7 |1 N$ ^0 P# V
                        @.DrivingHome := true;
, ^3 e: Y/ I1 n# U: G                        rgManager.tryToStartTransOrder;& M: h, E: ]' e" |: g
                        if @.Destination = void& d' k9 u, A+ H+ l1 r
                        then -- no transport order for vehicle @
! D; }2 Z( q; E) W1 m                                @.Destination :=
3 c+ u- w2 j% e, a                                rgManager.nearestFreeStation(@,track.~);& c# c6 Q) e& ~) o0 h, F% I( Y+ n
                                newDirection(@);   
2 ^) r+ O6 a# Z2 }2 x- K                                if @.Destination /= void then
5 v9 ~! N# J8 J4 G6 X3 e% o                                        @.Destination.NumReservation :=
  m0 j3 J% ^5 n                                        @.Destination.NumReservation + 1;
  a4 d3 }' V2 X. z8 Q                                end;
9 h# H$ `: B. b- Z                                @.CurrIcon := "drivingHome";" K+ f. a0 h0 x. ]% L1 `5 f2 u& g
                                @.DrivingHome := true;5 ~9 z, c5 _- D: k# t
                        end;
% A7 X+ m" P5 ^                else -- the vehicle @ is empty, both vehicle and part are in the same dock station. j5 d% y8 w4 [4 |2 w
                        part := @.transpOrder;) ?# p  \- Z0 P+ K* p  B
                        part.move(@);-- load part
* p" K6 o' W1 M# ~) ]6 m                        @.CurrIcon := "load";- M7 |/ z" `1 k$ z+ q- `9 n' M
                        GlobalDistObj := part.globDestination;
& h4 W' E- ^0 g% M! i+ \2 F                        assignLObj := rgmanager.rgAssignL;
' H3 d# `6 @6 l# T2 ~                        row := assignLObj.getRowNo(GlobalDistObj);! r+ o6 f0 i0 |: c# F3 y$ i
                        if Row = -1 then -- since 70
: k# K7 v8 N1 g                                if lan=1 then
3 g# S! r* L% b7 m                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 @/ \. y* [( ?                                                to_str("in der Andockstation: \"",?.~.name,"\""));' G: c! n9 G1 T. p" {
                                else4 _: D3 J% O$ ~! d
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: ^* @! k+ _0 }/ W3 S! y                                                to_str("in docking station: \"",?.~.name,"\""));                                ( N) n; z2 F/ B9 l* r1 W$ d( S/ [2 g! p
                                end;4 n# g( L9 [, E4 q; f: t
                        else
0 a% L; g3 o' M- p  H" Z! ^                                @.Destination := assignLObj[1,row];
/ T0 o# _0 l1 H/ Z- |                        end;                        4 i. c: x' q+ i5 e7 ~
                        newDirection(@);9 D) w; g6 p8 [
                        @.HasOrder := true;
- a8 Q7 I* B  u& r4 M8 V7 N                end;
6 J9 V2 v% n+ `        end;
, i& D, o: V: ?7 _% p' K/ @/ v& C9 }5 Eend;        -- of the method
* K7 c3 q; h) W" o5 i. Y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
6 W' H; |9 u; r# L# R# M7 C/ t+ \
$ f& ^$ @% N( D' z9 \0 V这是AGV_putin中arrive的method。& D% W  b+ a( s3 l

' L3 v6 ~0 i, i' E当到达物料速度越高时,这个报警更多,
) K+ L) u) h, E2 Y可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
" _8 [' @4 C. ]程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?7 d1 C5 i  X( y
2 r8 M4 E( z& h# ~6 B( H, W, M& c! }
另外一个小建议,就是move,所有的move都可以这样0 |7 Q- H. ^, g# g7 C; L, y2 S1 Z! o
if not move() then debug end
: |9 d( Z; a4 E' b( {这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
5 P, Z$ @5 Y2 l8 V/ A" c" jplant simulation中的free libraries有AGV模板,
) ?, r. y% R" S2 f里面也有案例。- f+ d( W! D% Z  z, x% W# H
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
; l, M# J! T$ y! O# F% n3 E4 J( I8 C5 o. y+ g1 F
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
" F: T6 y' }+ |( U. X9 c
& P. F8 y# I1 Y: o1 [4 l那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 1 X' Q" z; t# O( i0 f
这是AGV_putin中arrive的method。
. M& D5 Q- ]% a; X, G2 ]4 G
1 a- G0 G5 C1 u2 Q: i1 @4 n当到达物料速度越高时,这个报警更多,

4 Z8 C# d5 G0 I) B) i& a另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-9 22:23 , Processed in 0.020512 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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