设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9348|回复: 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'' n4 A9 s" B0 e- f
*/
% s8 {3 X; }2 r8 G4 `! tis
4 k% d& [) Z3 w% T+ o. r        part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 M7 p9 t, V% p; a0 X3 e( |
do6 _' Q0 ]7 s- P+ j' n' u
        Lan := rootfolder.Internal.Tools.AOLlanguage;6 [7 u+ Y6 V( b, s9 ^
        if current = @.Destination -- else return
! M/ Z% |& j$ c' b. o1 E        then
! U3 Z0 ?: d7 F1 e2 h6 D                @.Destination := void;
1 S* L" K; y2 }2 X  k8 C9 J                if @.occupied then
9 m6 E8 E  P  s6 ?3 h                        part := @.cont;+ O: h- O$ z/ o- H
                        @.transpOrder := void;
, P5 M+ f, p) ?% w% P+ G3 v$ ~6 i# r                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# [3 @- E, J2 C                                @,root.eventcontroller.simTime);1 S3 k% Q: Y4 F- B( O
                        @.HasOrder := false;
0 V. Q- @. m) b* f3 ~$ t                        @.DrivingHome := true;3 E+ v7 N  j" h  `4 _
                        rgManager.tryToStartTransOrder;
6 I; Y' F0 K3 k1 H  `! v* f                        if @.Destination = void
% K0 e; C  p5 n                        then -- no transport order for vehicle @
6 l2 ~  I1 A( G+ Y6 u$ A0 ]' ^/ r5 h                                @.Destination :=( p, N% x& E9 }4 J5 Z* J1 t3 P# N
                                rgManager.nearestFreeStation(@,track.~);2 P9 I3 r. s' U% ]' @5 X4 o! S
                                newDirection(@);   % _5 ^, ~, \' K: \3 i0 @
                                if @.Destination /= void then
8 o! J. h& O' p$ g) J* K. P                                        @.Destination.NumReservation :=9 h+ ]0 b/ h- L9 F* a1 @, m
                                        @.Destination.NumReservation + 1;
; D6 i4 Z* D- I. ^5 E4 L+ i                                end;
( h, E, O1 t* d8 N" s                                @.CurrIcon := "drivingHome";
9 U- |) E$ n8 \9 K/ h+ Y, w                                @.DrivingHome := true;
' ~; c9 g. o! G9 T" Z, }! g" {' B                        end;
9 y& V* v: _! {                else -- the vehicle @ is empty, both vehicle and part are in the same dock station, t1 }* h: D. h! B
                        part := @.transpOrder;  c6 F5 X# f5 T! Q
                        part.move(@);-- load part+ z' }8 C- q5 D+ N: r
                        @.CurrIcon := "load";9 S$ `. z6 v8 {& \7 G* a  J  A
                        GlobalDistObj := part.globDestination;7 k% I0 w- K1 m0 E1 w! h
                        assignLObj := rgmanager.rgAssignL;- [& y, F% i  O" N( y# l
                        row := assignLObj.getRowNo(GlobalDistObj);3 L' j' @2 m9 R# V* l7 H& I! f% L
                        if Row = -1 then -- since 70
  M7 v. |( h1 f, s/ S( g  I: ~                                if lan=1 then2 O3 c# y/ Z1 X
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ R2 O  R  y; e# ]/ I  @9 @. _
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
# `: {: |: t  T* w' Y5 H                                else; I0 C) W/ k0 ]! C' v$ W) t. H
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% F3 I# f  `; I' s
                                                to_str("in docking station: \"",?.~.name,"\""));                                % r8 L8 F" m' ~5 M
                                end;0 g. N% ^8 Z0 J+ f7 P0 i9 M
                        else; Q7 Y9 u) q2 Z, P
                                @.Destination := assignLObj[1,row];
/ Q+ I$ C6 }+ d/ L. a+ {$ k" y! [                        end;                       
$ O9 Q2 ^7 |( K/ X' {7 O                        newDirection(@);+ S" x% m' I# H4 G  u  i& ?
                        @.HasOrder := true;0 }, R: ^1 s/ h1 I) \; l# T
                end;
/ A$ x/ @6 p/ V! U' z) N, N! z/ v        end;
2 p; I9 D" y3 A$ |) Rend;        -- of the method
# o) ]! B8 n( y4 r2 C
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
( w" h4 i, ?$ k+ s
+ r' x. p  }# L9 R2 ^, u这是AGV_putin中arrive的method。$ G  t) i  n1 [" T9 y
- o3 j& L' z" W
当到达物料速度越高时,这个报警更多,% T  C8 ?5 l* J# f- K
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。. z( q& Y$ V( r
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
. n2 ^0 b1 D, n9 n( L  W- S7 M9 G1 |
另外一个小建议,就是move,所有的move都可以这样
' P1 o3 _1 B- f+ m, X1 cif not move() then debug end
1 u1 R. [! W- O+ L( F+ S这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
5 Y7 `% a& F3 m6 zplant simulation中的free libraries有AGV模板,
* u) m7 _1 X7 i- t: p; h; ^里面也有案例。% B4 C  L$ `; ?% d# P8 E. y1 ]! F
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。* o* w0 P( a% j8 ]

. p% O' J- l$ Y: I! e- N我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 / ~  J; K8 S# a- D

' s2 H4 A: L" O7 Q& x那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 2 n6 F" O3 [3 J( U( @2 E# T
这是AGV_putin中arrive的method。3 r# {* C# m3 _2 y
( y8 b: M) {3 n0 D
当到达物料速度越高时,这个报警更多,
# D+ n" l0 ]! t2 S" T( b3 m0 R1 a
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-26 23:05 , Processed in 0.021542 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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