设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8164|回复: 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'
8 s7 y' f) ^1 @9 C# I*/1 }6 k+ b6 D$ X+ q) R' @) B
is
' z  M6 f& Y7 h; M6 }        part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 o# `4 h7 _$ e
do
( u- b# h# q) J8 ?( ?        Lan := rootfolder.Internal.Tools.AOLlanguage;7 I' G( T( C/ r4 F2 F8 {1 R8 M) ^! P, R, m
        if current = @.Destination -- else return
- V+ R" p% s, a% N. C  ^        then0 [, b  K% E9 _& J
                @.Destination := void;. e  H. P& v: h4 E2 ]
                if @.occupied then
) Q& S1 W. F& a9 A- F9 @& f                        part := @.cont;8 s9 C& i' I5 |1 p6 P: w$ p
                        @.transpOrder := void;
, J' g( X4 k5 I/ `: l) b+ S8 `                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ ?! C5 U: k: k$ Q; c
                                @,root.eventcontroller.simTime);) Z( h2 d% _! E! U( z
                        @.HasOrder := false;: C; t" [. U- G+ x
                        @.DrivingHome := true;- J: B! y: j" A. K- j1 m% A
                        rgManager.tryToStartTransOrder;5 y9 b: S3 Q, a+ Z+ Y
                        if @.Destination = void
9 M3 s: ~2 [0 L  X                        then -- no transport order for vehicle @% x3 W: T  D# {- N" y
                                @.Destination :=$ ^7 C3 j7 i7 B
                                rgManager.nearestFreeStation(@,track.~);7 a& c* Y; O3 F1 A
                                newDirection(@);   # {1 G& R  F8 Q
                                if @.Destination /= void then
2 I9 X0 L7 [0 v# @, M8 o$ S                                        @.Destination.NumReservation :=% ]0 `$ o9 ?# S4 w3 ~# \% r4 l& @
                                        @.Destination.NumReservation + 1;
/ K; x8 E$ r% e                                end;2 n: \. w7 Q8 T) U
                                @.CurrIcon := "drivingHome";
8 @3 L. h, N/ W! d  a$ D- L                                @.DrivingHome := true;
6 j2 S# u: a3 `; M/ d                        end;% P( {& ~$ y" k9 L5 ^4 E
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 I) r7 a6 \7 `# I( W                        part := @.transpOrder;
: Q  w5 k+ |2 s2 Y& D' [9 I& L                        part.move(@);-- load part
. z" w! p2 _( ?                        @.CurrIcon := "load";4 ^( f9 m# M8 x- X1 W3 i
                        GlobalDistObj := part.globDestination;0 w" b! }* S7 H( J" K
                        assignLObj := rgmanager.rgAssignL;8 Q, O# P7 r: b5 b( m0 R
                        row := assignLObj.getRowNo(GlobalDistObj);* M0 e4 [- f8 |3 B8 s/ O1 _" M
                        if Row = -1 then -- since 70
0 N' t; w$ O& l' V                                if lan=1 then
- m2 J3 U# s& N8 l6 J/ u# D                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ ?$ X* s5 V# s                                                to_str("in der Andockstation: \"",?.~.name,"\""));
" x2 r5 `6 ~( G% A1 s                                else1 m& T. u$ z9 _# E
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% d) D" e4 q1 A7 N' b: m- |                                                to_str("in docking station: \"",?.~.name,"\""));                               
' f4 M/ ?: h- [2 R7 @                                end;. D: u3 e$ r' m+ V& S! ~
                        else/ }+ Y& M0 p' r; {6 x
                                @.Destination := assignLObj[1,row];
) D6 M  L" `) P( H) |                        end;                       
- _+ K" y' g$ @" X7 y6 S, f/ z% r                        newDirection(@);' w1 T/ p! c. e- }5 |7 [
                        @.HasOrder := true;
6 c1 T, K( q2 l4 V                end;
5 L* r- N7 @" b2 k4 ~+ c        end;( S/ n+ t* P# R! R8 O1 n
end;        -- of the method. D$ ]5 j8 W6 O+ ~
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
" R* D, ^5 c3 T+ T& P4 k& h( i% V
$ A" z* R4 w5 @' V; ^这是AGV_putin中arrive的method。
. y4 Z8 x" B9 O3 p' B& m) \
" |3 a+ m. ?, G; \! G当到达物料速度越高时,这个报警更多,
, e# C3 {, E  w+ t: V& }可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。, ^. W+ ~4 i8 j/ ]6 }; b
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
0 L0 H+ s: B$ d2 |* y$ R( z5 `9 y6 N, ^0 Y' y5 d
另外一个小建议,就是move,所有的move都可以这样
$ ~5 b( T, {, T1 b* M2 z, t4 Oif not move() then debug end, M5 D& ~( e! [# r
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
' K+ v  G' I9 t* G, Cplant simulation中的free libraries有AGV模板,; f6 l3 @, H. [1 M! a
里面也有案例。8 t9 G- d# U% Y! V6 o$ d
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。4 z$ K. ^3 n5 L9 D, h

5 E/ _6 s6 w. {# {7 ]1 K我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
5 ?, l8 T5 o5 C4 v9 u: e2 |$ G
+ l: p2 ]0 Q2 I! t& A, S5 x# u那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
3 E1 E% x( P+ O& }+ K: w这是AGV_putin中arrive的method。
/ a5 q' S$ q! s3 y8 J0 \
% L4 G* g# Y( k# P" Z. q当到达物料速度越高时,这个报警更多,
" b/ z+ f4 t6 W& |
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-18 12:10 , Processed in 0.015823 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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