流年堪佳 发表于 2015-7-22 18:57:21

批次跟踪模型

建了一个批次跟踪的模型,但怎么也调试不好,模型已经上传,请求帮助指导

qitianyanluo 发表于 2015-8-6 15:05:03

首先inprep文件高程设置应该改成1.515
+ TABLE
+ PIPE.DIST ELEV MAOP
0 600.066 1180
1.515 100.066 1180
其次定义intran文件定义次序有点问题,给你参考一个入门教程上的
DEFINE BATCH_CTRL = 0
DEFINE.SEQUENCE L_GAS (_SIZE_)
{ OPEN B_GASOLINE
POKE B_GASOLINE:CF = 0
WAIT.UNTIL (B_GASOLINE:CF >= _SIZE_) /*累计流量
SET BATCH_CTRL = 1
CLOSE B_GASOLINE }
DEFINE.SEQUENCE L_DIESEL (_SIZE_)
{ OPEN B_DIESEL
POKE B_DIESEL:CF = 0
WAIT.UNTIL (B_DIESEL:CF >= _SIZE_) /*累计流量
SET BATCH_CTRL = 0
CLOSE B_DIESEL }
DEFINE.SEQUENCE L_WATER (_SIZE_)
{ OPEN B_WATER
POKE B_WATER:CF = 0
WAIT.UNTIL (B_WATER:CF >= _SIZE_) /*累计流量
SET BATCH_CTRL = 2
CLOSE B_WATER }
DEF.SEQ LBA (_SIZE_)
{ WAIT.UNTIL(BATCH_CTRL = 0 )
SUB.SEQ L_GAS (_SIZE_ )
WAIT.UNTIL(BATCH_CTRL = 1 )
SUB.SEQ L_WATER (_SIZE_ )
WAIT.UNTIL(BATCH_CTRL = 2 )
SUB.SEQ L_DIESEL (_SIZE_ ) }
WHENEVER ((N3:NFLU = WATER & B1_WATER:ST = CLOSED ))
{OPEN B1_WATER
CLOSE B1_GASOLINE
CLOSE B1_DIESEL }
WHENEVER ((N3:NFLU = GASOLINE & B1_GASOLINE:ST = CLOSED ))
{OPEN B1_GASOLINE
CLOSE B1_WATER
CLOSE B1_DIESEL }
WHENEVER ((N3:NFLU = DIESEL & B1_DIESEL:ST = CLOSED ))
{OPEN B1_DIESEL
CLOSE B1_WATER
CLOSE B1_GASOLINE }

流年堪佳 发表于 2015-8-7 16:56:59

qitianyanluo 发表于 2015-8-6 15:05
首先inprep文件高程设置应该改成1.515
+ TABLE
+ PIPE.DIST ELEV MAOP


其实我最开始就是按照你给的intran文件那样设置的,但是也不行,我后来才改成这样的,但还是不行。还有什么修改建议,请不吝赐教。

724037414 发表于 2023-2-12 23:19:16

最后解决了么?

祁罪西楼 发表于 2023-8-13 16:56:39

我一直有个问题,sps要编程,在哪编啊
页: [1]
查看完整版本: 批次跟踪模型