-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSimulationTest.py
More file actions
78 lines (67 loc) · 3.44 KB
/
SimulationTest.py
File metadata and controls
78 lines (67 loc) · 3.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
from Simulation import SimulationSA_CSP
from Simulation import SimulationSA_FFMSP
from Simulation import SimulationMCM_CSP
from Simulation import SimulationMCM_FFMSP
from Simulation import SimulationEv_CSP
from Simulation import SimulationEv_FFMSP
from Simulation import SimulationGA_CSP
from Simulation import SimulationGA_FFMSP
from Figures import Figure
"""
sa_csp = SimulationSA_CSP(10,7,5000,range(0,5),0.75,'RandomFlip', 0.95,200)
sa_csp.get_solution()
sa_csp_figure = Figure(sa_csp.status)
sa_csp_fig1 = sa_csp_figure.get_best_result_plot_html()
sa_csp_fig2 = sa_csp_figure.get_current_result_plot_bokeh()
sa_csp_figure.save_multiple_plots_bokeh("sa_csp.html",[sa_csp_fig1,sa_csp_fig2])
sa_ffmsp = SimulationSA_FFMSP(10,7,5000,range(0,5),0.75,'RandomFlip', 0.95,200)
sa_ffmsp.get_solution()
sa_ffmsp_figure = Figure(sa_ffmsp.status)
sa_ffmsp_fig1 = sa_csp_figure.get_best_result_plot_html()
sa_ffmsp_fig2 = sa_csp_figure.get_current_result_plot_bokeh()
sa_ffmsp_figure.save_multiple_plots_bokeh("sa_ffmsp.html",[sa_ffmsp_fig1,sa_ffmsp_fig2])
mcm_csp = SimulationMCM_CSP(10,7,5000,range(0,5),0.75,'RandomFlip',200)
mcm_csp.get_solution()
mcm_csp_figure = Figure(mcm_csp.status)
mcm_csp_fig1 = mcm_csp_figure.get_best_result_plot_html()
mcm_csp_fig2 = mcm_csp_figure.get_current_result_plot_bokeh()
mcm_csp_figure.save_multiple_plots_bokeh("mcm_csp.html",[mcm_csp_fig1,mcm_csp_fig2])
mcm_ffmsp = SimulationMCM_FFMSP(10,7,5000,range(0,5),0.75,'RandomFlip',200)
mcm_ffmsp.get_solution()
mcm_ffmsp_figure = Figure(mcm_ffmsp.status)
mcm_ffmsp_fig1 = mcm_ffmsp_figure.get_best_result_plot_html()
mcm_ffmsp_fig2 = mcm_ffmsp_figure.get_current_result_plot_bokeh()
mcm_ffmsp_figure.save_multiple_plots_bokeh("mcm_ffmsp.html",[mcm_ffmsp_fig1,mcm_ffmsp_fig2])
ev_csp = SimulationEv_CSP(10,7,5000,range(0,5),0.75,'RandomFlip',10)
ev_csp.get_solution()
ev_csp_figure = Figure(ev_csp.status)
ev_csp_fig1 = ev_csp_figure.get_best_result_plot_html()
ev_csp_fig2 = ev_csp_figure.get_current_result_plot_bokeh()
ev_csp_figure.save_multiple_plots_bokeh("ev_csp.html",[ev_csp_fig1,ev_csp_fig2])
ev_ffmsp = SimulationEv_FFMSP(10,7,5000,range(0,5),0.75,'RandomFlip',10)
ev_ffmsp.get_solution()
ev_ffmsp_figure = Figure(ev_ffmsp.status)
ev_ffmsp_fig1 = ev_ffmsp_figure.get_best_result_plot_html()
ev_ffmsp_fig2 = ev_ffmsp_figure.get_current_result_plot_bokeh()
ev_ffmsp_figure.save_multiple_plots_bokeh("ev_ffmsp.html",[ev_ffmsp_fig1,ev_ffmsp_fig2])
ga_csp = SimulationGA_CSP(10,7,5000,range(0,5,),0.75,'RandomFlip')
ga_csp.get_solution()
ga_csp_figure = Figure(ga_csp.status)
ga_csp_fig1 = ga_csp_figure.get_best_result_plot_html()
ga_csp_fig2 = ga_csp_figure.get_current_result_plot_bokeh()
ga_csp_figure.save_multiple_plots_bokeh("ga_csp.html",[ga_csp_fig1,ga_csp_fig2])
ga_ffmsp = SimulationGA_FFMSP(10,7,5000,range(0,5),0.75,'RandomFlip')
ga_ffmsp.get_solution()
ga_ffmsp_figure = Figure(ga_ffmsp.status)
ga_ffmsp_fig1 = ga_ffmsp_figure.get_best_result_plot_html()
ga_ffmsp_fig2 = ga_ffmsp_figure.get_current_result_plot_bokeh()
ga_ffmsp_figure.save_multiple_plots_bokeh("ga_ffmsp.html",[ga_ffmsp_fig1,ga_ffmsp_fig2])
"""
param_figs = []
parents=range(20,32,2)
for num_parent in parents:
sim = SimulationEv_CSP(100,7,5000,range(0,5),0.75,'RandomFlip',number_parents=num_parent)
sim.get_solution()
sim_figure = Figure(sim.status)
param_figs.append(sim_figure.get_best_result_plot_html(opt_title=' num_parent=' + str(num_parent)))
sim_figure.save_multiple_plots_bokeh("multi_param_charts.html",param_figs)