设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8020|回复: 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'
1 J* B* x8 Y5 x. x7 A1 e$ s. B*/9 C! J& u8 q5 z( f+ [  x
is9 S, u& k6 s- l' f# D/ P7 H4 X
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, M% D: R, }! `$ v$ N9 Q. y. [do
6 w+ E% F5 Z* B2 `( g# q& @        Lan := rootfolder.Internal.Tools.AOLlanguage;
2 k. V, u5 i& B        if current = @.Destination -- else return
# y/ b* P( Z) C, G. _4 G/ |9 w        then' q) ~1 q$ O/ m- O1 A* n' x
                @.Destination := void;$ \( i4 z2 [+ D8 r
                if @.occupied then0 S* ^3 p4 W  Q) R4 P- B$ N1 o
                        part := @.cont;
( y$ G# b9 B" f+ C" R- C) Y0 J+ b0 d8 I' b                        @.transpOrder := void;# a4 F! W3 Y1 c/ }% Q! s$ u+ P
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) \9 l* Q3 T8 ^' N6 L% {                                @,root.eventcontroller.simTime);6 A, z: r' f; d( f4 S5 P9 y& E) g. r
                        @.HasOrder := false;
; c& H4 i% v$ A4 [  ^1 h) R                        @.DrivingHome := true;
! p& z4 B! b- f- l5 |                        rgManager.tryToStartTransOrder;
/ G3 a+ b9 e3 I7 ~                        if @.Destination = void% G6 \' o' f8 B: _
                        then -- no transport order for vehicle @
, t; C0 T6 i1 B% L                                @.Destination :=, S' r: L, M4 B4 w/ s
                                rgManager.nearestFreeStation(@,track.~);- H$ o7 Z; ^* ?8 r0 J9 s! G0 c# }$ C
                                newDirection(@);   
' O# \" x3 x  n2 {, h6 b                                if @.Destination /= void then
0 k  e  R& f% X+ p( g                                        @.Destination.NumReservation :=
7 p8 ]$ z/ s9 r9 C                                        @.Destination.NumReservation + 1;! \& x7 N3 e7 j5 w
                                end;& S- X2 r% c: F2 P6 v3 v
                                @.CurrIcon := "drivingHome";/ u* d( D; z2 z  W$ v8 R
                                @.DrivingHome := true;
8 {$ {& m  a  q1 K                        end;
. H0 j, m  D  v6 D' L! L                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! A/ m6 {- a& t0 [& \7 _4 o6 B                        part := @.transpOrder;
4 }. ^0 C. L4 J" J% {5 ^" o& @                        part.move(@);-- load part* r4 F$ y0 Q# ~( d; h' z+ W& u) w
                        @.CurrIcon := "load";
( Q! J" A4 O. B  U/ {                        GlobalDistObj := part.globDestination;
, r/ Q% _6 [" Y1 E8 N                        assignLObj := rgmanager.rgAssignL;
5 T' ^* U3 j6 A8 u6 L" t                        row := assignLObj.getRowNo(GlobalDistObj);* Y6 z; a8 B$ [) g! w
                        if Row = -1 then -- since 70
% {) x: t- _' Y$ h2 o7 S; L4 b                                if lan=1 then
# ~4 h7 `/ u6 A1 a. q8 N1 Z- \- c" f                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( ~2 C3 `1 i8 S2 n! ]                                                to_str("in der Andockstation: \"",?.~.name,"\""));
! u7 y0 T  b% a, g5 `& o* f9 S                                else+ L9 Y* Z. A$ N. U7 X' k" G
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% A; I: f) ?3 O/ V2 h! [8 T3 F' h; s
                                                to_str("in docking station: \"",?.~.name,"\""));                               
# L# `; @4 C. X4 H3 N$ d                                end;
, n( p# @# n3 Y8 i* }3 A' C                        else, e5 d3 E3 A9 H6 N# h
                                @.Destination := assignLObj[1,row];
# E$ `- @+ I+ \$ R- N                        end;                        7 f0 S: c) ?1 @1 l* r+ X1 f: l
                        newDirection(@);) |. [; O" F* [* X/ t4 Q
                        @.HasOrder := true;
& P/ R" {6 ]6 i# K9 g                end;  p* }2 w2 u- z" Z; A) R
        end;( j. n9 H" D  k: Q8 }+ K5 M1 m
end;        -- of the method" P: h, D; V$ h2 E7 q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
/ t3 V$ Q/ F& l/ |
$ D5 r. B3 P8 L' W1 w0 Q这是AGV_putin中arrive的method。' r2 Q( z% w, E. D. I! i

1 K7 n- j6 B& R$ }  s$ n3 b. f* e: H当到达物料速度越高时,这个报警更多,7 ?/ A' n( B4 n; a4 y
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
! H- g' T" b, \5 W; f: u# j程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
% f, a: a: Y+ j$ t$ F5 h9 V  `% O6 o' |* p, Z
另外一个小建议,就是move,所有的move都可以这样
' G6 A. X8 G: u! mif not move() then debug end
2 {7 \5 H7 U0 K- r这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。3 T& S& c( n' E" Z1 S- t  z
plant simulation中的free libraries有AGV模板,
, h  r2 w# b8 I* a: @里面也有案例。" P3 A: A! T1 v4 ?& O
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
3 Z! S$ w" q$ [& e* Q* x" G
6 z0 I7 L+ H  v& d: P. l我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 + l: Z7 q$ g, E0 V
* I- v6 Q$ G: l8 n' ^
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 5 ?) L) Q5 F; \& G* F. A1 v
这是AGV_putin中arrive的method。
) U6 X; I" \3 ?5 p( e0 F- h- V* Y& Z3 I2 j& Q
当到达物料速度越高时,这个报警更多,

# `+ G6 C$ p0 c7 _# v另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-11 06:58 , Processed in 0.018696 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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