Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
VIGNET Pierre
cadbiom
Commits
12ed8f0b
Commit
12ed8f0b
authored
Dec 12, 2019
by
VIGNET Pierre
Browse files
[lib] Fix typos; fix doc
parent
21acce7d
Changes
2
Hide whitespace changes
Inline
Side-by-side
library/cadbiom/models/clause_constraints/mcl/CLUnfolder.py
View file @
12ed8f0b
...
...
@@ -288,7 +288,8 @@ class CLUnfolder(object):
# ordered list of DIMACS codes of the frontier variables/places
self
.
frontier_values
=
[
self
.
__var_code_table
[
frp
]
for
frp
in
self
.
dynamic_system
.
frontiers
]
self
.
frontier_values
.
sort
()
## TODO: sort utile ici ???? si non passer en frozenset et supprimer les casts partout ailleurs
## TODO: Utiliser une liste triée est-il utile ici ?
## si non passer utiliser un frozenset et supprimer les casts partout
## Cf RawSolution.frontier_pos_and_neg_values BACKWARD, encore utilisé avec index
## Cf TestCLUnfolder.test_frontier indexable mais peut etre contourné
...
...
@@ -1401,7 +1402,7 @@ class CLUnfolder(object):
In practice, it is a list with the values (Dimacs code)
of all frontier places of the system.
:type max_sol: <int>
:type vvars: <list <int>>
:type vvars: <list <int>>
or <frozenset <int>> or any iterable
:return: A tuple of RawSolution objects
RawSolution objects contain a solution got from SAT solver with all
variable parameters from the unfolder
...
...
@@ -1525,9 +1526,6 @@ class CLUnfolder(object):
variable parameters from the unfolder
:rtype: <tuple <RawSolution>>
"""
if
LOGGER
.
getEffectiveLevel
()
==
DEBUG
:
LOGGER
.
debug
(
"squery_solve :: vvars : %s"
,
vvars
)
# Initialization
self
.
init_forward_unfolding
()
# Horizon adjustment
...
...
library/cadbiom/models/clause_constraints/mcl/MCLSolutions.py
View file @
12ed8f0b
...
...
@@ -246,8 +246,9 @@ class RawSolution(object):
frontiers (fixed size): 3824
solution (increasing size): 171231, 228314, 285405, 285453, 400091 etc.
@param sol: a dimacs solution
@return: a dimacs code list of the activation state on the frontier for sol
:return: A dimacs code set of the activation state on the frontiers for
the current solution.
:rtype: <frozenset <int>>
"""
# Old API
# jmax = len(self.unfolder.frontier_values)
...
...
@@ -305,9 +306,9 @@ class RawSolution(object):
j
+=
1
if
j
==
jmax
:
# all frontiers are found
return
fsol
return
frozenset
(
fsol
)
frontier
=
frontiers
[
j
]
return
fsol
# never reach this point
return
frozenset
(
fsol
)
# never reach this point
# Useless proposition
# ps: jmax allows to stop the search when the iteration is made on solution
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment