Skip to content

Commit b96156f

Browse files
committed
Minor bug fixes and optimizations
1 parent ccdb1a5 commit b96156f

3 files changed

Lines changed: 583 additions & 452 deletions

File tree

code/evaluateSingleInstanceHierarchical.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
end
4545
end
4646

47-
mylimit=2e7/4;
47+
mylimit=3e5;
4848

4949
if ~exist('singlePlacementInstance','var')
5050

@@ -72,6 +72,7 @@
7272
% Returns all placements for numberOfControllers
7373
[avgLatencyN2C,maxLatencyN2C,controllerlessNodes,controllerImbalance,avgLatencyC2C,maxLatencyC2C]=calculateMetrics(distanceMatrix,nk(:,workingsubset),nodeWeights);
7474
else
75+
evaluationResult=[];
7576
return
7677
% find largest computable numberOfControllers (fitting in RAM)
7778
for i=numberOfControllers:-1:1

code/plotPareto.m

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,30 @@
104104
xlims=get(gca,'xlim');
105105
ylims=get(gca,'ylim');
106106

107+
if xlims(2)>2*max(xinthin) || xlims(2)<max(xinthin)
108+
xlims(2)=max(xinthin)*1.2;
109+
end
110+
111+
if ylims(2)>2*max(yinthin) || ylims(2)<max(yinthin)
112+
ylims(2)=max(yinthin)*1.2;
113+
end
114+
115+
if xlims(1)<0
116+
xlims(1)=0;
117+
end
118+
119+
if ylims(1)<0
120+
ylims(1)=0;
121+
end
122+
123+
if xlims(1)>min(xinthin)
124+
xlims(1)=min(xinthin)*0.9;
125+
end
126+
127+
if ylims(1)>min(yinthin)
128+
ylims(1)=min(yinthin)*0.9;
129+
end
130+
107131
c=[0.9 0.9 0.9];
108132
plot(x,y,'o-','LineWidth',2,'MarkerSize',10,'Color',darken(c),'MarkerFaceColor',c);
109133

@@ -124,9 +148,13 @@
124148
ylabel(p.Results.YLabel);
125149
if ~isempty(p.Results.XLim)
126150
xlim(p.Results.XLim);
151+
else
152+
xlim(xlims)
127153
end
128154
if ~isempty(p.Results.YLim)
129155
ylim(p.Results.YLim);
156+
else
157+
ylim(ylims)
130158
end
131159

132160
if plotexport==1 % Export is activated, save as pdf file

0 commit comments

Comments
 (0)