add missing scripts
This commit is contained in:
parent
a7f57bea99
commit
406276b62b
22
packages/CLPBN/clpbn/bp/benchmarks/comp_workshops/bp_tests.sh
Executable file
22
packages/CLPBN/clpbn/bp/benchmarks/comp_workshops/bp_tests.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
source cw.sh
|
||||
source ../benchs.sh
|
||||
|
||||
SOLVER="bp"
|
||||
|
||||
function run_all_graphs
|
||||
{
|
||||
write_header $1
|
||||
run_solver p1000w$N_WORKSHOPS $2
|
||||
run_solver p5000w$N_WORKSHOPS $2
|
||||
run_solver p10000w$N_WORKSHOPS $2
|
||||
run_solver p50000w$N_WORKSHOPS $2
|
||||
run_solver p100000w$N_WORKSHOPS $2
|
||||
run_solver p500000w$N_WORKSHOPS $2
|
||||
run_solver p1000000w$N_WORKSHOPS $2
|
||||
}
|
||||
|
||||
prepare_new_run
|
||||
run_all_graphs "bp(shedule=seq_fixed) " seq_fixed
|
||||
|
22
packages/CLPBN/clpbn/bp/benchmarks/comp_workshops/cbp_tests.sh
Executable file
22
packages/CLPBN/clpbn/bp/benchmarks/comp_workshops/cbp_tests.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
source cw.sh
|
||||
source ../benchs.sh
|
||||
|
||||
SOLVER="cbp"
|
||||
|
||||
function run_all_graphs
|
||||
{
|
||||
write_header $1
|
||||
run_solver p1000w$N_WORKSHOPS $2
|
||||
run_solver p5000w$N_WORKSHOPS $2
|
||||
run_solver p10000w$N_WORKSHOPS $2
|
||||
run_solver p50000w$N_WORKSHOPS $2
|
||||
run_solver p100000w$N_WORKSHOPS $2
|
||||
run_solver p500000w$N_WORKSHOPS $2
|
||||
run_solver p1000000w$N_WORKSHOPS $2
|
||||
}
|
||||
|
||||
prepare_new_run
|
||||
run_all_graphs "cbp(shedule=seq_fixed) " seq_fixed
|
||||
|
8
packages/CLPBN/clpbn/bp/benchmarks/comp_workshops/cw.sh
Executable file
8
packages/CLPBN/clpbn/bp/benchmarks/comp_workshops/cw.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
NETWORK="'../../examples/comp_workshops'"
|
||||
SHORTNAME="cw"
|
||||
QUERY="series(X)"
|
||||
|
||||
N_WORKSHOPS=10
|
||||
|
23
packages/CLPBN/clpbn/bp/benchmarks/comp_workshops/fove_tests.sh
Executable file
23
packages/CLPBN/clpbn/bp/benchmarks/comp_workshops/fove_tests.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
source cw.sh
|
||||
source ../benchs.sh
|
||||
|
||||
SOLVER="fove"
|
||||
|
||||
function run_all_graphs
|
||||
{
|
||||
write_header $1
|
||||
run_solver p1000w$N_WORKSHOPS $2
|
||||
run_solver p5000w$N_WORKSHOPS $2
|
||||
run_solver p10000w$N_WORKSHOPS $2
|
||||
run_solver p50000w$N_WORKSHOPS $2
|
||||
run_solver p100000w$N_WORKSHOPS $2
|
||||
run_solver p500000w$N_WORKSHOPS $2
|
||||
run_solver p1000000w$N_WORKSHOPS $2
|
||||
}
|
||||
|
||||
prepare_new_run
|
||||
run_all_graphs "fove "
|
||||
|
||||
|
36
packages/CLPBN/clpbn/bp/benchmarks/comp_workshops/gen_workshops.sh
Executable file
36
packages/CLPBN/clpbn/bp/benchmarks/comp_workshops/gen_workshops.sh
Executable file
@ -0,0 +1,36 @@
|
||||
#!/home/tgomes/bin/yap -L --
|
||||
|
||||
:- use_module(library(lists)).
|
||||
|
||||
|
||||
:- initialization(main).
|
||||
|
||||
|
||||
main :-
|
||||
unix(argv(Args)),
|
||||
nth(1, Args, NP), % number of invitees
|
||||
nth(2, Args, NW), % number of workshops
|
||||
atomic_concat(['p', NP , 'w', NW, '.yap'], FileName),
|
||||
open(FileName, 'write', S),
|
||||
atom_number(NP, NP2),
|
||||
atom_number(NW, NW2),
|
||||
gen(S, NP2, NW2, 1),
|
||||
write(S, '\n'),
|
||||
close(S).
|
||||
|
||||
|
||||
gen(_, NP, _, Count) :-
|
||||
Count > NP, !.
|
||||
gen(S, NP, NW, Count) :-
|
||||
gen_workshops(S, Count, NW, 1),
|
||||
Count1 is Count + 1,
|
||||
gen(S, NP, NW, Count1).
|
||||
|
||||
|
||||
gen_workshops(_, _, NW, Count) :-
|
||||
Count > NW, !.
|
||||
gen_workshops(S, P, NW, Count) :-
|
||||
format(S, 'c(p~w,w~w).~n', [P,Count]),
|
||||
Count1 is Count + 1,
|
||||
gen_workshops(S, P, NW, Count1).
|
||||
|
22
packages/CLPBN/clpbn/bp/benchmarks/comp_workshops/hve_tests.sh
Executable file
22
packages/CLPBN/clpbn/bp/benchmarks/comp_workshops/hve_tests.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
source cw.sh
|
||||
source ../benchs.sh
|
||||
|
||||
SOLVER="hve"
|
||||
|
||||
function run_all_graphs
|
||||
{
|
||||
write_header $1
|
||||
run_solver p1000w$N_WORKSHOPS $2
|
||||
run_solver p5000w$N_WORKSHOPS $2
|
||||
run_solver p10000w$N_WORKSHOPS $2
|
||||
run_solver p50000w$N_WORKSHOPS $2
|
||||
run_solver p100000w$N_WORKSHOPS $2
|
||||
run_solver p500000w$N_WORKSHOPS $2
|
||||
run_solver p1000000w$N_WORKSHOPS $2
|
||||
}
|
||||
|
||||
prepare_new_run
|
||||
run_all_graphs "hve(elim_heuristic=min_neighbors) " min_neighbors
|
||||
|
22
packages/CLPBN/clpbn/bp/benchmarks/smokers/bp_tests.sh
Executable file
22
packages/CLPBN/clpbn/bp/benchmarks/smokers/bp_tests.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
source sm.sh
|
||||
source ../benchs.sh
|
||||
|
||||
SOLVER="bp"
|
||||
|
||||
function run_all_graphs
|
||||
{
|
||||
write_header $1
|
||||
run_solver pop1000 $2
|
||||
run_solver pop5000 $2
|
||||
run_solver pop10000 $2
|
||||
run_solver pop50000 $2
|
||||
run_solver pop100000 $2
|
||||
run_solver pop500000 $2
|
||||
run_solver pop1000000 $2
|
||||
}
|
||||
|
||||
prepare_new_run
|
||||
run_all_graphs "bp(shedule=seq_fixed) " seq_fixed
|
||||
|
22
packages/CLPBN/clpbn/bp/benchmarks/smokers/cbp_tests.sh
Executable file
22
packages/CLPBN/clpbn/bp/benchmarks/smokers/cbp_tests.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
source sm.sh
|
||||
source ../benchs.sh
|
||||
|
||||
SOLVER="cbp"
|
||||
|
||||
function run_all_graphs
|
||||
{
|
||||
write_header $1
|
||||
run_solver pop1000 $2
|
||||
run_solver pop5000 $2
|
||||
run_solver pop10000 $2
|
||||
run_solver pop50000 $2
|
||||
run_solver pop100000 $2
|
||||
run_solver pop500000 $2
|
||||
run_solver pop1000000 $2
|
||||
}
|
||||
|
||||
prepare_new_run
|
||||
run_all_graphs "cbp(shedule=seq_fixed) " seq_fixed
|
||||
|
23
packages/CLPBN/clpbn/bp/benchmarks/smokers/fove_tests.sh
Executable file
23
packages/CLPBN/clpbn/bp/benchmarks/smokers/fove_tests.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
source sm.sh
|
||||
source ../benchs.sh
|
||||
|
||||
SOLVER="fove"
|
||||
|
||||
function run_all_graphs
|
||||
{
|
||||
write_header $1
|
||||
run_solver pop1000 $2
|
||||
run_solver pop5000 $2
|
||||
run_solver pop10000 $2
|
||||
run_solver pop50000 $2
|
||||
run_solver pop100000 $2
|
||||
run_solver pop500000 $2
|
||||
run_solver pop1000000 $2
|
||||
}
|
||||
|
||||
prepare_new_run
|
||||
run_all_graphs "fove "
|
||||
|
||||
|
23
packages/CLPBN/clpbn/bp/benchmarks/smokers/gen_people.sh
Executable file
23
packages/CLPBN/clpbn/bp/benchmarks/smokers/gen_people.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/home/tgomes/bin/yap -L --
|
||||
|
||||
|
||||
:- initialization(main).
|
||||
|
||||
|
||||
main :-
|
||||
unix(argv([N])),
|
||||
atomic_concat(['pop', N, '.yap'], FileName),
|
||||
open(FileName, 'write', S),
|
||||
atom_number(N, N2),
|
||||
generate_people(S, N2, 4),
|
||||
write(S, '\n'),
|
||||
close(S).
|
||||
|
||||
|
||||
generate_people(S, N, Counting) :-
|
||||
Counting > N, !.
|
||||
generate_people(S, N, Counting) :-
|
||||
format(S, 'people(p~w).~n', [Counting]),
|
||||
Counting1 is Counting + 1,
|
||||
generate_people(S, N, Counting1).
|
||||
|
22
packages/CLPBN/clpbn/bp/benchmarks/smokers/hve_tests.sh
Executable file
22
packages/CLPBN/clpbn/bp/benchmarks/smokers/hve_tests.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
source sm.sh
|
||||
source ../benchs.sh
|
||||
|
||||
SOLVER="hve"
|
||||
|
||||
function run_all_graphs
|
||||
{
|
||||
write_header $1
|
||||
run_solver pop1000 $2
|
||||
run_solver pop5000 $2
|
||||
run_solver pop10000 $2
|
||||
run_solver pop50000 $2
|
||||
run_solver pop100000 $2
|
||||
run_solver pop500000 $2
|
||||
run_solver pop1000000 $2
|
||||
}
|
||||
|
||||
prepare_new_run
|
||||
run_all_graphs "hve(elim_heuristic=min_neighbors) " min_neighbors
|
||||
|
6
packages/CLPBN/clpbn/bp/benchmarks/smokers/sm.sh
Executable file
6
packages/CLPBN/clpbn/bp/benchmarks/smokers/sm.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
NETWORK="'../../examples/smokers'"
|
||||
SHORTNAME="sm"
|
||||
QUERY="friend(p1,p2,X)"
|
||||
|
Reference in New Issue
Block a user