Skip to content

Commit 804fa85

Browse files
committed
Update to WIN build project file
1 parent 5d0cb82 commit 804fa85

3 files changed

Lines changed: 134 additions & 134 deletions

File tree

KSPTrajectoryOptimizationTool.prj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<file>${PROJECT_ROOT}\KSPTrajectoryOptimizationTool_resources\icon_24.png</file>
99
<file>${PROJECT_ROOT}\KSPTrajectoryOptimizationTool_resources\icon_16.png</file>
1010
</param.icons>
11-
<param.version>1.6.8.11</param.version>
11+
<param.version>1.6.8</param.version>
1212
<param.authnamewatermark>Arrowstar</param.authnamewatermark>
1313
<param.email />
1414
<param.company />
Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
1-
function stop = optimplotconstrviolationKsptot(x,optimValues,state,varargin)
2-
% OPTIMPLOTCONSTRVIOLATION Plot max constraint violation at each iteration.
3-
%
4-
% STOP = OPTIMPLOTCONSTRVIOLATION(X,OPTIMVALUES,STATE) plots
5-
% OPTIMVALUES.constrviolation.
6-
%
7-
% Example:
8-
% Create an options structure that will use OPTIMPLOTCONSTRVIOLATION as
9-
% the plot function
10-
% options = optimoptions('fmincon','PlotFcn',@optimplotconstrviolation);
11-
%
12-
% Pass the options into an optimization problem to view the plot
13-
% fmincon(@(x) 3*sin(x(1))+exp(x(2)),[1;1],[],[],[],[],[0 0],[],[],options)
14-
15-
% Copyright 2006-2015 The MathWorks, Inc.
16-
17-
persistent plotavailable plotconstrviolation plotconstrviolationParent
18-
stop = false;
19-
20-
switch state
21-
case 'init'
22-
if isfield(optimValues,'constrviolation')
23-
plotavailable = true;
24-
else
25-
plotavailable = false;
26-
title(getString(message('optim:optimplot:TitleMaxConstrViol', ...
27-
getString(message('optim:optimplot:NotAvailable')))),'interp','none');
28-
end
29-
case 'iter'
30-
if plotavailable
31-
if optimValues.iteration == 0
32-
% The 'iter' case is called during the zeroth iteration,
33-
% but it now has values that were empty during the 'init' case
34-
plotconstrviolation = plot(optimValues.iteration,optimValues.constrviolation,'kd', ...
35-
'MarkerFaceColor',[1 0 1]);
36-
plotconstrviolationParent = plotconstrviolation.Parent;
37-
title(getString(message('optim:optimplot:TitleMaxConstrViol', ...
38-
sprintf('%g',optimValues.constrviolation))),'interp','none');
39-
xlabel(getString(message('optim:optimplot:XlabelIter')),'interp','none');
40-
ylabel(getString(message('optim:optimplot:YlabelConstrViol')),'interp','none');
41-
set(plotconstrviolation,'Tag','optimplotconstrviolation');
42-
else
43-
% plotconstrviolation = findobj(get(gca,'Children'),'Tag','optimplotconstrviolation');
44-
% plotconstrviolation.Parent = plotconstrviolationParent;
45-
newX = [get(plotconstrviolation,'Xdata') optimValues.iteration];
46-
newY = [get(plotconstrviolation,'Ydata') optimValues.constrviolation];
47-
set(plotconstrviolation,'Xdata',newX, 'Ydata',newY);
48-
set(get(plotconstrviolationParent,'Title'),'String', ...
49-
getString(message('optim:optimplot:TitleMaxConstrViol', ...
50-
sprintf('%g',optimValues.constrviolation))));
51-
end
52-
end
53-
end
1+
function stop = optimplotconstrviolationKsptot(x,optimValues,state,varargin)
2+
% OPTIMPLOTCONSTRVIOLATION Plot max constraint violation at each iteration.
3+
%
4+
% STOP = OPTIMPLOTCONSTRVIOLATION(X,OPTIMVALUES,STATE) plots
5+
% OPTIMVALUES.constrviolation.
6+
%
7+
% Example:
8+
% Create an options structure that will use OPTIMPLOTCONSTRVIOLATION as
9+
% the plot function
10+
% options = optimoptions('fmincon','PlotFcn',@optimplotconstrviolation);
11+
%
12+
% Pass the options into an optimization problem to view the plot
13+
% fmincon(@(x) 3*sin(x(1))+exp(x(2)),[1;1],[],[],[],[],[0 0],[],[],options)
14+
15+
% Copyright 2006-2015 The MathWorks, Inc.
16+
17+
persistent plotavailable plotconstrviolation plotconstrviolationParent
18+
stop = false;
19+
20+
switch state
21+
case 'init'
22+
if isfield(optimValues,'constrviolation')
23+
plotavailable = true;
24+
else
25+
plotavailable = false;
26+
title(getString(message('optim:optimplot:TitleMaxConstrViol', ...
27+
getString(message('optim:optimplot:NotAvailable')))),'interp','none');
28+
end
29+
case 'iter'
30+
if plotavailable
31+
if optimValues.iteration == 0
32+
% The 'iter' case is called during the zeroth iteration,
33+
% but it now has values that were empty during the 'init' case
34+
plotconstrviolation = plot(optimValues.iteration,optimValues.constrviolation,'kd', ...
35+
'MarkerFaceColor',[1 0 1]);
36+
plotconstrviolationParent = plotconstrviolation.Parent;
37+
title(getString(message('optim:optimplot:TitleMaxConstrViol', ...
38+
sprintf('%g',optimValues.constrviolation))),'interp','none');
39+
xlabel(getString(message('optim:optimplot:XlabelIter')),'interp','none');
40+
ylabel(getString(message('optim:optimplot:YlabelConstrViol')),'interp','none');
41+
set(plotconstrviolation,'Tag','optimplotconstrviolation');
42+
else
43+
% plotconstrviolation = findobj(get(gca,'Children'),'Tag','optimplotconstrviolation');
44+
% plotconstrviolation.Parent = plotconstrviolationParent;
45+
newX = [get(plotconstrviolation,'Xdata') optimValues.iteration];
46+
newY = [get(plotconstrviolation,'Ydata') optimValues.constrviolation];
47+
set(plotconstrviolation,'Xdata',newX, 'Ydata',newY);
48+
set(get(plotconstrviolationParent,'Title'),'String', ...
49+
getString(message('optim:optimplot:TitleMaxConstrViol', ...
50+
sprintf('%g',optimValues.constrviolation))));
51+
end
52+
end
53+
end
Lines changed: 80 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,80 @@
1-
function stop = optimplotfvalKsptot(~,optimValues,state,varargin)
2-
% OPTIMPLOTFVAL Plot value of the objective function at each iteration.
3-
%
4-
% STOP = OPTIMPLOTFVAL(X,OPTIMVALUES,STATE) plots OPTIMVALUES.fval. If
5-
% the function value is not scalar, a bar plot of the elements at the
6-
% current iteration is displayed. If the OPTIMVALUES.fval field does not
7-
% exist, the OPTIMVALUES.residual field is used.
8-
%
9-
% Example:
10-
% Create an options structure that will use OPTIMPLOTFVAL as the plot
11-
% function
12-
% options = optimset('PlotFcns',@optimplotfval);
13-
%
14-
% Pass the options into an optimization problem to view the plot
15-
% fminbnd(@sin,3,10,options)
16-
17-
% Copyright 2006-2010 The MathWorks, Inc.
18-
19-
stop = false;
20-
switch state
21-
case 'iter'
22-
if isfield(optimValues,'fval')
23-
if isscalar(optimValues.fval)
24-
plotscalar(optimValues.iteration,optimValues.fval);
25-
else
26-
plotvector(optimValues.iteration,optimValues.fval);
27-
end
28-
else
29-
plotvector(optimValues.iteration,optimValues.residual);
30-
end
31-
end
32-
33-
function plotscalar(iteration,fval)
34-
% PLOTSCALAR initializes or updates a line plot of the function value
35-
% at each iteration.
36-
persistent plotfval plotfvalParent
37-
38-
if iteration == 0
39-
plotfval = plot(iteration,fval,'kd','MarkerFaceColor',[1 0 1]);
40-
plotfvalParent = plotfval.Parent;
41-
title(getString(message('MATLAB:optimfun:funfun:optimplots:TitleCurrentFunctionValue',sprintf('%g',fval))),'interp','none');
42-
xlabel(getString(message('MATLAB:optimfun:funfun:optimplots:LabelIteration')),'interp','none');
43-
set(plotfval,'Tag','optimplotfval');
44-
ylabel(getString(message('MATLAB:optimfun:funfun:optimplots:LabelFunctionValue')),'interp','none')
45-
else
46-
% plotfval = findobj(get(gca,'Children'),'Tag','optimplotfval');
47-
% plotfval.Parent = plotfvalParent;
48-
newX = [get(plotfval,'Xdata') iteration];
49-
newY = [get(plotfval,'Ydata') fval];
50-
set(plotfval,'Xdata',newX, 'Ydata',newY);
51-
set(get(plotfvalParent,'Title'),'String',getString(message('MATLAB:optimfun:funfun:optimplots:TitleCurrentFunctionValue',sprintf('%g',fval))));
52-
end
53-
54-
function plotvector(iteration,fval)
55-
% PLOTVECTOR creates or updates a bar plot of the function values or
56-
% residuals at the current iteration.
57-
persistent plotfval
58-
59-
if iteration == 0
60-
xlabelText = getString(message('MATLAB:optimfun:funfun:optimplots:LabelNumberOfFunctionValues0',sprintf('%g',length(fval))));
61-
% display up to the first 100 values
62-
if numel(fval) > 100
63-
xlabelText = {xlabelText,getString(message('MATLAB:optimfun:funfun:optimplots:LabelShowingOnlyFirst100Values'))};
64-
fval = fval(1:100);
65-
end
66-
plotfval = bar(fval);
67-
title(getString(message('MATLAB:optimfun:funfun:optimplots:TitleCurrentFunctionValues')),'interp','none');
68-
set(plotfval,'edgecolor','none')
69-
set(plotfvalParent,'xlim',[0,1 + length(fval)])
70-
xlabel(xlabelText,'interp','none')
71-
set(plotfval,'Tag','optimplotfval');
72-
ylabel(getString(message('MATLAB:optimfun:funfun:optimplots:LabelFunctionValue')),'interp','none')
73-
else
74-
% plotfval = findobj(get(gca,'Children'),'Tag','optimplotfval');
75-
% display up to the first 100 values
76-
if numel(fval) > 100
77-
fval = fval(1:100);
78-
end
79-
set(plotfval,'Ydata',fval);
80-
end
1+
function stop = optimplotfvalKsptot(~,optimValues,state,varargin)
2+
% OPTIMPLOTFVAL Plot value of the objective function at each iteration.
3+
%
4+
% STOP = OPTIMPLOTFVAL(X,OPTIMVALUES,STATE) plots OPTIMVALUES.fval. If
5+
% the function value is not scalar, a bar plot of the elements at the
6+
% current iteration is displayed. If the OPTIMVALUES.fval field does not
7+
% exist, the OPTIMVALUES.residual field is used.
8+
%
9+
% Example:
10+
% Create an options structure that will use OPTIMPLOTFVAL as the plot
11+
% function
12+
% options = optimset('PlotFcns',@optimplotfval);
13+
%
14+
% Pass the options into an optimization problem to view the plot
15+
% fminbnd(@sin,3,10,options)
16+
17+
% Copyright 2006-2010 The MathWorks, Inc.
18+
19+
stop = false;
20+
switch state
21+
case 'iter'
22+
if isfield(optimValues,'fval')
23+
if isscalar(optimValues.fval)
24+
plotscalar(optimValues.iteration,optimValues.fval);
25+
else
26+
plotvector(optimValues.iteration,optimValues.fval);
27+
end
28+
else
29+
plotvector(optimValues.iteration,optimValues.residual);
30+
end
31+
end
32+
33+
function plotscalar(iteration,fval)
34+
% PLOTSCALAR initializes or updates a line plot of the function value
35+
% at each iteration.
36+
persistent plotfval plotfvalParent
37+
38+
if iteration == 0
39+
plotfval = plot(iteration,fval,'kd','MarkerFaceColor',[1 0 1]);
40+
plotfvalParent = plotfval.Parent;
41+
title(getString(message('MATLAB:optimfun:funfun:optimplots:TitleCurrentFunctionValue',sprintf('%g',fval))),'interp','none');
42+
xlabel(getString(message('MATLAB:optimfun:funfun:optimplots:LabelIteration')),'interp','none');
43+
set(plotfval,'Tag','optimplotfval');
44+
ylabel(getString(message('MATLAB:optimfun:funfun:optimplots:LabelFunctionValue')),'interp','none')
45+
else
46+
% plotfval = findobj(get(gca,'Children'),'Tag','optimplotfval');
47+
% plotfval.Parent = plotfvalParent;
48+
newX = [get(plotfval,'Xdata') iteration];
49+
newY = [get(plotfval,'Ydata') fval];
50+
set(plotfval,'Xdata',newX, 'Ydata',newY);
51+
set(get(plotfvalParent,'Title'),'String',getString(message('MATLAB:optimfun:funfun:optimplots:TitleCurrentFunctionValue',sprintf('%g',fval))));
52+
end
53+
54+
function plotvector(iteration,fval)
55+
% PLOTVECTOR creates or updates a bar plot of the function values or
56+
% residuals at the current iteration.
57+
persistent plotfval
58+
59+
if iteration == 0
60+
xlabelText = getString(message('MATLAB:optimfun:funfun:optimplots:LabelNumberOfFunctionValues0',sprintf('%g',length(fval))));
61+
% display up to the first 100 values
62+
if numel(fval) > 100
63+
xlabelText = {xlabelText,getString(message('MATLAB:optimfun:funfun:optimplots:LabelShowingOnlyFirst100Values'))};
64+
fval = fval(1:100);
65+
end
66+
plotfval = bar(fval);
67+
title(getString(message('MATLAB:optimfun:funfun:optimplots:TitleCurrentFunctionValues')),'interp','none');
68+
set(plotfval,'edgecolor','none')
69+
set(plotfvalParent,'xlim',[0,1 + length(fval)])
70+
xlabel(xlabelText,'interp','none')
71+
set(plotfval,'Tag','optimplotfval');
72+
ylabel(getString(message('MATLAB:optimfun:funfun:optimplots:LabelFunctionValue')),'interp','none')
73+
else
74+
% plotfval = findobj(get(gca,'Children'),'Tag','optimplotfval');
75+
% display up to the first 100 values
76+
if numel(fval) > 100
77+
fval = fval(1:100);
78+
end
79+
set(plotfval,'Ydata',fval);
80+
end

0 commit comments

Comments
 (0)