Optimally Creating and Assigning Work Orders Based on Routes
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 38/100
Research direction
Start with the “Optimally Creating and Assigning Work Orders Based on Routes” notebook and run the shown worker-assignment cell with representative route and worker data. Check whether removing a worker causes later iterations or assignment creation to fail, and consider the issue done when the notebook consistently creates the expected assignments without an empty-worker error.
Written by the indexing model from the issue text.
Description
Hello,
In the 'Optimally Creating and Assigning Work Orders Based on Routes' notebook there is the following code:
assignments_to_add = []
for _, row in routes.iterrows():
worker = random.choice(workers)
workers.remove(worker)
route_stops = stops.loc[(stops['RouteName'] == row["RouteName"]) & stops['globalid'].notnull()]
for _, stop in route_stops.iterrows():
assignments_to_add.append(workforce.Assignment(
project,
assignment_type="Inspection",
location=stop["name"],
status="assigned",
worker=worker,
assigned_date=datetime.now(),
due_date=stop["DepartTime"],
geometry=stop["SHAPE"]
))
assignments = project.assignments.batch_add(assignments_to_add)
I think the line workers.remove(worker) should be removed because then in assignments_to_add.append() the worker=worker will give an error of empty list. Am I wrong?
Thanks
- Dominant language
- Jupyter Notebook
- Stars
- 85
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Esri/workforce-scripts
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
Esri/workforce-scripts#102 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Esri/workforce-scripts#98 · 2 comments ·
All issues in Esri/workforce-scripts
Similar issues
-
sponsored
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
microsoft/navcontainerhelper#4217 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
use-agent-os/agent-os#3314 ·
-
agentic-workflows
Difficulty 1/5 Under an hour Newbie friendliness 85/100
githubnext/rig#534 ·
-
documentation low-priority templates
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
jesseray718/openroot#87 ·