Home > matpower7.1 > lib > @opf_model > display.m

display

PURPOSE ^

DISPLAY Displays the object.

SYNOPSIS ^

function display(om)

DESCRIPTION ^

DISPLAY  Displays the object.
   Called when semicolon is omitted at the command-line. Displays the details
   of the variables, constraints, costs included in the model.

   See also OPT_MODEL.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function display(om)
0002 %DISPLAY  Displays the object.
0003 %   Called when semicolon is omitted at the command-line. Displays the details
0004 %   of the variables, constraints, costs included in the model.
0005 %
0006 %   See also OPT_MODEL.
0007 
0008 %   MATPOWER
0009 %   Copyright (c) 2008-2020, Power Systems Engineering Research Center (PSERC)
0010 %   by Ray Zimmerman, PSERC Cornell
0011 %
0012 %   This file is part of MATPOWER.
0013 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0014 %   See https://matpower.org for more info.
0015 
0016 %% display details of each set type
0017 set_types = {'var', 'nle', 'nli', 'lin', 'qdc', 'nlc', 'cost'};
0018 set_names = struct(...
0019     'var',  'VARIABLES', ...
0020     'nle',  'NONLIN EQ CONSTRAINTS', ...
0021     'nli',  'NONLIN INEQ CONSTRAINTS', ...
0022     'lin',  'LINEAR CONSTRAINTS', ...
0023     'qdc',  'QUADRATIC COSTS', ...
0024     'nlc',  'GEN NONLIN COSTS', ...
0025     'cost', 'LEGACY COSTS'  );
0026 fprintf('\n');
0027 for k = 1:length(set_types)
0028     om.display_set(set_types{k}, set_names.(set_types{k}));
0029 end
0030 
0031 %% user data
0032 fprintf('  userdata = ');
0033 if ~isempty(om.userdata)
0034     fprintf('\n');
0035 end
0036 if have_feature('octave')
0037     fprintf('    <scalar struct>\n');
0038 else
0039     display(om.userdata);
0040 end
0041 
0042 fprintf('  mpc = ');
0043 if ~isempty(fieldnames(om.mpc))
0044     fprintf('\n');
0045 end
0046 if have_feature('octave')
0047     fprintf('    <scalar struct>\n');
0048 else
0049     display(om.mpc);
0050 end

Generated on Fri 09-Oct-2020 11:21:31 by m2html © 2005