设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9673|回复: 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 }4 D; z- z( P% X; r7 J$ y! U4 k*/
8 p- }9 }% c6 C- e- ]is
5 P6 Q6 a' y- K  v        part, GlobalDistObj, assignLObj:object;row,Lan:integer;# D( ~1 ?0 F% u# A/ T. p4 M
do
  \, V- x/ B- S% ?        Lan := rootfolder.Internal.Tools.AOLlanguage;  x1 O8 `) b, d) _# D  U+ n" k5 {! q
        if current = @.Destination -- else return
: l) I/ g9 p( E0 p5 W5 l& v1 V        then7 A% k* E6 [) G7 J0 [
                @.Destination := void;
' C# K3 l! y# A( M. A3 d) S8 `                if @.occupied then- H- r; B8 P6 `+ N4 o7 D4 n
                        part := @.cont;
! r& l* F0 ]9 a% x+ N                        @.transpOrder := void;
) C6 Y5 l# {% j. X2 \                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ ~, m* e4 |: R/ v. f/ y9 C                                @,root.eventcontroller.simTime);! X( C4 B+ z" v8 ?- S+ a( W( D1 A
                        @.HasOrder := false;
& t. l! L$ p+ I* a+ }5 K! m- W6 k                        @.DrivingHome := true;
$ L! @5 w" P4 J4 J0 e6 n                        rgManager.tryToStartTransOrder;6 `, W+ j. q/ i
                        if @.Destination = void
1 b7 L4 Q3 x: d1 F                        then -- no transport order for vehicle @# e; v6 l  m6 V8 f3 m$ v
                                @.Destination :=8 z* e. B* B6 m7 ~8 T
                                rgManager.nearestFreeStation(@,track.~);
' G# O+ s# K; i- P3 I. M* b                                newDirection(@);   
4 c" i6 I  ?% e; i* j+ p7 O3 T                                if @.Destination /= void then
# s7 w5 X% `7 V3 X7 ?& \2 R* I' B0 }                                        @.Destination.NumReservation :=
; H2 K) |) X8 Z                                        @.Destination.NumReservation + 1;
: e- M6 N& }$ H# Y4 i) O7 |& F- s                                end;
  M) r' q% P- X5 H  K- y                                @.CurrIcon := "drivingHome";3 V: R; ^% I2 S2 z5 r* v2 B3 M
                                @.DrivingHome := true;
, e2 C+ [; y, k+ W                        end;
0 _1 b$ l* ~2 T1 R1 I- E                else -- the vehicle @ is empty, both vehicle and part are in the same dock station- t) W  ^" B2 T) C- @' Z4 B
                        part := @.transpOrder;
5 Z( ^; [2 Q  S: `% c) |  h; C  g                        part.move(@);-- load part
- H; v. s# Y1 s( s  |                        @.CurrIcon := "load";: q2 X- j  l2 v
                        GlobalDistObj := part.globDestination;* c: _, A; l" X: ]& c
                        assignLObj := rgmanager.rgAssignL;
; Y: y; @% p# h" z' r1 l                        row := assignLObj.getRowNo(GlobalDistObj);
7 u+ r, d$ B: R: ?* w3 a0 H                        if Row = -1 then -- since 708 {2 B* Z2 E/ d+ N0 n% [
                                if lan=1 then
% n, M7 N; q# @                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- g1 S& _: t/ _- _+ u
                                                to_str("in der Andockstation: \"",?.~.name,"\""));& q8 Q4 y1 g4 }4 S1 g' J& I
                                else
# l1 e& K; c$ U8 n) V# T                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 l+ j" w0 f* W- I
                                                to_str("in docking station: \"",?.~.name,"\""));                               
% N7 S  Y$ ?* H6 r                                end;
% Z! w" S. b: G+ g0 g( l) f                        else' J+ k* g: `3 T0 k( Q
                                @.Destination := assignLObj[1,row];4 s( J! x. r1 ^. K  e$ T
                        end;                       
' U  e0 |. r: `' R                        newDirection(@);2 b/ ~8 i# X- T% q+ j5 h
                        @.HasOrder := true;
! B" \1 }- {+ `, r" @3 [                end;  _& n& q/ v4 l- o  e
        end;! w- |- ]7 x+ n& ]) y$ R9 j4 ^
end;        -- of the method
$ R' Y4 m2 R4 D! m% f
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
  n9 l: p8 ]0 E% O) [; I% T
' v' d6 F' b4 Z" d! ?" }这是AGV_putin中arrive的method。' `# H4 E- J8 {. [3 f0 J

6 K# P5 j* h3 p7 _+ Y9 L, C# o7 x当到达物料速度越高时,这个报警更多,
% E2 g  C- f6 ]7 R7 d可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
/ O7 m0 C+ t' [. ]7 p程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
) I  E4 Q! a( }, n* i1 s
: y% E$ f3 F. @. R$ n  e8 C3 Z# v另外一个小建议,就是move,所有的move都可以这样
1 y1 \% y( n, }5 S% dif not move() then debug end
+ }0 n2 J) S4 u* y这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
: h2 i2 B. e& oplant simulation中的free libraries有AGV模板,
4 |* y7 o. {& C里面也有案例。* F0 Z% F: S, i; b+ C
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。; d$ \$ f8 L; o7 f  M
7 i1 j: {% }3 t5 T' l
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
; Z& k! m  k) F* \+ J2 T' \7 k; _# C# G9 Z" w% m: G/ ^/ d- q
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
& {% O* o5 }: H; w这是AGV_putin中arrive的method。
8 h* Y, c6 Y% L+ n) v. w, [
- y/ E; P8 |1 y) n6 @' E# ?$ z当到达物料速度越高时,这个报警更多,

0 ?) v; q# i; ^0 f另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-16 08:33 , Processed in 0.016448 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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