No BSD License  

Highlights from
MatPlanWDM v0.5

image thumbnail

MatPlanWDM v0.5

by

 

29 Jan 2007 (Updated )

Educational network planning tool for the RWA problem in WDM networks (MILP and heuristic based)

metadataFigure_MH(varargin)
function varargout = metadataFigure_MH(varargin)

%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Copyright 2002-2003 The MathWorks, Inc.

% Edit the above text to modify the response to help columnNormalization

% Last Modified by GUIDE v2.5 16-Oct-2007 21:28:32

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @metadataFigure_MH_OpeningFcn, ...
                   'gui_OutputFcn',  @metadataFigure_MH_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT

% --- Executes just before metadata is made visible.
function metadataFigure_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to metadata (see VARARGIN)

% Choose default command line output for metadata
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes metadata wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = metadataFigure_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%pushbuttonSaveXML - 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function varargout = pushbuttonSaveMetadata_Callback(h, eventdata, handles, varargin)

load_global_Multihour;
if timeSlotToSave~=-1
    %We open the file to save our XML file (*.xml)'
    metadata = struct('title', get(handles.editTitle,'String'), 'author', get(handles.editAuthor,'String'), 'date', datestr(now), 'multihourPlanning', ['false'],...
        'planningAlgorithmFile', method, 'planningAlgorithmParametersString', algorithmParameters, 'flowGeneratorFile', [''],...
        'flowGeneratorParametersString', [''], 'trafficMatrixFile', trafficFilename, 'description', get(handles.editDescription,'String'));
    [filename, pathname] = uiputfile({'*.xml','Extensible Markup Language File (*.xml)'},'Save XML File per a time slot','data\results\vtDesign\');
    fullpathname=[pathname filename];
    DTDpathname = '../../dtd/vtDesign.dtd';

    %NOTE: the pathname can be different
    sweepOfNetStates{timeSlotToSave}
    io_writeXML(metadata, phys, sweepOfNetStates{timeSlotToSave}, fullpathname, DTDpathname);
    close;
else
    %We open the file to save our XML file (*.xml)'
    metadata = struct('title', get(handles.editTitle,'String'), 'author', get(handles.editAuthor,'String'), 'date', datestr(now), 'multihourPlanning', ['true'],...
        'planningAlgorithmFile', method, 'planningAlgorithmParametersString', algorithmParameters, 'flowGeneratorFile', [''],...
        'flowGeneratorParametersString', [''], 'trafficMatrixFile', trafficFilename, 'description', get(handles.editDescription,'String'));
    [filename, pathname] = uiputfile({'*.xml','Extensible Markup Language File (*.xml)'},'Save XML File','data\results\multiHourAnalysis\');
    fullpathname=[pathname filename];
    DTDpathname = '../../dtd/multiHourAnalysis.dtd';
    
    %Check netState correct
    try
        flag_removeLoops=1;
        flag_checkLpRoutingMatrix=1;
        flag_lossesAllowed=1;
        flag_checkLoops=1;
        [flag_modifiedNetState sweepOfNetStates] = checkNetState_MH(sweepOfNetStates , phys, multiHourTrafficMatrices, flag_checkLoops, flag_removeLoops , flag_checkLpRoutingMatrix, flag_lossesAllowed);
    catch
        lastErrorMsg=lasterr;
        errordlg(lastErrorMsg,'Unexpected Error on checking the planned design!!!','modal')
        return;   
    end

    %NOTE: the pathname can be different
    io_writeXML_MH(metadata, phys, sweepOfNetStates, fullpathname, DTDpathname);
    close;
end


Contact us