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)

totalNormalization(varargin)
function varargout = totalNormalization(varargin)
% TOTALNORMALIZATION M-file for totalNormalization.fig
%      TOTALNORMALIZATION, by itself, creates a new TOTALNORMALIZATION or raises the existing
%      singleton*.
%
%      H = TOTALNORMALIZATION returns the handle to a new TOTALNORMALIZATION or the handle to
%      the existing singleton*.
%
%      TOTALNORMALIZATION('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in TOTALNORMALIZATION.M with the given input arguments.
%
%      TOTALNORMALIZATION('Property','Value',...) creates a new TOTALNORMALIZATION or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before totalNormalization_OpeningFunction gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to totalNormalization_OpeningFcn via 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 totalNormalization

% Last Modified by GUIDE v2.5 16-Oct-2007 20:33:08

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @totalNormalization_OpeningFcn, ...
                   'gui_OutputFcn',  @totalNormalization_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 totalNormalization is made visible.
function totalNormalization_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 totalNormalization (see VARARGIN)

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

% Update handles structure
guidata(hObject, handles);

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


% --- Outputs from this function are returned to the command line.
function varargout = totalNormalization_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;



% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %totalTraff_edit - OFFERED TOTAL TRAFFIC
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function totalTraff_edit_Callback(hObject, eventdata, handles)
% hObject    handle to totalTraff_edit (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of totalTraff_edit as text
%        str2double(get(hObject,'String')) returns contents of totalTraff_edit as a double


% --- Executes during object creation, after setting all properties.
function totalTraff_edit_CreateFcn(hObject, eventdata, handles)
% hObject    handle to totalTraff_edit (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%trafficMatrix_edit - TRAFFIC MATRIX
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function trafficMatrix_edit_Callback(hObject, eventdata, handles)
% hObject    handle to trafficMatrix_edit (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of trafficMatrix_edit as text
%        str2double(get(hObject,'String')) returns contents of trafficMatrix_edit as a double


% --- Executes during object creation, after setting all properties.
function trafficMatrix_edit_CreateFcn(hObject, eventdata, handles)
% hObject    handle to trafficMatrix_edit (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Apply_pushbutton - Pushbutton to save the Traffic Matrix defined by
%the user
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% --- Executes on button press in Apply_pushbutton.
function Apply_pushbutton_Callback(hObject, eventdata, handles)
% hObject    handle to Apply_pushbutton (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

load_global_traffGen;

auxTotalTraffic=str2num(get(handles.totalTraff_edit,'String'));
if isempty(auxTotalTraffic), 
    errordlg('The total offered traffic must be a positive number','Incorrect Value','modal');
    return
elseif auxTotalTraffic <=0,
     errordlg('The total offered traffic must be a positive number','Incorrect Value','modal');
     return
else
    totalTraffic=auxTotalTraffic;
end

close;



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Cancel_pushbutton - Pushbutton to cancel the Traffic Generation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% --- Executes on button press in Cancel_pushbutton.
function Cancel_pushbutton_Callback(hObject, eventdata, handles)
% hObject    handle to Cancel_pushbutton (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

close;










Contact us