0

I have a large, several step model that iterates through feature classes in a folder taking several time-stamped lat long points and populates several fields in the attribute table. After the model is complete, I am looking to establish and if/then statement based on the derived 'KMPerHour'. If any records are above 40KPH, I need to remove the points that are above the that threshold, and repeat the entire model using the subset of the data. Once all segments are below the 40 kph threshold, the model will stop. I know that I will need to use a while loop, but am unsure how to do so. I am attaching two screenshots. One is a screenshot of the end of the model, and the other is the beginning of the model with the iteration. if someone could help with the next steps to establish the if then statement:

If all records of 'KmperHour'<40 then stop the model else delete all points above 40 and use the new dataset as the input of the model.

enter image description here

enter image description here

2

Quick and dirty solution: Iterate (While) until the max road is <40 kph, using your SORT function to find the road with the highest KPH. Then Select all but that road. Then connect a feedback loop from the output variable back to the original dataset; each time the model runs, it will exclude the road with the highest KPH, and will continue to iterate until the kph variable is under 40.

  • +1. While loops are made for this type of iteration. You'll need to create a nested sub-model though as you can only use one iterator per model. – Paul Nov 18 '15 at 7:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.