设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6295|回复: 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'# t! [; Z) G; ]8 j  _
*// A7 j; F% u, X3 Y
is
! L: S; K. c, _# Y$ [. `4 c        part, GlobalDistObj, assignLObj:object;row,Lan:integer;( f/ P! c/ Z# e; D* X! C' r
do
4 N( y' K; A( ]4 b5 w        Lan := rootfolder.Internal.Tools.AOLlanguage;
& }# s, F0 e. ]9 ^) C        if current = @.Destination -- else return
. q# B) D- B) L$ h' `. E$ b        then
. l( p# ^" C+ J6 V. b' r                @.Destination := void;2 D- Y% X. Z8 \0 D5 a6 I
                if @.occupied then2 Z3 e# u' H8 @! h) `* r
                        part := @.cont;
! z- Q* W: p% M  k                        @.transpOrder := void;: T6 t' ~/ F9 \/ M4 F
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 @& L3 K: r7 r' U! N) T
                                @,root.eventcontroller.simTime);
- }! A. E3 }9 I  }# G. ?2 S                        @.HasOrder := false;7 ~" @. k3 L7 q# Q
                        @.DrivingHome := true;
& t4 G5 J3 H% z5 g+ Z3 E                        rgManager.tryToStartTransOrder;3 J! O7 v6 @5 Z+ a) H% a7 c" @# [8 A% v
                        if @.Destination = void* _. d" M! {& }7 x5 Z
                        then -- no transport order for vehicle @
  e8 j* b4 ~; }9 a& P7 m/ g                                @.Destination :=
3 k3 N) m6 t$ `+ X4 C( A- B                                rgManager.nearestFreeStation(@,track.~);8 v; D0 u( h' `" }
                                newDirection(@);   ; U3 W: B* h5 Z% ^& L0 |. f5 B+ x7 L8 m
                                if @.Destination /= void then" \# S  n' I+ N! y- n
                                        @.Destination.NumReservation :=9 g: y  J4 R2 U
                                        @.Destination.NumReservation + 1;* Y% Z& j! n' {7 s9 K- B3 Y
                                end;
8 l& c- w2 ~* M: X7 O) ?                                @.CurrIcon := "drivingHome";
+ l# j# k5 L$ U: |                                @.DrivingHome := true;
+ K1 w) F8 _- ]! k0 b& z: Q, X                        end;
& T" Q4 r* v' _, O                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& K5 A0 V: r! p$ L1 \" a% v* E5 \                        part := @.transpOrder;4 R1 M8 K2 D, L
                        part.move(@);-- load part
* I9 {8 D/ [8 C3 R- f: |                        @.CurrIcon := "load";
2 r2 r" e. g# v. z: F                        GlobalDistObj := part.globDestination;- O+ }  @8 r/ R. [0 J9 T% u5 B
                        assignLObj := rgmanager.rgAssignL;
9 _4 ]5 n4 X8 z  U2 X2 ?                        row := assignLObj.getRowNo(GlobalDistObj);
; _/ c( |& ~+ C. ~% e8 H                        if Row = -1 then -- since 70
% J! N& D' n' {" f- |% B0 [                                if lan=1 then% B* K9 b* C8 K3 T! }( Q5 n2 ]7 V
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ N  x# q. O8 H& s/ {  }! {
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
& l( ?/ @% Q  l                                else8 y* W/ v9 W3 m' y
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' X9 h8 }+ Y  a% M  b8 w& k' d3 l                                                to_str("in docking station: \"",?.~.name,"\""));                               
% G) J0 k0 E- ?) a/ u: u                                end;8 Y3 y9 e; L9 N: |
                        else
; u' R; c$ l, S4 F* U6 Y- k% [                                @.Destination := assignLObj[1,row];
% W: q( j$ o7 d& X9 o                        end;                        ' @/ p* M- ]" }. M! `
                        newDirection(@);
5 D3 t3 ?6 {) D! j! B6 a                        @.HasOrder := true;
! a4 _( @8 M; F( ^                end;8 a9 ]) ]) O8 ~
        end;
0 B: l( _0 |/ {) f; Vend;        -- of the method
" v4 Z$ m3 a- v
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
* I; y  j( W9 H" Z, Y* z" O1 x, Z- F
这是AGV_putin中arrive的method。
6 E4 i0 }4 g8 V1 H: C" X9 `4 s( K8 J5 |0 }: a
当到达物料速度越高时,这个报警更多,
. H4 u8 X' A5 ~可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
! {4 y. z) W) v$ R$ ?程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
5 u9 Y( j0 g  B' P( r* L
- I& E* [6 z: z) E- U6 S. r9 w另外一个小建议,就是move,所有的move都可以这样+ j  G4 z, G- O9 N- G4 ^. H
if not move() then debug end9 L) b  ]. S3 W  l9 c) ?, C% ^
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
: [" o5 P# D/ e$ `. R' H- Splant simulation中的free libraries有AGV模板,3 g) O7 Z! a  H  C9 Q- _/ ^$ l
里面也有案例。  t5 V6 ?& S0 ~7 J) _/ h: l
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。: n- _1 }# r( ]3 ^/ D5 g4 w
* R. A, U. w  K1 w  Z
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 3 p% U0 L1 M8 |. o7 @

8 R* Z2 `+ p2 `* p" b% v那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
0 [+ y" N1 }( ~2 d这是AGV_putin中arrive的method。
% y( W, A' T) _* \' P4 t, r1 w3 g1 M) D- A  R
当到达物料速度越高时,这个报警更多,
2 _& P# r- F# x9 }1 }4 E+ S
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-29 10:46 , Processed in 0.021409 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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