I有一个集合(位置),其中包含理论节点名称
l1,l2,l4,l6,l11,l13
如下定义。 lall.csv
只是一个带有一个列的CSV文件。
l1,l2,l4,l6,l11,l13
I有一个大型模型,该模型是在集合l_east上定义的,该模型是LALL的一个子集。 l_east包括地图上这些节点东侧的所有位置。 D集由两个方向组成:“ East”和“ West”,其中L1,L2,L4在东方,L6,L11,L13在西部。 set l_east包括l1,l2,l4和l_west包括L6,L11,L13,这两个也是从CSV文件定义的,
set lall "all locations"
/
$offlisting
$include data%ds%lall.csv
$onlisting
/ ;
由于该模型是在集合l_east上定义的,并且我无法更改的所有语句和约束,我想为l_west中的位置归零一个参数。所以我要做的是:
set l_east(lall) "all model locations (locations in the east)"
/
$offlisting
$include data%ds%l_east.csv
$onlisting
/ ;
set l_west(lall) "all locations NOT in model (locations in the west)"
/
$offlisting
$include data%ds%l_west.csv
$onlisting
/ ;
但后来,有一个声明,我需要使用ord(l_east):
parameter param1(i,lall,c,b)
/
$offlisting
$ondelim
$include data%ds%param1
$offdelim
$onlisting
/ ;
param1(i,l_west,c,b) = 0;
我有一个错误:
alias(l_east,ll_east);
set param2(l_east,ll_east,t);
...(some statement to specify params2)...
param2(l_east,ll_east,t)$(ord(ll_east)<ord(l_east)) = no ;
这是因为我定义了l_east在lall上?这似乎很简单,但我无法正常工作。我试图在没有(lall)的情况下定义l_east和l_west,但我只是违反了域错误。关于如何完成这项工作的任何建议吗?谢谢
this看起来像元素的顺序
Set used in 'ord' or lag is not ordered.
Hint: Some of the elements of the set were used before this was initialized and the order was different from the order used in this set. Try to initialize the set earlier.
$offOrder allows lag operations on dynamic sets, reset with $onOrder
与l_east.csv
lall.csv