Home > matpower7.1 > mp-opt-model > lib > @opt_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 %   MP-Opt-Model
0009 %   Copyright (c) 2008-2020, Power Systems Engineering Research Center (PSERC)
0010 %   by Ray Zimmerman, PSERC Cornell
0011 %
0012 %   This file is part of MP-Opt-Model.
0013 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0014 %   See https://github.com/MATPOWER/mp-opt-model for more info.
0015 
0016 %% display details of each set type
0017 set_types = {'var', 'nle', 'nli', 'lin', 'qdc', 'nlc'};
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 fprintf('\n');
0026 for k = 1:length(set_types)
0027     om.display_set(set_types{k}, set_names.(set_types{k}));
0028 end
0029 
0030 %% user data
0031 fprintf('  userdata = ');
0032 if ~isempty(om.userdata)
0033     fprintf('\n');
0034 end
0035 if have_feature('octave')
0036     fprintf('    <scalar struct>\n');
0037 else
0038     display(om.userdata);
0039 end

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