@@ -137,9 +137,12 @@ public class Analysis : IModule
137137 [ RunParameter ( "Attribute ID" , "" , "The attribute to use for analysis." ) ]
138138 public string AttributeId ;
139139
140- [ RunParameter ( "Aggregation Matrix" , 0 , "The matrix number to store the results into." ) ]
140+ [ RunParameter ( "Aggregation Matrix" , 0 , "The matrix number to store the results into. Leave 0 to not apply. " ) ]
141141 public int AggregationMatrix ;
142142
143+ [ RunParameter ( "Selected Link Volumes" , "" , "The name of the link attribute to store the results into. Leave blank to not apply." ) ]
144+ public string SelectedLinkVolumes ;
145+
143146 [ RunParameter ( "Operator" , "+" , "The operator to use to aggregate the matrix. Example:'+' for emissions, 'max' for select link analysis" ) ]
144147 public string AggregationOperator ;
145148
@@ -169,12 +172,6 @@ public bool RuntimeValidation(ref string error)
169172 error = $ "In { Name } the attribute ID was not valid!";
170173 return false ;
171174 }
172- if ( AggregationMatrix <= 0 )
173- {
174- error = $ "In { Name } the aggregation matrix number was invalid!";
175- return false ;
176- }
177-
178175 return true ;
179176 }
180177 }
@@ -222,6 +219,7 @@ private ModellerControllerParameter[] GetParameters()
222219 new ModellerControllerParameter ( "ResultAttributes" , string . Join ( "," , Classes . Select ( c => c . VolumeAttribute ) ) ) ,
223220 new ModellerControllerParameter ( "xtmf_AnalysisAttributes" , GetAttributesFromClass ( ) ) ,
224221 new ModellerControllerParameter ( "xtmf_AnalysisAttributesMatrixId" , GetAttributeMatrixIds ( ) ) ,
222+ new ModellerControllerParameter ( "xtmf_AnalysisSelectedLinkVolumes" , GetelectedLinkVolumes ( ) ) ,
225223 new ModellerControllerParameter ( "xtmf_AggregationOperator" , GetAggregationOperator ( ) ) ,
226224 new ModellerControllerParameter ( "xtmf_LowerBound" , GetLowerBound ( ) ) ,
227225 new ModellerControllerParameter ( "xtmf_UpperBound" , GetUpperBound ( ) ) ,
@@ -247,6 +245,13 @@ select string.Join(",", from at in c.PathAnalyses
247245 select "mf" + at . AggregationMatrix ) ) ;
248246 }
249247
248+ private string GetelectedLinkVolumes ( )
249+ {
250+ return string . Join ( "|" , from c in Classes
251+ select string . Join ( "," , from at in c . PathAnalyses
252+ select at . SelectedLinkVolumes ) ) ;
253+ }
254+
250255 private string GetAggregationOperator ( )
251256 {
252257 return string . Join ( "|" , from c in Classes
0 commit comments