Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
db-guided-mrmp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rmoan2
db-guided-mrmp
Commits
b05b4432
Commit
b05b4432
authored
1 month ago
by
rachelmoan
Browse files
Options
Downloads
Patches
Plain Diff
remove old print statements
parent
1ebd79e4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
guided_mrmp/conflict_resolvers/curve_path.py
+3
-3
3 additions, 3 deletions
guided_mrmp/conflict_resolvers/curve_path.py
guided_mrmp/conflict_resolvers/subproblems/subproblem_og.py
+9
-14
9 additions, 14 deletions
guided_mrmp/conflict_resolvers/subproblems/subproblem_og.py
with
12 additions
and
17 deletions
guided_mrmp/conflict_resolvers/curve_path.py
+
3
−
3
View file @
b05b4432
...
...
@@ -173,15 +173,15 @@ if __name__ == "__main__":
N
=
40
smooth_points
,
control_points
=
smooth_path
(
points
,
N
,
alpha
=-
.
5
,
sigma
=
0.8
)
print
(
f
"
smooth_points =
{
smooth_points
}
"
)
#
print(f"smooth_points = {smooth_points}")
# Example usage with a smooth path
# path_points, control_points = smooth_path(points, N=100, alpha=0.2, sigma=1.5)
headings
=
calculate_headings
(
smooth_points
)
# Displaying the headings
for
i
,
heading
in
enumerate
(
headings
):
print
(
f
"
Segment
{
i
}
: Heading =
{
np
.
degrees
(
heading
)
:
.
2
f
}
degrees
"
)
#
for i, heading in enumerate(headings):
#
print(f"Segment {i}: Heading = {np.degrees(heading):.2f} degrees")
# Plotting
plt
.
figure
(
figsize
=
(
8
,
8
))
...
...
This diff is collapsed.
Click to expand it.
guided_mrmp/conflict_resolvers/subproblems/subproblem_og.py
+
9
−
14
View file @
b05b4432
...
...
@@ -23,8 +23,8 @@ class Subproblem:
# These are still in the original environment's coordinates
self
.
temp_starts
=
temp_starts
self
.
temp_goals
=
temp_goals
print
(
f
"
temp starts =
{
self
.
temp_starts
}
"
)
print
(
f
"
temp goals =
{
self
.
temp_goals
}
"
)
#
print(f"temp starts = {self.temp_starts}")
#
print(f"temp goals = {self.temp_goals}")
# Location of the subproblem in the original environment's coordinates
self
.
top_left
=
None
...
...
@@ -104,7 +104,6 @@ class Subproblem:
# Find the best in the original environment
best_global
=
self
.
find_global_subproblem
(
S
,
find_best
)
print
(
f
"
best global =
{
best_global
}
"
)
if
best_global
is
None
:
return
None
...
...
@@ -562,8 +561,8 @@ class Subproblem:
if
prioritize_goal_assignment
:
self
.
temp_goals
=
self
.
assign_temp_goals
(
top_left
,
bottom_right
)
else
:
self
.
temp_goals
=
self
.
assign_temp_goals
(
top_left
,
bottom_right
)
print
(
f
"
temp starts afer reassignment=
{
self
.
temp_starts
}
"
)
print
(
f
"
temp goals after reassignment=
{
self
.
temp_goals
}
"
)
#
print(f"temp starts afer reassignment= {self.temp_starts}")
#
print(f"temp goals after reassignment= {self.temp_goals}")
row_range
=
abs
(
bottom_right
[
0
]
-
top_left
[
0
])
col_range
=
abs
(
top_left
[
1
]
-
bottom_right
[
1
])
...
...
@@ -581,9 +580,6 @@ class Subproblem:
x
=
bottom_right
[
0
]
-
x_count
y
=
bottom_right
[
1
]
-
y_count
print
(
f
"
x =
{
x
}
"
)
print
(
f
"
y =
{
y
}
"
)
starts
=
[]
goals
=
[]
...
...
@@ -591,7 +587,6 @@ class Subproblem:
start
=
self
.
temp_starts
[
k
]
goal
=
self
.
temp_goals
[
k
]
print
(
f
"
goal =
{
goal
}
"
)
start_x
=
start
[
0
]
...
...
@@ -723,7 +718,7 @@ class Subproblem:
return
True
def
find_subproblem
(
c
,
conflicts
,
S
,
robots
,
starts
,
goals
,
obstacle_map
,
find_best
,
prioritised
):
print
(
f
"
finding best subproblem
"
)
#
print(f"finding best subproblem")
two_by_three
=
Subproblem
(
obstacle_map
,
c
,
robots
,
starts
,
goals
,
conflicts
,
23
)
three_by_three
=
Subproblem
(
obstacle_map
,
c
,
robots
,
starts
,
goals
,
conflicts
,
33
)
two_by_five
=
Subproblem
(
obstacle_map
,
c
,
robots
,
starts
,
goals
,
conflicts
,
25
)
...
...
@@ -788,7 +783,7 @@ def find_subproblem(c, conflicts, S, robots, starts, goals, obstacle_map, find_b
# print(f"conflicts = {conflicts}")
# type = best[3]
print
(
f
"
best subproblem =
{
best_subproblem
.
transformed_goals
}
"
)
#
print(f"best subproblem = {best_subproblem.transformed_goals}")
return
conflicts
,
best_subproblem
...
...
@@ -810,8 +805,8 @@ def order_query(starts, goals):
ordered_goals - The goals in the correct order
new_to_old - The mapping of indices, so that we can recover the original order.
"""
print
(
f
"
starts =
{
starts
}
"
)
print
(
f
"
goals =
{
goals
}
"
)
#
print(f"starts = {starts}")
#
print(f"goals = {goals}")
fake_starts
=
[]
for
start
in
starts
:
fake_starts
.
append
([
3
*
(
start
[
0
]),
start
[
1
]])
...
...
@@ -973,6 +968,6 @@ def query_library(obstacle_map, s, lib_2x3, lib_3x3, lib_2x5):
s
.
flip
()
if
count
>=
10
:
break
if
sol
==
None
:
print
(
"
returning None
"
)
#
if sol == None: print("returning None")
return
sol
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment