设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8980|回复: 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'2 \$ _6 W+ @9 Y
*/5 \2 z8 l1 r# U
is
7 A* P( Z( \& [5 l8 W        part, GlobalDistObj, assignLObj:object;row,Lan:integer;, p+ k8 v1 P8 V
do/ Q: c" O5 N/ n* D' U
        Lan := rootfolder.Internal.Tools.AOLlanguage;
1 \( q4 w' {1 |1 k/ g        if current = @.Destination -- else return
) _$ D% K: y; _! B# Z        then
8 l- O' g; `% h/ Y6 D, f0 T                @.Destination := void;
, s2 R) @. X, |1 C0 Y2 m; W                if @.occupied then
: }3 X! c( l$ \% b9 w- z. H                        part := @.cont;
, t5 p  c! b# R# T                        @.transpOrder := void;6 H7 d; i2 T; c! ~( I
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 d3 K2 X; D: @0 {4 B
                                @,root.eventcontroller.simTime);
( n0 `  F; s8 E/ h# v0 @                        @.HasOrder := false;
5 g6 i9 ]+ d1 b5 ~- H" N% b3 V                        @.DrivingHome := true;: v. z) n' j6 C9 @2 ?1 L
                        rgManager.tryToStartTransOrder;: e2 T1 B8 }; [9 q7 H
                        if @.Destination = void
! f# s) x# i$ I, K* L8 I, s                        then -- no transport order for vehicle @3 Z1 L# [4 X; x0 t9 j4 Z6 P2 Z
                                @.Destination :=
; C+ H2 S8 y9 x8 S) n6 D                                rgManager.nearestFreeStation(@,track.~);
& f& G( c' f* L* r* l! X                                newDirection(@);   ' |3 `$ f  J( w
                                if @.Destination /= void then
+ u; v; f7 `7 g8 i                                        @.Destination.NumReservation :=
* i. u9 C! T4 F2 P                                        @.Destination.NumReservation + 1;
6 v3 j% o; m& {3 w7 g3 k! W                                end;
$ G2 S/ O! _6 a' q1 f                                @.CurrIcon := "drivingHome";* T( s. i* J6 Q. E, L& c
                                @.DrivingHome := true;; h4 G6 Y# J$ g
                        end;, l6 F8 s7 }3 d" m, b
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station. s: h; Y& U4 w6 z
                        part := @.transpOrder;8 j& Y1 t: Y& @1 t
                        part.move(@);-- load part- ^4 `3 D. J0 ?0 h" R3 [
                        @.CurrIcon := "load";
4 Q  o  d; @" x; i                        GlobalDistObj := part.globDestination;
. s% l% ~! C& ~  O9 Y: C0 }: z                        assignLObj := rgmanager.rgAssignL;
. Y0 \9 [' `. U- e2 v: l/ n1 w) ^) P                        row := assignLObj.getRowNo(GlobalDistObj);
/ _" v) I( R) Y* r                        if Row = -1 then -- since 70' d+ ~! J" [# j
                                if lan=1 then0 T6 z2 i+ P1 A
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: p' I# D* b  I# C6 z
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
3 x- o/ I8 ]. @6 ^& G                                else7 |; ]8 u% {' t
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ ]* y0 ?" l( X. b( O2 K% d# u                                                to_str("in docking station: \"",?.~.name,"\""));                               
$ _7 z$ l) B! y2 j                                end;
- A! y4 X$ F$ q8 {                        else
, I  Q  ]$ V5 O) O! \                                @.Destination := assignLObj[1,row];
3 U! ?- _6 t, e* L8 r" C$ n( Z                        end;                        ' \. j- _' r6 ~0 R1 j
                        newDirection(@);6 _- J, N2 |7 s& J) V; [0 B1 R
                        @.HasOrder := true;: d. K6 H7 l, ^4 M; ~  U2 z% Y
                end;
7 t: H, w$ D. W3 \: }+ u; D4 r        end;
( A, t3 F9 J, Pend;        -- of the method
1 e) b; w/ p6 D$ S1 h
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
5 S$ _) m9 R+ y/ w- R- c( {$ ^+ E1 d2 d, @' r. L/ x
这是AGV_putin中arrive的method。
5 I& V# E3 Z9 ^) K" Q
/ c  \' }* a2 B3 ?4 k. \当到达物料速度越高时,这个报警更多,
4 m. H4 L+ V: D6 P- A" a7 k$ y可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
* U+ y0 d( D0 x% V! \: Q5 u程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?& _6 ~9 R! G/ z9 S  M4 M% Q

0 |+ U2 C6 u; X- B! ?1 P. ?  A另外一个小建议,就是move,所有的move都可以这样
# n# Y1 A% B7 b( P) Fif not move() then debug end  |! }- j5 ~: O, _1 ]2 n: |  Z
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。, X. L  \; q. a, G  Q4 o
plant simulation中的free libraries有AGV模板,
7 G0 C: x& g: f  z/ C里面也有案例。
% x9 z, c& B6 H- R9 `! ]. N0 ^! g我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
4 k% c- B% ]$ j' G3 C9 H/ E  \; H+ F8 }& q* ~7 j  J( f" U& N
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
* j. E: a% P2 F0 m7 X+ |* W2 |) N# a+ v
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ) s: R( @8 ^) _& l7 {% J9 `
这是AGV_putin中arrive的method。) f: ^6 J; a# L/ q. K  y: g6 z! G
: F. T) u! x5 w$ s1 V8 M+ @
当到达物料速度越高时,这个报警更多,

. H" C. V4 y; o6 y另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-7 07:40 , Processed in 0.018884 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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