我正在尝试在数据集上使用proc optnet,如下所示:
CITY_NAME from LAT LON to LAT1 LON1 weight City_1 1 42,40393 69,875266 2 42,430774 69,857084 3,336327596 City_2 1 43,661035 51,152165 2 43,683002 51,178324 3,22605013 City_3 1 43,661035 51,152165 3 43,650012 51,151761 1,225149669
并在同一代码中为每个CITY_NAME使用proc optnet,类似“分组依据”
data clusters;
set WORK._DATASET_WITH_CITYNAME_;
proc optnet
loglevel = moderate
data_links = WORK._DATASET_WITH_CITYNAME_
out_nodes = NodeSetOut4;
tsp
/*out = TSPTour*/;
ods noresults;
run;
%put &_OROPTNET_;
%put &_OROPTNET_TSP_;
run;
结果,我得到了一种最佳的方式来访问整个数据集,而不是除以CITY_NAME
如何获取按CITY_NAME值分组的optnet?