Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cadbiom
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
VIGNET Pierre
cadbiom
Commits
12ed8f0b
Commit
12ed8f0b
authored
5 years ago
by
VIGNET Pierre
Browse files
Options
Downloads
Patches
Plain Diff
[lib] Fix typos; fix doc
parent
21acce7d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
library/cadbiom/models/clause_constraints/mcl/CLUnfolder.py
+3
-5
3 additions, 5 deletions
library/cadbiom/models/clause_constraints/mcl/CLUnfolder.py
library/cadbiom/models/clause_constraints/mcl/MCLSolutions.py
+5
-4
5 additions, 4 deletions
...ary/cadbiom/models/clause_constraints/mcl/MCLSolutions.py
with
8 additions
and
9 deletions
library/cadbiom/models/clause_constraints/mcl/CLUnfolder.py
+
3
−
5
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
...
...
This diff is collapsed.
Click to expand it.
library/cadbiom/models/clause_constraints/mcl/MCLSolutions.py
+
5
−
4
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
...
...
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