Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sasa
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
Container Registry
Model registry
Operate
Environments
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
verimag
synchrone
sasa
Commits
c25cdb1c
Commit
c25cdb1c
authored
2 years ago
by
erwan
Browse files
Options
Downloads
Patches
Plain Diff
feat: add a --es-dont-cut option, that unactivates B&B during ES
parent
03b830c2
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/sasacore/exhaustSearch.ml
+2
-4
2 additions, 4 deletions
lib/sasacore/exhaustSearch.ml
lib/sasacore/sasArg.ml
+8
-2
8 additions, 2 deletions
lib/sasacore/sasArg.ml
lib/sasacore/sasArg.mli
+2
-1
2 additions, 1 deletion
lib/sasacore/sasArg.mli
with
12 additions
and
7 deletions
lib/sasacore/exhaustSearch.ml
+
2
−
4
View file @
c25cdb1c
(* Time-stamp: <modified the
27
/0
2
/2023 (at 15:
25
) by Erwan Jahier> *)
(* Time-stamp: <modified the
01
/0
3
/2023 (at 15:
10
) by Erwan Jahier> *)
open
LocalSearch
...
...
@@ -178,7 +178,7 @@ let (bnb : out_channel -> bool -> 'v ss ->
Some
(
x
,
t
));
visiting
=
visiting
;
visited
=
visited
;
cut
=
(
fun
psol
n
->
if
psol
.
cost
>=
n
.
cost
then
(
cut
=
(
fun
psol
n
->
if
not
args
.
es_dont_cut
&&
psol
.
cost
>=
n
.
cost
then
(
if
do_log
args
then
pf
log
"%d: cut at depth %d of cost %.1f<=%.1f
\n
%!"
!
cpt
n
.
d
n
.
cost
psol
.
cost
;
true
...
...
@@ -241,8 +241,6 @@ let (bnb : out_channel -> bool -> 'v ss ->
cpt_of_last_improvement
:=
nsol
.
cpt
;
run_more
nsol
more
)
else
(
pf
log
"==> I've found a path of length %d! (after #%d steps)
\n
%!"
nsol
.
d
!
cpt
;
pf
stdout
"==> I've found a path of length %d (after #%d steps)
\n
%!"
nsol
.
d
!
cpt
;
run_more
psol
more
)
in
...
...
This diff is collapsed.
Click to expand it.
lib/sasacore/sasArg.ml
+
8
−
2
View file @
c25cdb1c
(* Time-stamp: <modified the 0
9
/0
2
/2023 (at
09:46
) by Erwan Jahier> *)
(* Time-stamp: <modified the 0
1
/0
3
/2023 (at
12:21
) by Erwan Jahier> *)
type
init_search
=
No_init_search
|
Local
of
int
|
Global
of
int
|
Annealing
of
int
...
...
@@ -15,6 +15,7 @@ type t = {
mutable
es_dfs
:
bool
;
mutable
es_tabu_mode
:
bool
;
mutable
es_continue_after_best
:
bool
;
mutable
es_dont_cut
:
bool
;
mutable
rif
:
bool
;
mutable
output_file_name
:
string
option
;
mutable
no_data_file
:
bool
;
...
...
@@ -54,6 +55,7 @@ let (make_args : unit -> t) =
es_dfs
=
false
;
es_tabu_mode
=
true
;
es_continue_after_best
=
false
;
es_dont_cut
=
false
;
rif
=
false
;
output_file_name
=
None
;
no_data_file
=
false
;
...
...
@@ -175,7 +177,11 @@ let (mkoptab : string array -> t -> unit) =
mkopt
args
~
hide
:
true
[
"--es-continue-when-best-sol-found"
]
(
Arg
.
Unit
(
fun
()
->
args
.
es_continue_after_best
<-
true
))
[
"For experiment purposes: do not stop when |path(sol)|=pot(init)"
];
[
"Do not stop when |path(sol)|=pot(init): this is necessary when E.x phi'(c)>0 (pseudo pot)"
];
mkopt
args
~
hide
:
true
[
"--es-dont-cut"
]
(
Arg
.
Unit
(
fun
()
->
args
.
es_dont_cut
<-
true
))
[
"Do not cut path when n.cost < prev_sol.cost : this is useful when E.x phi'(c)>0 (pseudo pot)"
];
(* mkopt args ["--bad-daemon";"-bd"] ~arg:" <int>" *)
...
...
This diff is collapsed.
Click to expand it.
lib/sasacore/sasArg.mli
+
2
−
1
View file @
c25cdb1c
(* Time-stamp: <modified the 0
9
/0
2
/2023 (at
09:46
) by Erwan Jahier> *)
(* Time-stamp: <modified the 0
1
/0
3
/2023 (at
12:20
) by Erwan Jahier> *)
type
init_search
=
No_init_search
|
Local
of
int
|
Global
of
int
|
Annealing
of
int
...
...
@@ -13,6 +13,7 @@ type t = {
mutable
es_dfs
:
bool
;
mutable
es_tabu_mode
:
bool
;
mutable
es_continue_after_best
:
bool
;
mutable
es_dont_cut
:
bool
;
mutable
rif
:
bool
;
mutable
output_file_name
:
string
option
;
mutable
no_data_file
:
bool
;
...
...
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