设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9687|回复: 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'- x& N- x' `- X' B( [6 p
*/: d+ @# a) l# K1 [# c. f5 H
is
2 f6 F0 s6 G& A2 S- Y0 N        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: E( k( L5 b" rdo
, N$ k: M- p* Q        Lan := rootfolder.Internal.Tools.AOLlanguage;# w6 O4 U+ ]: ?& W( [5 O
        if current = @.Destination -- else return3 H; [; Q$ r: g6 m* `0 u0 G, N5 D
        then$ k/ v8 B: C4 \4 K. Q
                @.Destination := void;- e/ H! C+ @/ u5 t) t
                if @.occupied then
0 c+ O) C5 P. `5 G                        part := @.cont;
' O) U3 u" e* r7 T% W$ F. f                        @.transpOrder := void;6 n( M# o3 P$ d9 Y
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 v. _( l2 K+ h0 s9 w7 r+ b. B9 Y
                                @,root.eventcontroller.simTime);) O9 |8 t  h: J& e. H8 k( \
                        @.HasOrder := false;7 C) }4 a0 a( ?) G2 w
                        @.DrivingHome := true;
3 K! ]- t) J7 V2 a, R( {( t& `                        rgManager.tryToStartTransOrder;) e5 M. R1 _2 u1 w3 G: a: ]
                        if @.Destination = void
9 }8 ]% Q! \  |4 F3 `                        then -- no transport order for vehicle @
! D7 H8 t: I4 E' h2 _) \4 R                                @.Destination :=9 z3 l0 Z! ~( G( E8 Q0 X6 b
                                rgManager.nearestFreeStation(@,track.~);
9 f) }2 K7 W& Q" C6 C3 r% @) o                                newDirection(@);   
3 Z$ E$ \# N, \- s                                if @.Destination /= void then/ A1 _# d7 i. g- L
                                        @.Destination.NumReservation :=9 @% `4 \- u" o
                                        @.Destination.NumReservation + 1;
4 d( ~+ ~5 v/ M! x                                end;! |, w& I1 A. }  t5 T
                                @.CurrIcon := "drivingHome";. f+ D2 I1 y5 V$ b/ s  y9 [* N
                                @.DrivingHome := true;
, o- j2 }" d3 d                        end;
* l6 S# F/ A- t  a                else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 \3 \; {% d6 C$ _
                        part := @.transpOrder;2 ~8 F5 x3 {! f: b7 R# b
                        part.move(@);-- load part; q' ]& M; w6 p% z/ [  K, Y5 b' C# h
                        @.CurrIcon := "load";
: H$ e2 h  u% @                        GlobalDistObj := part.globDestination;( P6 q- f+ f% Z1 g
                        assignLObj := rgmanager.rgAssignL;
% I( D5 P* A- j+ W+ R                        row := assignLObj.getRowNo(GlobalDistObj);5 b' a1 E" I& p% R5 z6 X* X, w- W
                        if Row = -1 then -- since 70
' S$ E/ N  k/ R9 h* M5 C% Z8 D                                if lan=1 then9 b& t' p7 M% j& d) a2 @+ m
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 N( D" x2 Z2 X. W
                                                to_str("in der Andockstation: \"",?.~.name,"\""));1 f. z8 L& v6 w9 m/ W4 T
                                else
# c9 M# {. @4 s) `& ~: a                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. |# f) y3 m' {
                                                to_str("in docking station: \"",?.~.name,"\""));                               
, k" ~  T. s0 ~" I                                end;
3 g5 O7 Z! A$ U+ s8 ~                        else# O7 [* c/ T& t( V, ~: I
                                @.Destination := assignLObj[1,row];9 {9 {$ s! i  i& m* Y$ U
                        end;                       
' z: |# {; z- u' M4 q$ N# ^                        newDirection(@);7 W; n0 U; a8 z9 V3 C9 Q
                        @.HasOrder := true;
1 K/ `6 C' {7 l$ i                end;
  t9 Z5 N" r8 U        end;
- B" ]' y/ A- }+ \" W3 t- cend;        -- of the method# P, S2 v; n. j+ Z" d. I
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ) r6 g6 ]; q/ V+ _7 a+ e

* N/ ~8 |2 D+ W2 V7 B这是AGV_putin中arrive的method。9 _* ?5 g. l) u: A
0 K+ z- X5 @2 N
当到达物料速度越高时,这个报警更多,5 S" L: m! |% {1 b8 e4 L  J- j4 g
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。+ w) L! e" a: H, Z6 o" @2 P( F
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?% U' L0 [& e% a: |4 K$ T

7 y+ T6 n0 T; L, L" I: Q另外一个小建议,就是move,所有的move都可以这样
9 D9 P, P6 e# R4 Tif not move() then debug end# V+ X7 \9 X* X( [1 n9 s
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
7 r& v. }% I9 @' G, Cplant simulation中的free libraries有AGV模板,) ]! s9 y, D: ]1 }# U! F9 v/ R, P
里面也有案例。
+ V8 S- x9 z" Q7 b2 G- g) @我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。! w9 _9 q8 ^3 W# H& Z
3 g$ N! W/ c% n
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 5 w7 @5 S2 E6 g! `

8 T7 ]; J9 X5 D! u那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
& a! v6 D* D4 K7 P  P这是AGV_putin中arrive的method。$ {9 {# S( U) ?/ \8 g$ @
8 I, X' `+ d- f# [
当到达物料速度越高时,这个报警更多,
  g( Z# j, ?( x7 l# d
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-17 10:18 , Processed in 0.017167 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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