Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bigprint
twins-planner
Commits
5a1b8b8d
Commit
5a1b8b8d
authored
Feb 04, 2021
by
Jayant Khatkar
Browse files
record key stats in bulk run (
#64
)
parent
43e87ad1
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bulk_test.py
View file @
5a1b8b8d
...
@@ -50,6 +50,7 @@ def batch_decmcts(gcode_files, n_layers, mcts_nodes_per_layer):
...
@@ -50,6 +50,7 @@ def batch_decmcts(gcode_files, n_layers, mcts_nodes_per_layer):
env_desc2
=
tu
.
read_env
(
'calibrations/r1_tforms.yaml'
,
env_desc2
=
tu
.
read_env
(
'calibrations/r1_tforms.yaml'
,
'calibrations/r2_tforms.yaml'
)
'calibrations/r2_tforms.yaml'
)
env
=
tu
.
SimEnv
(
env_desc
=
env_desc2
,
gui
=
False
,
home
=
home
)
env
=
tu
.
SimEnv
(
env_desc
=
env_desc2
,
gui
=
False
,
home
=
home
)
decmcts_stats
=
{}
for
f
in
gcode_files
:
for
f
in
gcode_files
:
...
@@ -59,14 +60,18 @@ def batch_decmcts(gcode_files, n_layers, mcts_nodes_per_layer):
...
@@ -59,14 +60,18 @@ def batch_decmcts(gcode_files, n_layers, mcts_nodes_per_layer):
print
(
"Runnning for model {}"
.
format
(
model
))
print
(
"Runnning for model {}"
.
format
(
model
))
print
(
"####################################"
)
print
(
"####################################"
)
try
:
try
:
cs
,
plan
=
decmcts
.
decmcts
(
tracker
,
cs
,
plan
=
decmcts
.
decmcts
(
tracker
,
env
,
env
,
n_layers
=
n_layers
,
n_layers
=
n_layers
,
mcts_nodes
=
mcts_nodes_per_layer
mcts_nodes
=
mcts_nodes_per_layer
)
)
plan
.
visualise
()
#plan.visualise()
decmcts_stats
[
model
]
=
{
'total_time'
:
plan
.
len
(),
'print_time'
:
plan
.
extrusion_time
()}
print
(
decmcts_stats
[
model
])
except
:
except
:
print
(
"FAILED TO COMPLETE ON MODEL {}"
.
format
(
model
))
print
(
"FAILED TO COMPLETE ON MODEL {}"
.
format
(
model
))
...
...
src/utils/plan.py
View file @
5a1b8b8d
...
@@ -201,6 +201,19 @@ class Plan:
...
@@ -201,6 +201,19 @@ class Plan:
return
max
([
a
[
-
1
]
for
a
in
self
.
cumul_time
.
values
()])
return
max
([
a
[
-
1
]
for
a
in
self
.
cumul_time
.
values
()])
def
extrusion_time
(
self
):
"""
time spent extruding
"""
t
=
0
for
arm
in
self
.
trajs
:
for
traj
in
self
.
trajs
[
arm
]:
if
traj
.
contour
is
not
None
:
t
+=
traj
.
time
[
-
1
]
return
t
def
load_plan
(
filename
,
gui
=
False
):
def
load_plan
(
filename
,
gui
=
False
):
"""
"""
load a saved plan
load a saved plan
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment