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)

metadataFigureDynamic(varargin)
function varargout = metadataFigureDynamic(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', @metadataFigureDynamic_OpeningFcn, ...
                   'gui_OutputFcn',  @metadataFigureDynamic_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_Dynamic;

%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', algorithmMethod, 'planningAlgorithmParametersString', algorithmParameters, 'flowGeneratorFile', generator,...
    'flowGeneratorParametersString', generatorParameters, 'trafficMatrixFile', [''], 'description', get(handles.editDescription,'String'));
[filename, pathname] = uiputfile({'*.xml','Extensible Markup Language File (*.xml)'},'Save XML File','data\results\dynamicVTD\');
fullpathname=[pathname filename];
DTDpathname = '../../dtd/vtDesign.dtd';

%NOTE: the pathname can be different
%Check netState correct
try
    flag_removeLoops=1;
    flag_checkLpRoutingMatrix=1;
    flag_lossesAllowed=1;
    flag_checkLoops=1;
    [flag_modifiedNetState netState]= checkNetState(netState , phys, trafficMatrix , flag_checkLoops, flag_removeLoops , flag_checkLpRoutingMatrix , flag_lossesAllowed);

catch
    lastErrorMsg=lasterr;
    errordlg(lastErrorMsg,'Unexpected Error on checking the planned design!!!','modal')
    return;   
end
io_writeXML(metadata, phys, netState, fullpathname, DTDpathname);
close;

Contact us