设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4561|回复: 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 k! Y& ^! ~& h8 g2 E! `4 Q*/  |( r. K3 V$ C- g: N
is
0 P% B6 D/ Z0 U/ C) e1 j. o        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( m0 t% c( X, ~) l5 y  v( G2 y( q$ bdo
  t8 j; C% i/ S' Y* T4 T. }        Lan := rootfolder.Internal.Tools.AOLlanguage;; l- V1 _% `# i$ T* M
        if current = @.Destination -- else return
9 E) K  l9 J6 H; @3 `        then" K8 Q  a7 }+ w- L! e
                @.Destination := void;; ^1 c/ A3 n9 D$ w9 t6 J
                if @.occupied then
, }. l$ ^" p- g! |                        part := @.cont;
; e9 h8 }3 r- s- f; Y" [# p+ |                        @.transpOrder := void;! e0 n% B4 K4 r) y1 F% H" {
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 [. A6 D2 ^8 M* s# T+ ^                                @,root.eventcontroller.simTime);7 O. h( D5 h% J! m2 x' T
                        @.HasOrder := false;
- R5 }4 {; q( C; L                        @.DrivingHome := true;6 m" v, M& X- c1 j* e+ {, ^8 ~
                        rgManager.tryToStartTransOrder;
8 q. l+ [3 I" c0 t8 \8 I8 i                        if @.Destination = void
9 r" e$ `8 Q1 H  w0 I4 C: S. s                        then -- no transport order for vehicle @0 J1 [' V+ c( Y) I( k
                                @.Destination :=
$ y3 e6 Z% k$ v' N+ J! z" h6 O                                rgManager.nearestFreeStation(@,track.~);! `! s& B* }- g' W  Y. b& Q
                                newDirection(@);   
7 h- x5 @( U2 Z# H/ k7 B                                if @.Destination /= void then6 V/ b; n. l: O* v, W9 Z; ~
                                        @.Destination.NumReservation :=
1 W- H* b8 b) R# s- f4 R7 J! _, u                                        @.Destination.NumReservation + 1;
+ E1 `" I) H# T. U! {! f& t. @                                end;! r+ `) C% G+ V9 r
                                @.CurrIcon := "drivingHome";
8 ]$ r: p  K- m1 {9 n4 g: ^& N7 S9 \                                @.DrivingHome := true;
! o; _8 r  d4 F8 C7 x+ R                        end;* N- P" Y0 c. [/ k* u9 E2 T; H
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 H# j+ x" k. I$ v. r7 ]9 q
                        part := @.transpOrder;1 j$ F( R# i) B# u+ ^/ V* Y
                        part.move(@);-- load part' i1 ^/ p- {2 f9 Y8 ~
                        @.CurrIcon := "load";
' j. s: P7 ^* z& W* j% b* o                        GlobalDistObj := part.globDestination;
; U9 A: i5 Y! p% u6 C, a                        assignLObj := rgmanager.rgAssignL;
: {* S5 V  E) B. e                        row := assignLObj.getRowNo(GlobalDistObj);
4 q3 c" Y4 H# q+ A                        if Row = -1 then -- since 70
* E) U0 V% e+ \                                if lan=1 then
) ~( x/ l4 `7 D3 C: M                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),  d- Q7 P6 C- L. I; x, ^) a
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
' M+ \* @8 w! V                                else! J  x8 S/ U; W0 @* d0 ?2 B5 ~
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ z2 p. C5 G) K( r1 K( {+ i) d) z
                                                to_str("in docking station: \"",?.~.name,"\""));                                ! ?8 S0 D- o# S
                                end;
- Y% U9 C8 V7 M, n( i                        else. [# F! l3 B4 X9 D) ^% S6 J: _
                                @.Destination := assignLObj[1,row];2 {4 Y6 T: ~+ q$ c1 V) U
                        end;                       
5 r' `( t$ V8 R- M7 l8 |                        newDirection(@);* c6 o9 H: o- b1 z6 n! H
                        @.HasOrder := true;
& Q% S2 p9 J1 R( N3 }                end;
/ h+ `& ]( C5 q! S# R        end;
8 v9 w6 {, j( }6 U8 Send;        -- of the method
* \3 T7 q" d% N& s8 k5 q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
/ I% S( L6 p! `& w2 v7 E) m
, A  }* C7 @* O* M" `; s4 `1 q这是AGV_putin中arrive的method。, F; Z' C# Y/ q7 i' h
3 p' a# a4 Z  |% E+ g! F
当到达物料速度越高时,这个报警更多,- V$ S; K4 ], i% i, U  U: A; x0 m" C0 D
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
  Z0 ?, ?% x4 t* f1 J, x程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
4 g, Y0 ^, d9 d: y3 B9 i% n8 y" d* @) S, K- B) v, @) @* W% C
另外一个小建议,就是move,所有的move都可以这样
# a( t2 v. ^& _1 zif not move() then debug end, J1 |5 Y6 J6 R$ s7 ~+ q
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
( H% S& `) `" E: l2 Xplant simulation中的free libraries有AGV模板,
  w9 J& d5 {" a7 J# E里面也有案例。) B% b' M) ?2 _8 V5 F. Z6 h
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。6 ^) U# B- z1 ]. ~% @* J( U

4 ?1 f) N9 w+ B我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
# D9 X% ?9 D0 J& Z4 H6 S* y3 T, F, |/ p& y) K: G6 u
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
5 v. r8 e9 o9 ~: [1 `这是AGV_putin中arrive的method。$ N2 o7 E0 ^! a
4 i: ?4 z6 b+ n$ }! n7 J
当到达物料速度越高时,这个报警更多,

8 ]" e2 M+ d/ j+ ^) _* i, c' D$ {另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-6-29 12:03 , Processed in 0.016056 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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