/ Published in: MatLab
Expand |
Embed | Plain Text
% 10.10 Project % Spring 2011 % Jackie Simpson and Ben Frank %========================================================================== % Program flow has been decided-the user wants to simulate the process || %========================================================================== %:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: % A small function necessary as an event handler for button pushes :: %:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: function simCaller(hObject,eventdata) %this function is called in the event that the "simulate" button is pushed. %when it is called, it takes the values from the text fields and passes %them to the Simulator. global ReactorHeater ReactionHeatingPeriod AmountSolvent_S2 field1 field2 field3 % if isnan(ReactorHeater) % errordlg('You must enter a valid numeric value.','Bad Input','modal') % uicontrol(hObject) % return % end % if isnan(ReactionHeatingPeriod) % errordlg('You must enter a valid numeric value.','Bad Input','modal') % uicontrol(hObject) % return % end % if isnan(AmountSolvent_S2) % errordlg('You must enter a valid numeric value.','Bad Input','modal') % uicontrol(hObject) % return % end X(1) = ReactorHeater; X(2) = ReactionHeatingPeriod; X(3) = AmountSolvent_S2; %:::::::::::::::::::::::::::::::::::::::::::::::::: % Step 2(A) - Simulate the entire process :: %::::::::::::::::::::::::::::::::::::::::::::::::::------------------------ Simulator(X); % carries out simulation of process % %F = Overall_Process_Economic_Objective(X); % computes economics associated %with process % Results_Displayer; end
You need to login to post a comment.
