Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion minimisers/DREAM/functions/DREAM.m
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
if ~strcmpi(controls.display, coderEnums.displayOptions.Off)
triggerEvent(coderEnums.eventTypes.Message, sprintf('Optimisation terminated by user\n'));
end
break;
return;
end
end

Expand Down
6 changes: 6 additions & 0 deletions minimisers/DREAM/runDREAM.m
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@
% Run the sampler....
[chain,dreamOutput,~] = DREAM(DREAMPar,ParInfo,ratInputs);

if isRATStopped(controls.IPCFilePath)
result = makeEmptyResultStruct(problemStruct.numberOfContrasts, length(problemStruct.fitParams), domains);
outProblemStruct = problemStruct;
return
end

% Combine all chains....
nChains = DREAMPar.nChains;
nParams = DREAMPar.nParams;
Expand Down
3 changes: 2 additions & 1 deletion minimisers/NS/nestedSampler.m
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,8 @@
if ~strcmpi(controls.display, coderEnums.displayOptions.Off)
triggerEvent(coderEnums.eventTypes.Message, sprintf('Optimisation terminated by user\n'));
end
break;
post_samples = [];
return;
end
% update counter
j = j+1;
Expand Down
5 changes: 5 additions & 0 deletions minimisers/NS/runNestedSampler.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@
[logZ, nestSamples, postSamples, H] = nestedSampler(data, nLive, nMCMC,...
tolerance, likelihood, model, priorList, fitNames);

if isRATStopped(controls.IPCFilePath)
result = makeEmptyResultStruct(problemStruct.numberOfContrasts, length(problemStruct.fitParams), domains);
return
end

% Process the results...
nParams = length(fitNames);
% chain = nest_samples(:,1:end-1);
Expand Down
Loading