Commit 3f5565fa authored by Marc Serramia's avatar Marc Serramia

Finished norm range plots and data

parent 86a1e1a5
......@@ -6,6 +6,7 @@ BUILD = True
SOLVE = True
MAINTAIN_PLOT = True
SOLVE_TIME_LIMIT = None
START_ROUND = 0
ROUNDS = 1
#---PROBLEM GENERATION SETTINGS---
......@@ -101,13 +102,14 @@ POINT_SIZE = 10
"""
#SCALABILITY_PROB SETTINGS:
"""
#"""
PLOT_TYPE = "SCALABILITY_PROB"
COLORS = ['black']#['navy', 'blue', 'cyan']
COLORS = ['#9c0000']#['#ffdd00', '#00ff00', 'cyan']#
SD = False
PLOT_INCOMPATIBILITY_PROB = [0.01]#[0.5, 1, 0]#INCOMPATIBILITY_PROB
LABELS = ["Hard problem"]#["Medium problem", "Easy problem", "No constraints"]
"""
LOGPLOT = False
PLOT_INCOMPATIBILITY_PROB = [0.01]#[0.5, 1, 0]#
LABELS = ["Hard problem"]#["Medium problem", "Easy problem", "No constraints"]#
#"""
#VALUES SETTINGS:
"""
......
......@@ -50,5 +50,13 @@
2500,0.01,0.5,None,15670,15537,974914,530.7032718658447
2500,0.01,0.5,None,15914,15557,966854,1096.8293476104736
3000,0.01,0.5,None,22478,22594,1748267,2147.571688890457
3000,0.01,0.5,None,22649,22327,1764108,3600.003397464752
3000,0.01,0.5,None,22712,22811,1807201,3600.003053188324
\ No newline at end of file
3000,0.01,0.5,None,22435,22348,1745265,2070.679219484329
3000,0.01,0.5,None,22514,22475,1808338,2178.43230175972
3000,0.01,0.5,None,22317,22203,1724279,1373.73379611969
3000,0.01,0.5,None,22528,22332,1776327,1903.5272150039673
3000,0.01,0.5,None,22408,22480,1748278,3614.0828404426575
3000,0.01,0.5,None,22463,22354,1713290,2700.8130433559418
3000,0.01,0.5,None,22515,22377,1790757,1943.6177868843079
3000,0.01,0.5,None,22519,22637,1791074,2010.7939393520355
3000,0.01,0.5,None,22341,22173,1704541,4956.984645843506
3000,0.01,0.5,None,22651,22565,1795086,9647.511258363724
\ No newline at end of file
......@@ -374,6 +374,8 @@ class Plot:
fig.suptitle('Scalability of the optimisation', size=16)
ax.set_xlabel('Number of norms', size=12)
ax.set_ylabel('Time (sec)', size=12)
if PARAMETERS.LOGPLOT:
ax.set_yscale('log')
times, sd = self.loadScatterPointsNormRangeProb()
norms = list(times.keys())
if PARAMETERS.PLOT_INCOMPATIBILITY_PROB:
......
......@@ -64,7 +64,7 @@ class ProblemIterator:
c2 = case[1]
for prob in PARAMETERS.INCOMPATIBILITY_PROB:
prob = float(prob)/float(100)
for r in range(PARAMETERS.ROUNDS):
for r in range(PARAMETERS.START_ROUND, PARAMETERS.ROUNDS):
problem = Problem("RANGE_RATIO", num_norms, num_values, r, height=c1, width=c2, prob_inc=prob)
if PARAMETERS.BUILD:
problem.generate()
......@@ -93,7 +93,7 @@ class ProblemIterator:
for case in self.cases():
c1 = case[0]
c2 = case[1]
for r in range(PARAMETERS.ROUNDS):
for r in range(PARAMETERS.START_ROUND, PARAMETERS.ROUNDS):
problem = Problem("RANGE_RATIO", num_norms, num_values, r, rel_density=c1, perc_inc=c2)
if PARAMETERS.BUILD:
problem.generate()
......@@ -129,7 +129,7 @@ class ProblemIterator:
c1 = case[0]
c2 = case[1]
for prob in PARAMETERS.INCOMPATIBILITY_PROB:
for r in range(PARAMETERS.ROUNDS):
for r in range(PARAMETERS.START_ROUND, PARAMETERS.ROUNDS):
if PARAMETERS.RELATION_DENSITY is not None:
problem = Problem("RANGE_NORMS", num_norms, num_values, r, rel_density=c1, perc_inc=c2)
else:
......@@ -161,7 +161,7 @@ class ProblemIterator:
for case in self.cases():
c1 = case[0]
c2 = case[1]
for r in range(PARAMETERS.ROUNDS):
for r in range(PARAMETERS.START_ROUND, PARAMETERS.ROUNDS):
problem = Problem("RANGE_NORMS", num_norms, num_values, r, rel_density=c1, perc_inc=c2)
if PARAMETERS.BUILD:
problem.generate()
......@@ -198,7 +198,7 @@ class ProblemIterator:
c2 = case[1]
for prob in PARAMETERS.INCOMPATIBILITY_PROB:
prob = float(prob) / float(100)
for r in range(PARAMETERS.ROUNDS):
for r in range(PARAMETERS.START_ROUND, PARAMETERS.ROUNDS):
if PARAMETERS.RELATION_DENSITY is not None:
problem = Problem("RANGE_VALUES", num_norms, num_values, r, rel_density=c1, perc_inc=c2)
else:
......@@ -234,7 +234,7 @@ class ProblemIterator:
for vcase in self.vcases():
pind = vcase[0]
pnorm = vcase[1]
for r in range(PARAMETERS.ROUNDS):
for r in range(PARAMETERS.START_ROUND, PARAMETERS.ROUNDS):
problem = Problem("RANGE_VALUES", num_norms, num_values, r, rel_density=c1, perc_inc=c2, indifference_prob = pind, normvalue_prob = pnorm)
if PARAMETERS.BUILD:
problem.generate()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment