设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9333|回复: 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'
6 k/ q5 z: ~0 p7 `: g9 q*/
9 Q& _- }2 H. k- p! p  Ais: F/ E$ `! P" [$ m6 x
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. C) d: I8 U' R  Vdo$ B; E0 Z$ A+ ~0 M, G
        Lan := rootfolder.Internal.Tools.AOLlanguage;6 K7 |& d7 d  M5 j/ D# {+ k
        if current = @.Destination -- else return
* n; G6 B9 h' @1 G3 Q        then6 U; k% m3 ?" j7 ^0 O
                @.Destination := void;* O, m5 d# |* ~- y/ g1 Y
                if @.occupied then7 q3 i% e" T; J0 c# I1 _
                        part := @.cont;1 f. t( ^' e  q% v- S/ S  h
                        @.transpOrder := void;& s8 s& _2 @2 v8 h5 X6 {9 e
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. Y& U0 Z' s* q6 J
                                @,root.eventcontroller.simTime);
" K4 ~7 m% e, I                        @.HasOrder := false;3 p+ b) z3 J* A- M8 f6 x9 Q
                        @.DrivingHome := true;
6 J( E; n* c0 `: \                        rgManager.tryToStartTransOrder;
7 M1 G: Q, `" s5 C" }                        if @.Destination = void
( \2 t  b9 U+ ^5 ]1 m                        then -- no transport order for vehicle @  d& Q; c( V- ?5 y7 G$ e
                                @.Destination :=0 v: {( k' W% I% P
                                rgManager.nearestFreeStation(@,track.~);
" Y5 M* P- q% s, S' B                                newDirection(@);   
) [; Z( C% f, t1 Q                                if @.Destination /= void then1 b1 S( b, X! P+ s
                                        @.Destination.NumReservation :=- n' |& J" b" c) ~; c
                                        @.Destination.NumReservation + 1;9 N! f9 J2 ^0 L9 B( @
                                end;# ~, [$ A. n# m* w
                                @.CurrIcon := "drivingHome";* l: P$ g( g& w/ I$ O
                                @.DrivingHome := true;0 L7 \' P0 O: r/ |
                        end;) r- q# }' w. c
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 r2 f, P8 E6 t# `( B3 D' P; q                        part := @.transpOrder;
1 T- {) z+ d* ^9 Z                        part.move(@);-- load part
6 \( h9 v# A/ I8 F+ ^, J& u" C+ ^& n                        @.CurrIcon := "load";
0 W- v" {6 I+ g  {                        GlobalDistObj := part.globDestination;
; \5 t; U$ F6 T, a+ X; d                        assignLObj := rgmanager.rgAssignL;
' _9 P6 X3 x* A, ^                        row := assignLObj.getRowNo(GlobalDistObj);
( J4 Q3 I% @+ W$ \- _                        if Row = -1 then -- since 70( p- G, H+ d9 g8 P1 L1 P
                                if lan=1 then1 s( |" n2 e' O6 m+ c! j6 V# i
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# q/ a# O) Z- j, L( b
                                                to_str("in der Andockstation: \"",?.~.name,"\""));6 }$ Y) ~! P$ T2 N" I+ w1 i
                                else
4 ^6 R- P0 X; V: F1 m* x0 S' P. Y                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! `, B6 l0 F* B4 E- R! V; n1 |                                                to_str("in docking station: \"",?.~.name,"\""));                                4 ~& ?( Y4 Z+ B2 b
                                end;
3 ]+ ?8 p6 y6 h( ]3 M                        else4 Z0 M) U0 ]$ ]& F
                                @.Destination := assignLObj[1,row];6 H+ p8 W1 l. }" u. z9 I% C
                        end;                       
1 `0 l! ^% k8 b% n                        newDirection(@);
' g# D* D% b  M8 ], j5 e3 R- m3 N8 w                        @.HasOrder := true;
1 w# O4 V* u. ~! Q! ?& }                end;2 d- H4 Z8 L) r2 B7 T
        end;
$ t7 m* d& C3 `. v2 `5 ]end;        -- of the method
+ T4 O* V, S/ c. |/ a
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
. l9 ~0 Z& z' V( i; V$ e$ U
( O  I. a6 c- ?: k3 W9 j这是AGV_putin中arrive的method。: |+ Y' u- s) f9 A6 R# a( R! ^

* k1 e# M* R$ V1 P/ c当到达物料速度越高时,这个报警更多,/ j; K) [( [2 l- O9 e; r
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。3 A4 ]( z: b3 O8 \. J, O
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?6 q( p& A4 l2 j- ]) |) B

' X! S1 F& Z: O8 h另外一个小建议,就是move,所有的move都可以这样
% C; v- H' M" E. oif not move() then debug end9 A" p. j3 K2 x5 d' z: v
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。( v* @# p* n7 v/ x. _/ Q9 i
plant simulation中的free libraries有AGV模板,
, M5 O" _: \2 @4 ]1 o2 m) t9 Z) k里面也有案例。6 z2 i+ W! O7 E2 }4 t+ r
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。4 f# N: ^" o; ^2 q* M/ W
3 @& B4 l' p* Q, Y' ^
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
* X( H" R1 \* o* P8 k
; \1 J/ ^$ [& h2 n% ~# o那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 + B: N  y) ]0 S6 {+ u
这是AGV_putin中arrive的method。1 J0 b% ]) G- }4 i

6 s/ [- D, v; z- H; j+ h当到达物料速度越高时,这个报警更多,

4 z( A: y% Z8 p6 j另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-26 00:59 , Processed in 0.015601 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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