设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9726|回复: 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'
" i7 a3 Z8 x: }. _* N*/
4 i+ c0 `2 a5 {0 |+ m5 x( Gis4 P9 k1 p0 n" @8 m# i: V( U0 M9 d
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 E- Z2 W& c- q  Ldo
! k+ n0 [5 t( |+ m& v5 _3 [7 P        Lan := rootfolder.Internal.Tools.AOLlanguage;
6 H( f4 g1 l/ w8 V( d# Z+ w5 |        if current = @.Destination -- else return
4 _2 t% I, \" k# o; c$ G; W# Q        then
) `3 ]8 c/ }* f7 {                @.Destination := void;
: M+ }! d3 `) k7 y6 k  i4 b9 b4 F                if @.occupied then
% r2 i! o5 ]5 U                        part := @.cont;
* `! \3 W! p% i/ W$ f: J7 E* l# [                        @.transpOrder := void;& n- ^, Y# T( S' n$ n+ p
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( \0 {3 E( n8 i- ~. Y, t                                @,root.eventcontroller.simTime);9 C2 R9 n4 ?$ @! O/ f7 i, f, Q
                        @.HasOrder := false;
# P* w" w+ k1 E4 w0 a                        @.DrivingHome := true;: ?3 d* {* a+ k; ~) G* c
                        rgManager.tryToStartTransOrder;8 F/ G/ e2 K( t& f6 v3 |7 w
                        if @.Destination = void5 h0 q0 G( T0 H5 p) R/ B
                        then -- no transport order for vehicle @8 C6 G* S) y: |
                                @.Destination :=
$ q( s2 F/ D. K                                rgManager.nearestFreeStation(@,track.~);
% R$ x, m' ?. I9 ~7 [' I                                newDirection(@);   - E7 U! d$ N$ U6 k; s
                                if @.Destination /= void then5 Y) p  C4 g) ^2 m
                                        @.Destination.NumReservation :=& p' ?& G/ O1 z7 N: P8 [, b
                                        @.Destination.NumReservation + 1;6 g2 Y) C: h! L1 C
                                end;
$ X. l6 W, h0 r                                @.CurrIcon := "drivingHome";
, R1 s+ m; i; D8 [( d2 w                                @.DrivingHome := true;
. M5 T, V( a4 _# n9 i! j                        end;. O6 l# H8 ~  e- G
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 p/ B! w. j. s# ]7 u) i  i  E                        part := @.transpOrder;3 W) B1 K; u/ @8 g) @( s
                        part.move(@);-- load part& f; q4 }3 o+ X' X* a
                        @.CurrIcon := "load";, J; p( ^# g3 c
                        GlobalDistObj := part.globDestination;
+ _! C4 e9 [( F4 L- B                        assignLObj := rgmanager.rgAssignL;7 Y& X5 D. E9 o4 V$ N( Q
                        row := assignLObj.getRowNo(GlobalDistObj);" D( R  U2 p( `7 u6 Q3 U4 f
                        if Row = -1 then -- since 70
% P! ~# j8 z: n0 ^+ P/ n1 \( m                                if lan=1 then( K: Z; A. h. ?$ e
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),  L* m: M/ Q8 R- ~! G  c
                                                to_str("in der Andockstation: \"",?.~.name,"\""));- t& t3 m  f( {' t" R) O) I0 B9 G
                                else
3 I* E* a, @% j! V! K                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 r7 a8 P& n0 P2 {# X. ^
                                                to_str("in docking station: \"",?.~.name,"\""));                                . n. a$ P0 B8 `: `, ^* C3 Q7 P
                                end;
( z  m# v. F7 c) r                        else% H8 P( B3 I7 q) H8 F
                                @.Destination := assignLObj[1,row];
9 E/ ]4 E: m$ C8 f                        end;                       
( C- ?" w+ P/ w( K# t/ ~                        newDirection(@);
4 S, A- B6 r+ d4 i' Y8 e8 m                        @.HasOrder := true;" y8 K7 G4 V9 M- e/ l' H9 S/ y8 o
                end;
7 {# c0 k( u3 r7 s+ C        end;
# h  r; B, c6 ]6 B3 J! hend;        -- of the method. T( A5 `; E6 ]
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 - P3 a" s7 D0 T7 N! l2 C% T
1 _) V/ h7 A- Q5 s$ |
这是AGV_putin中arrive的method。
! K9 x# _$ Y* q
" w( s; R6 v! t+ b3 H8 I9 B1 l; p当到达物料速度越高时,这个报警更多,* w: ~+ t  N% Y
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。' O3 L! J6 g# K9 [7 z3 V
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
1 I9 O6 M3 x) |9 [* U: m! ~, T. p8 R
另外一个小建议,就是move,所有的move都可以这样
8 f, E5 s" u& ~' n: }8 W; Xif not move() then debug end- y4 h3 T4 j+ K8 m- V
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。; F' @+ {9 z! D
plant simulation中的free libraries有AGV模板,
  w, ^; b) A& h8 A8 n里面也有案例。
2 o% w- X! ~# `2 v, s$ b$ Q我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
0 P9 \  b) ^5 A5 K1 V
. z1 b% I3 u  D5 n我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
7 i8 r6 Z- k. Z% j; S8 [
; L9 R" d8 x$ j( T: M+ s2 ~那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
: }1 J. i! e5 @/ t9 N- h( ~这是AGV_putin中arrive的method。/ V5 E: F5 s! Z  D. \# p

; Z) ?8 p  y4 u# O" K. }2 k当到达物料速度越高时,这个报警更多,
0 ~# T" d6 {# c# ]0 x
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-20 14:51 , Processed in 0.019917 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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