设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9491|回复: 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', G$ ~" k( T" z" c6 [5 Q5 [1 C
*/
1 w" V# a! U% e) J+ xis
  ]8 F' `+ a/ X; r5 g        part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 c' k- R- c9 J1 N2 {, E0 e
do" ^/ O8 G% Q% z( A4 f
        Lan := rootfolder.Internal.Tools.AOLlanguage;
) {5 J& Y0 M% Q/ b        if current = @.Destination -- else return2 q. u* T% v- Y3 I" R
        then# r! Z" \% Y3 L/ i8 ?
                @.Destination := void;- H% _: b. r; X/ m
                if @.occupied then
1 b' A; v. r) h                        part := @.cont;
! c# F3 _7 u+ t$ ^# {( b                        @.transpOrder := void;
4 Z7 `5 s' b$ ]3 C2 h) s9 q                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' t: c5 q, S$ u0 ?$ [4 j$ {( ~                                @,root.eventcontroller.simTime);+ K3 L1 @4 F# ?2 _
                        @.HasOrder := false;4 k0 `8 A* _9 A6 Y/ W
                        @.DrivingHome := true;4 f) y& f9 n: H4 V. A) s
                        rgManager.tryToStartTransOrder;
1 W, g3 F+ I6 j# M8 j4 J8 k                        if @.Destination = void2 ]# F: O# n4 U; o5 x* X& `
                        then -- no transport order for vehicle @
6 u% f1 e) i0 U! m                                @.Destination :=
0 L+ R: w( C2 Z7 o* n+ G" ^6 u0 U: F                                rgManager.nearestFreeStation(@,track.~);5 [9 ^, x/ l8 v* L# l3 L
                                newDirection(@);   9 m# n7 S+ p/ y2 E3 Q' t
                                if @.Destination /= void then
% x1 h: L7 P  f) g8 K  f0 \2 i. D                                        @.Destination.NumReservation :=& C) e* a6 J( j
                                        @.Destination.NumReservation + 1;
9 t$ n3 }. Y: h8 l% c& s" @                                end;
( l8 E9 R+ g) J% R                                @.CurrIcon := "drivingHome";( j  U# o7 b7 i1 D) y0 x
                                @.DrivingHome := true;
# ]3 ~. y$ }% n" _8 {6 Q                        end;7 r/ t) n! q# @* [1 `
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station' X6 P9 p# f' I' f6 c9 q" b( Y
                        part := @.transpOrder;( U  M- C1 O1 y
                        part.move(@);-- load part
. t: ~6 y, ?5 i+ R- ~                        @.CurrIcon := "load";
* H7 O, j- q+ L0 b                        GlobalDistObj := part.globDestination;9 U, h% F2 p# u( \
                        assignLObj := rgmanager.rgAssignL;; E% O8 e* j: R/ U: C% ?2 ~
                        row := assignLObj.getRowNo(GlobalDistObj);
9 E6 {) \5 P( K% d; i6 ]; {7 W8 C                        if Row = -1 then -- since 70
1 K( C. u( q( i                                if lan=1 then
; @& O, _" i! g8 _5 p4 h                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, }; G3 k8 r8 J* M9 u                                                to_str("in der Andockstation: \"",?.~.name,"\""));" c% O3 R* @4 P1 y/ O* ]3 A1 P
                                else: t1 {: W  {2 I# R2 @2 E
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ q) }0 O  u$ [8 G4 m" R1 Y8 f
                                                to_str("in docking station: \"",?.~.name,"\""));                                9 W$ L2 q/ L! r- l1 B$ W
                                end;- \0 U! e6 u& U. }+ U
                        else- @' D+ |8 ^# @, s
                                @.Destination := assignLObj[1,row];+ {! b4 U- @" V, j1 m
                        end;                       
# z, C, k1 w- Q: g+ a                        newDirection(@);; |( n5 _. y! ?% @1 Q: R
                        @.HasOrder := true;2 {, Q- T6 t5 [; S. N
                end;# J0 a+ B. z/ c. K% d! d5 O
        end;
5 m- Y0 M2 {8 K. s: Dend;        -- of the method6 ^( [6 ^- j  J( M' B
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
1 u- ~; p: }3 }4 M9 S; L! T' H6 x8 C4 ^7 b5 r& L) ]" L% c
这是AGV_putin中arrive的method。' e% S( q& X$ Z( ~

  f. c. A( y" M6 M9 {当到达物料速度越高时,这个报警更多,! h/ z/ D' z/ v4 B
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
% U3 J' P2 m2 E6 q程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?/ C; z$ X# K# x' a# g

* S, n% z& c/ [8 ~另外一个小建议,就是move,所有的move都可以这样$ Q, [) Y; S3 l* ]
if not move() then debug end
- u) s+ H0 O/ ~3 a/ }+ }这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
' @7 `! P# {( D* E" w: Y! Y; E, ~plant simulation中的free libraries有AGV模板,
  ]5 p8 x& w0 x里面也有案例。! M% p2 ]  \4 R7 M
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
# S9 b- K$ D  _1 E4 l, L& \' k1 I. y4 n+ T$ a: @, E" j# O  [
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑   H3 V' E3 U, v1 r

# M6 M, g9 ~+ {/ l5 K) n/ I那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
- X6 M0 j" i+ S2 y; \. C0 y这是AGV_putin中arrive的method。1 e+ j* J) T' ?* y9 c) U1 R

1 ~; [' ?4 F; M1 w当到达物料速度越高时,这个报警更多,
  u0 c* V! |! q
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-4 00:16 , Processed in 0.024755 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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