Skip to content

Commit

Permalink
Merge commit 'c722e1243453b2fbf1e2faeffdf3dc03e2e64c27' into dev_varR…
Browse files Browse the repository at this point in the history
…BErobOpt
  • Loading branch information
becker89 committed Dec 18, 2020
2 parents 3ab98e2 + c722e12 commit 0c6106b
Showing 1 changed file with 25 additions and 10 deletions.
35 changes: 25 additions & 10 deletions matRad_multScen.m
Original file line number Diff line number Diff line change
Expand Up @@ -577,23 +577,38 @@ function listAllScenarios(this)

case 'individual' % combine setup and range scenarios individually

% range errors should come first
nIso = size(this.isoShift,1);
nRange = size(rangeShift,1);


% range errors should come last
if this.includeNomScen
this.scenForProb = zeros(size(this.isoShift,1)-1 + size(rangeShift,1),5);
this.scenForProb(1:size(rangeShift,1),4:5) = rangeShift;
this.scenForProb(size(rangeShift,1)+1:end,1:3) = this.isoShift(2:end,:);
else
this.scenForProb = zeros(size(this.isoShift,1) + size(rangeShift,1),5);
this.scenForProb(1:size(rangeShift,1),4:5) = rangeShift;
this.scenForProb(size(rangeShift,1)+1:end,1:3) = this.isoShift;
nIso = nIso - 1;
nRange = nRange -1;

this.scenForProb = zeros(1,5); %Nominal Scenario

rangeScen = zeros(nRange,5);
rangeScen(:,4:5) = rangeShift(2:end,:);

isoScen = zeros(nIso,5);
isoScen(:,1:3) = this.isoShift(2:end,:);
this.scenForProb = [this.scenForProb; isoScen; rangeScen];
else
rangeScen = zeros(nRange,5);
isoScen = zeros(nIso,5);
rangeScen(:,4:5) = rangeShift;
isoScen(:,1:3) = this.isoShift;

this.scenForProb = [isoScen; rangeScen];
end

case 'permuted'

this.scenForProb = zeros(size(this.isoShift,1) * size(rangeShift,1),5);
Cnt = 1;
for i = 1:size(this.isoShift,1)
for j = 1:size(rangeShift,1)
for j = 1:size(rangeShift,1)
for i = 1:size(this.isoShift,1)
this.scenForProb(Cnt,:) = [this.isoShift(i,:) rangeShift(j,:)];
Cnt = Cnt + 1;
end
Expand Down

0 comments on commit 0c6106b

Please sign in to comment.