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

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Nov 18, 2015 at 4:30

1 Answer 1

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.

answered Nov 18, 2015 at 6:28
1
  • +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. Commented Nov 18, 2015 at 7:19

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.