I'd like to see all intermediate solutions of fval and d
(my variable set) that the program generates, while it is
converging. Is there a way of doing this? Setting the
display option to iter lets me see the objective function
values, but I haven't been able to find a way to see the d
(solution set) values.
The reason I am trying to see all intermediate values is
that I suspect that my problem has multiple optimal
solutions. So I'm just trying to see all the solutions that
linprog was able to generate... Is there an alternative way
of doing this?
I also have another related question: When I set display
to "iter", what do the "Dual Infeasibility" values that are
displayed imply?
> options=optimset
>
('LargeScale', 'off', 'Simplex', 'on', 'Diagnostics', 'on',
> 'Display', 'iter', 'MaxIter', 10000, 'TolFun', 10e-8);
>
> [d,fval,exitflag]=linprog(fM,AM,bM,[],[],0,1,[],options)
>
> I'd like to see all intermediate solutions of fval and d
> (my variable set) that the program generates, while it is
> converging.
Use the "OutputFcn" property of the options structure.
Check the documentation for OutputFcn.
> I also have another related question: When I set display
> to "iter", what do the "Dual Infeasibility" values that
are displayed imply?
Searching the MATLAB doc for "Dual Infeasibility" led me to
a line that says:
Dual Infeasibility: A'*y+z-w-f
I'm not even going to start to explain what this means
(because I won't be able to do it well). But I am hoping
Mr. D'Errico can and will explain it (well).
"H A" <cositsjunk@yahoo.com> wrote in message
<g0d64e$97i$1@fred.mathworks.com>...
>
> The reason I am trying to see all intermediate values is
> that I suspect that my problem has multiple optimal
> solutions. So I'm just trying to see all the solutions that
> linprog was able to generate... Is there an alternative way
> of doing this?
>
You might take a look at the Lagrange variable (lambda)
output. Combined lambda with cost coefficients, you can see
whereas your LP is degenerated or not.
"helper " <spamless@nospam.com> wrote in message
<g0d8ae$n3k$1@fred.mathworks.com>...
>
> > options=optimset
> >
>
('LargeScale', 'off', 'Simplex', 'on', 'Diagnostics', 'on',
> > 'Display', 'iter', 'MaxIter', 10000, 'TolFun', 10e-8);
> >
> > [d,fval,exitflag]=linprog(fM,AM,bM,[],[],0,1,[],options)
> >
> > I'd like to see all intermediate solutions of fval and
d
> > (my variable set) that the program generates, while it
is
> > converging.
>
>
>
>
> Use the "OutputFcn" property of the options structure.
> Check the documentation for OutputFcn.
>
>
>
>
> > I also have another related question: When I set
display
> > to "iter", what do the "Dual Infeasibility" values that
> are displayed imply?
>
>
>
>
> Searching the MATLAB doc for "Dual Infeasibility" led me
to
> a line that says:
>
> Dual Infeasibility: A'*y+z-w-f
>
> I'm not even going to start to explain what this means
> (because I won't be able to do it well). But I am hoping
> Mr. D'Errico can and will explain it (well).
>
>
>
function stop = outfun (x, optimValues, state)
stop = false;
switch state
case 'iter'
history.fval = [history.fval; optimValues.fval];
history.x = [history.x; x];
otherwise
end
end
history.fval
history.x
.....................................
But both history.fval and history.x come back empty... am I
missing something?
"helper " <spamless@nospam.com> wrote in message
<g0d8ae$n3k$1@fred.mathworks.com>...
>
> > options=optimset
> >
>
('LargeScale', 'off', 'Simplex', 'on', 'Diagnostics', 'on',
> > 'Display', 'iter', 'MaxIter', 10000, 'TolFun', 10e-8);
> >
> > [d,fval,exitflag]=linprog(fM,AM,bM,[],[],0,1,[],options)
> >
> > I'd like to see all intermediate solutions of fval and
d
> > (my variable set) that the program generates, while it
is
> > converging.
>
>
>
>
> Use the "OutputFcn" property of the options structure.
> Check the documentation for OutputFcn.
>
>
>
>
> > I also have another related question: When I set
display
> > to "iter", what do the "Dual Infeasibility" values that
> are displayed imply?
>
>
>
>
> Searching the MATLAB doc for "Dual Infeasibility" led me
to
> a line that says:
>
> Dual Infeasibility: A'*y+z-w-f
>
> I'm not even going to start to explain what this means
> (because I won't be able to do it well). But I am hoping
> Mr. D'Errico can and will explain it (well).
>
>
>
function stop = outfun (x, optimValues, state)
stop = false;
switch state
case 'iter'
history.fval = [history.fval; optimValues.fval];
history.x = [history.x; x];
otherwise
end
end
history.fval
history.x
.....................................
But both history.fval and history.x come back empty... am I
missing something?
Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central. Read the complete Disclaimer prior to use.