设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8655|回复: 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'
" k' @9 F6 A2 R*/
. K. C! \1 u7 M% |8 J1 eis
- g0 Y* W5 A1 A( F- W/ Y        part, GlobalDistObj, assignLObj:object;row,Lan:integer;! s  Y; @$ y0 E, o6 r" S5 k
do
8 Y% n+ t% o, x* M, i        Lan := rootfolder.Internal.Tools.AOLlanguage;
% y* S. t/ B. j( ]4 X1 z        if current = @.Destination -- else return4 f! m, c7 y5 l4 M! R/ S
        then
" L, Q7 F% K& `! R, r& i2 s1 A                @.Destination := void;& j; d3 A9 ]& C# y  S9 P
                if @.occupied then
" l" }3 s; h" M: d                        part := @.cont;0 z% ~5 U# Z$ E- c( J
                        @.transpOrder := void;! e- C% _+ W5 ]; I" L! b: t
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( C0 z) e7 q+ w) ]( W- B                                @,root.eventcontroller.simTime);
9 ^7 g1 M, e, ]; A                        @.HasOrder := false;5 l; \* Y* I0 F/ a; r# D/ Z
                        @.DrivingHome := true;+ _) u/ l* f7 V3 V0 k, T& t# h6 ]& I
                        rgManager.tryToStartTransOrder;
" |! i6 X" S0 O/ V1 k- T' ]- f                        if @.Destination = void
; B, b* v: I! h- }  c) s$ Q                        then -- no transport order for vehicle @6 A: v6 E4 p) t& A; _. p0 o
                                @.Destination :=) e# H" e& B! p; t2 V( c
                                rgManager.nearestFreeStation(@,track.~);$ O" c8 L7 Y) N
                                newDirection(@);   5 ]- l& X4 p0 q3 _+ C2 p' G9 |
                                if @.Destination /= void then
+ |- }( a. Y6 K/ }8 V" i                                        @.Destination.NumReservation :=& S- U* I  C( P+ S4 r
                                        @.Destination.NumReservation + 1;2 [) U8 [/ r- d6 ~  c
                                end;5 w& [' i: t3 T9 F" d* H! T$ g
                                @.CurrIcon := "drivingHome";
; X$ N! \3 v- N/ Q                                @.DrivingHome := true;
5 a# D: A  A8 N" J3 A                        end;0 F/ U& a6 g9 n4 x: H6 c. H
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station! @0 U: s& {4 ^: ]
                        part := @.transpOrder;; x, b# C! Y/ x
                        part.move(@);-- load part2 z9 W) ^" B7 j8 t
                        @.CurrIcon := "load";
* }: y/ d9 {+ n! x1 m1 Y& K8 h                        GlobalDistObj := part.globDestination;
/ [4 E1 @: G) K                        assignLObj := rgmanager.rgAssignL;
& e9 h* `+ N0 k. S- _( M                        row := assignLObj.getRowNo(GlobalDistObj);, R, ~- O" q, D6 q
                        if Row = -1 then -- since 70
/ U( B( w1 \/ y' i                                if lan=1 then
* n& |$ G- [, j                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# y& }) C2 n( ~1 C5 P+ R" a
                                                to_str("in der Andockstation: \"",?.~.name,"\""));) e6 U/ H" |0 R
                                else
' k1 A7 ]& K6 K1 b* j  |# A" T                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' w) k  O7 k1 r( W9 i                                                to_str("in docking station: \"",?.~.name,"\""));                               
6 ?  t. d7 l9 _$ r5 g4 y$ W+ W- [1 o                                end;
/ C% R9 X/ Y4 \+ y                        else, y5 x# w# g  x4 o4 J
                                @.Destination := assignLObj[1,row];* P1 U, K8 b% f8 Z& P' L! W
                        end;                       
+ W1 X/ Q4 w, G/ C) ^                        newDirection(@);
* r. ~6 X8 S" [9 y' Z                        @.HasOrder := true;$ m3 i+ k! Q4 U
                end;
  u/ n" V* d/ r! K        end;
. Y" l# P1 ^! j  p5 c3 V$ Hend;        -- of the method+ [/ Q4 q+ H7 x6 G& L1 l) |  x+ {
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 # D( M  ]3 F, O. r0 b
1 P' v6 g8 [' k
这是AGV_putin中arrive的method。( X2 o) T7 X* ^# u4 j6 R% l

% D2 L) V6 t! K4 x2 k/ V( ~当到达物料速度越高时,这个报警更多,
( U( I1 h' `9 v3 E可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。) I8 V2 v9 W5 C8 ~4 s
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
8 E) V- v$ }& b2 p0 r
- H# u, {' M, U1 U) M% d# Y另外一个小建议,就是move,所有的move都可以这样
! B6 m5 W" x! {% ?7 wif not move() then debug end
& i9 F- F2 V# e; i这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
6 _9 m! q  ^  k1 E+ cplant simulation中的free libraries有AGV模板,# Z/ M% W# v1 f+ I( i; r+ a
里面也有案例。3 p9 W; h6 K) W
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。+ z5 d$ k0 ]: h5 \
1 e0 ^9 w+ M+ ?
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
$ G7 g: c/ ]& }% L+ Q; b3 U/ t: _# B
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 1 S4 a% Z* u3 O7 D) D
这是AGV_putin中arrive的method。
, f. {* Z& a' }7 t& T7 m& m
4 ]1 T% `! O. A, [; V; ^2 y当到达物料速度越高时,这个报警更多,

& p! `" J! |1 D2 U9 I另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-18 07:44 , Processed in 0.023183 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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