设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6907|回复: 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', G+ N. g- g5 }' W
*/
) _- d! z# j  V9 ?4 L6 qis: m& ?1 h4 d1 O, {: b; g. R
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;# `$ h. z- w5 v. H- f8 w1 w1 c! @
do$ i' T# i7 N$ ^* u) T9 v% i
        Lan := rootfolder.Internal.Tools.AOLlanguage;  X4 `1 F6 @+ v9 z% Z. [& A% Q
        if current = @.Destination -- else return
  `2 ~6 b/ @- ^- ?0 m        then( v& h% j: f5 L! J
                @.Destination := void;5 R4 m2 S# _, ~! P( ~. c1 d
                if @.occupied then0 `  ]* k: x7 X2 \2 E
                        part := @.cont;4 w. n0 _' a' }' {! [
                        @.transpOrder := void;0 w. j8 U+ d# n4 f" J% K
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 m5 I3 D/ }/ k' {$ F' P" J
                                @,root.eventcontroller.simTime);, i5 w% |7 @# O8 L. ]
                        @.HasOrder := false;
7 f' }3 K+ I- g# H                        @.DrivingHome := true;+ J2 I, i* D5 p. T! B+ A; [
                        rgManager.tryToStartTransOrder;0 m/ W1 A2 Y$ A& ^$ [' \8 S, q
                        if @.Destination = void7 s3 a, ]2 D/ W
                        then -- no transport order for vehicle @3 a' U, }. m$ G1 I- j! w
                                @.Destination :=; e4 ^  k: |7 V1 V) ]
                                rgManager.nearestFreeStation(@,track.~);
+ j7 N% M& i' V/ d- L                                newDirection(@);   6 y2 F7 `) N! b& b
                                if @.Destination /= void then
5 M# V: }7 C) `- |% U                                        @.Destination.NumReservation :=- |8 Q" w( a; y
                                        @.Destination.NumReservation + 1;
3 c$ N- D' i$ x; }, E  z5 `                                end;$ u/ g+ S; V2 q
                                @.CurrIcon := "drivingHome";
5 y7 {9 W+ M* T                                @.DrivingHome := true;- x& V( c9 ^4 @$ h9 U
                        end;) @( U& }. @; v' D6 ^9 p
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station' U4 C" U# y: R1 }# e9 E% D
                        part := @.transpOrder;
$ _6 q+ q1 {9 b1 j: }                        part.move(@);-- load part
: U/ N  f  N& k" {( D. L  C$ o                        @.CurrIcon := "load";
: K6 g1 x( V5 L1 E4 w7 D                        GlobalDistObj := part.globDestination;/ K5 N/ I5 d: b- V& i  j" U  Q
                        assignLObj := rgmanager.rgAssignL;0 m4 j9 `1 V7 L; O1 i1 P# O
                        row := assignLObj.getRowNo(GlobalDistObj);% K8 p4 C5 V6 ~' [' T  Z2 I
                        if Row = -1 then -- since 703 H5 B( M8 ^2 N5 E7 i6 i" B
                                if lan=1 then
7 W5 p5 }; R5 z8 m! R# Q' k/ d                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ ?; E; \, S! ~  ?& K5 a8 b3 _                                                to_str("in der Andockstation: \"",?.~.name,"\""));) S6 V6 V+ b# I" ]5 e% }& V) A. X, }
                                else; `  N% j' f9 R5 t
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. x6 W$ @5 e7 F! t. @
                                                to_str("in docking station: \"",?.~.name,"\""));                               
0 S) f! C% |' v$ v; b! H% ]                                end;5 H6 `2 @! w7 m8 h5 n
                        else
/ D) i$ Z7 m4 M1 u" y/ ^8 b                                @.Destination := assignLObj[1,row];
4 ]4 k" T! {9 K' Q/ ~7 q4 s# b                        end;                       
0 H9 B' S: i. j) R8 P                        newDirection(@);( }) g# G+ S- n
                        @.HasOrder := true;$ Z4 }7 B6 ?) G; Y! a* H
                end;1 l) \  w' d  C/ u+ S; b
        end;
, x5 S% c/ j! o( I" ~5 \end;        -- of the method& a2 U7 Z+ E- K2 b$ T2 K; L
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
& ~0 [0 I" K. h& Y1 j! e0 H5 }, b6 a% A* f6 p$ @) I- x
这是AGV_putin中arrive的method。
: o9 {/ W5 L) B& \2 Z2 i- P7 E6 I. E' g/ Z, _; }
当到达物料速度越高时,这个报警更多,. ~) P8 |4 e; W% \9 K
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
$ v4 T# W! O6 q5 R( b程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?# B7 F5 Q- O' |* j0 ]7 l2 `
% {) S/ E2 n/ T; {( ]; y
另外一个小建议,就是move,所有的move都可以这样
" l' c+ [+ A1 j5 e3 u  x0 F% dif not move() then debug end
% Q9 M" H2 W, `( m4 i2 y5 T这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
. a0 t! s* Y/ [, O5 R$ B1 g0 xplant simulation中的free libraries有AGV模板,3 @& n8 n5 ~/ l" Z2 M7 A
里面也有案例。: V( J* ^" d/ D  V, {5 U- O
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
7 S1 _: C7 ^* A7 b8 \
6 F/ l& G  Y# K7 h9 i9 N1 V$ k我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ' Q( ?" ^- }& p3 c0 v! F( H

5 n* q+ C1 n9 {' |$ ~$ h$ z& H& e那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 0 Q% b+ N- q7 l$ A& ^' }# ~' q8 `
这是AGV_putin中arrive的method。# g1 K1 K2 i' ^9 i' I
+ v  n, w* M/ w/ g3 A. m) I/ C) O
当到达物料速度越高时,这个报警更多,

; F1 P: n  T% z9 q$ l: }" o另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-6 01:41 , Processed in 0.021282 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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