Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kawamura-solver
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
adc2019
kawamura-solver
Commits
51026c0e
You need to sign in or sign up before continuing.
Commit
51026c0e
authored
Aug 28, 2019
by
kazushi.kawamura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bugs
parent
9605a723
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
kwmr_solver_pynq.py
kwmr_solver_pynq.py
+1
-1
main.py
scripts/main.py
+2
-2
No files found.
kwmr_solver_pynq.py
View file @
51026c0e
...
...
@@ -41,7 +41,7 @@ def solve(params):
seed
=
random
.
randint
(
0
,
2147483647
)
# seed: uint32_t <= 2147483647
cmds
=
f
'python3 {basedir}/s
olver_soft/s
cripts/main.py -p {problem_filepath} -s {seed} -o {solution_filepath}'
.
split
()
cmds
=
f
'python3 {basedir}/scripts/main.py -p {problem_filepath} -s {seed} -o {solution_filepath}'
.
split
()
proc
=
subprocess
.
Popen
(
cmds
,
...
...
scripts/main.py
View file @
51026c0e
...
...
@@ -106,11 +106,11 @@ def main(args):
if
W_ext
[
0
]
>
info
[
'W'
][
0
]
or
H_ext
[
0
]
>
info
[
'H'
][
0
]:
print
(
'Fail satisfying constraint T_T'
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
else
:
print
(
'Satisfy constraint ^_^'
)
if
args
[
'output'
]
is
not
None
:
mySolverModule
.
output_to_file
(
args
[
'output'
],
W_ext
[
0
],
H_ext
[
0
],
info
[
'blocks'
][
0
],
info
[
'line_num'
][
0
],
info
[
'block_info'
],
result
)
sys
.
exit
(
0
)
sys
.
exit
(
0
)
if
__name__
==
'__main__'
:
...
...
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