设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7592|回复: 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'; ]) c% X. X3 D$ Z% Y0 m5 N7 g
*/
) x* N, A8 W' B: b$ xis/ K/ [2 I/ X* A" w2 Z2 x% g
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;" m! V, \. b- l
do$ r! c: H0 i0 X2 w" H5 F) ~
        Lan := rootfolder.Internal.Tools.AOLlanguage;+ B, i+ w+ @0 ]6 E
        if current = @.Destination -- else return
6 s2 t; Y% i. _% `; }        then/ a0 p# J8 u* L+ u9 Q. n# p" g7 v
                @.Destination := void;
* f1 j" x9 D8 N                if @.occupied then( T8 D3 R& W7 F
                        part := @.cont;; ~, l1 |+ a0 ^1 {2 O# M
                        @.transpOrder := void;# E6 U$ b; g3 b: u
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* \& G9 C  [# \0 r- @7 |# Q( c$ S                                @,root.eventcontroller.simTime);
" P! Y" p, q, X, u2 @                        @.HasOrder := false;
4 ~' f5 G# Q! |) i+ U                        @.DrivingHome := true;% k9 F3 y- E# f% l0 D$ z* Q* i% H. x1 M
                        rgManager.tryToStartTransOrder;
$ ^+ v+ |2 \" U& O# \! P3 b" e0 y! X                        if @.Destination = void
$ h/ R, P, V1 o# N4 G6 j                        then -- no transport order for vehicle @+ i) k( `0 l* K' h4 a
                                @.Destination :=
8 e9 H0 ^+ f$ B5 T                                rgManager.nearestFreeStation(@,track.~);/ r8 Z9 l9 m' F3 L8 D6 H8 ^
                                newDirection(@);   
1 n2 K' \4 b$ F, S/ w+ w7 D+ q6 y                                if @.Destination /= void then$ z2 [$ f9 d2 i/ i$ P( X2 x
                                        @.Destination.NumReservation :=, S2 b* P+ Q* w1 f$ d+ O
                                        @.Destination.NumReservation + 1;6 `1 C5 P' r2 q  G" |
                                end;
- ~+ W0 I$ ?2 o- Z' {; |# `                                @.CurrIcon := "drivingHome";: \/ F" X9 S1 T8 N8 T8 ]: Y
                                @.DrivingHome := true;% p5 Y$ h" B9 K" O
                        end;; y( Y, i( f; Q
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, _. _9 G; I9 U% y                        part := @.transpOrder;
/ d9 r$ }  l* K# W) b5 @" s                        part.move(@);-- load part; C( g( b* r# H0 I9 [0 Y0 e& R
                        @.CurrIcon := "load";/ Y! B/ ^" e7 Q' g- D& p9 S9 y1 j
                        GlobalDistObj := part.globDestination;
! q3 r) _1 l+ Z) s& C1 A/ |                        assignLObj := rgmanager.rgAssignL;7 N) U% l  K' z' h( [! i' o
                        row := assignLObj.getRowNo(GlobalDistObj);
) L# ^% T' j  a6 f$ h/ c                        if Row = -1 then -- since 70" ]8 n9 Q1 V( d0 ]. Y
                                if lan=1 then
2 I8 ?- z5 \8 p$ m# W/ Z8 k                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 {# w# I3 D3 p$ k
                                                to_str("in der Andockstation: \"",?.~.name,"\""));" x+ U- \: G6 a3 e% z$ J& ~
                                else+ q$ M5 t$ D7 d0 S" G
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 E# ]* |  L* o0 q9 }
                                                to_str("in docking station: \"",?.~.name,"\""));                               
5 l5 a/ {- K9 }! G% l                                end;
/ c4 p% u( j7 k! G& Q$ F                        else
3 L' [8 e' P; m" R9 b% s                                @.Destination := assignLObj[1,row];
0 z9 R8 r. J# ?  F                        end;                        / W' R# N- g3 m4 l, i) @( T# L" u
                        newDirection(@);. v7 ]* h+ h) u# Q' Q
                        @.HasOrder := true;9 I, j  R/ y2 j, @5 u
                end;
4 ?. }' r3 P; A2 ]        end;9 z8 O9 R- _2 T/ V/ ]- K4 y0 y
end;        -- of the method
4 K+ g( _8 q) ?& f& t) o
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 : O6 _1 ?5 ^8 P
( _# L: m2 R4 H& G5 \
这是AGV_putin中arrive的method。
+ C' C  V) `. k% a1 h1 Y/ j2 N1 ~* c
% }2 G9 \, R4 X" U! h0 h$ D当到达物料速度越高时,这个报警更多,: [, I4 o3 ~3 X: W+ n
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
7 q6 B! J8 ?# D$ g4 v程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?3 m7 ]: H6 k! b: p

( l3 y7 h# ~9 I! V" J另外一个小建议,就是move,所有的move都可以这样7 H% b! ?6 W: u( j6 R2 a
if not move() then debug end
3 c* Q* r% P3 J& f这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。! f& e) |+ n% u
plant simulation中的free libraries有AGV模板,
+ u7 c4 W# `( e! r: _# Y里面也有案例。
+ u; h2 }2 L  F+ D6 |  N' d( N我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。. G) o1 B( S3 U2 q) W' E

. r2 S$ F$ Q2 o$ |$ o( l我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
0 |5 {% r; R9 R; {+ O1 O  ]% K. p6 M/ g7 L$ E9 I( K& h# g
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 / s4 _: q# d+ Z) _9 k2 A$ K
这是AGV_putin中arrive的method。
( _" L1 z$ [3 \/ e/ c0 \6 R/ @
7 N5 q8 ^5 q; [) G% f当到达物料速度越高时,这个报警更多,

- n/ i) d& z6 b6 D) d另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-19 07:12 , Processed in 0.017896 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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