#LyX 2.0 created this file. For more info see http://www.lyx.org/
\lyxformat 413
\begin_document
\begin_header
\textclass article
\use_default_options true
\maintain_unincluded_children false
\language english
\language_package default
\inputencoding auto
\fontencoding global
\font_roman default
\font_sans default
\font_typewriter default
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100

\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\use_hyperref false
\papersize default
\use_geometry false
\use_amsmath 1
\use_esint 1
\use_mhchem 1
\use_mathdots 1
\cite_engine basic
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\use_refstyle 1
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\author -2044378804 "Derrick Yee" 
\end_header

\begin_body

\begin_layout Title
Software Engineering Projects
\end_layout

\begin_layout Author
Derrick Yee
\end_layout

\begin_layout Date
December 13, 2013
\end_layout

\begin_layout Standard
\begin_inset Newpage pagebreak
\end_inset


\end_layout

\begin_layout Section
Problem Definition
\end_layout

\begin_layout Subsection
Introduction
\end_layout

\begin_layout Standard
This case study will be focused on improving software engineering practices
 throughout the AguaClara files and code repositories.
 This will include implementing a streamlined process in documenting code,
 increasing efficiency in methods, and looking into upgrades to the current
 software.
 In addition, this report will go in depth of a project to create a plant
 cost calculator on the AguaClara website.
\end_layout

\begin_layout Standard
First, this case study analyzes the relationship between the three different
 EtFlocSedFi files.
 The goal of the case study is to find an efficient solution in combining
 the three files and possibly reduce the amount of references within the
 files and finding possible organization methods.
 This change is necessary because the three files do not currently communicate
 with one another.
 For example, if the manifold size were to change on the regular EtFlocSedFi
 file, then the EtFlocSedFi Low and High will not change.
 The task is to first analyze the layout of the code on the server of the
 EtFlocSedFi files, which is compilation of all of the methods throughout
 the design folder.
 This consists of analyzing how the code is exactly referencing each other.
 The second step is to see how the referencing can be minimized.
 This will require to look into how MathCAD is operated and reading the
 full functionality.
 This will also include looking into other versions of MathCAD and reading
 into those specifications and functionalities.
 The goal is minimization and clarity.
 The problem that is trying to be solved is the fact that the methods and
 some of the functions within the files are hard to understand, as there
 are no documentations.
 This can lead to misunderstanding from member to member of the AguaClara
 team.
 The methods within the three files are similar in the sense that they have
 the same references that work to create the Flocculator, Sed Tanks, SRSF,
 etc..., but the AutoCAD Script Files in each of the three files are completely
 different.
 
\end_layout

\begin_layout Standard
The purpose of creating a plant cost calculator on the AguaClara website
 is to better communicate cost information to the users of the website.
 There are different factors that will be going into creating the plant
 cost calculator, such as including information such as capital costs, technolog
y costs, and operating costs.
 The plant cost calculator will need to break down the total costs into
 these segments and walk a potential client through the process and costs
 of creating a plant.
 The same principles will be applied in creating this calculator of having
 strong documentation and clarity in order to efficiently communicate the
 information to the potential clients.
 The costs are calculated within a MathCAD document, and it will be necessary
 to go through and present the calculations in a readable format for the
 user.
 Many design decisions will be made in order to make the project intuitive.
 
\end_layout

\begin_layout Subsection
MathCAD Documentation Guideline
\end_layout

\begin_layout Standard
This section is a general rule of how each function file should be documented
 and formatted on the MathCad files.
 The purpose of this document is to ease the current clarity of all of the
 files on the AguaClara server, and increase collaboration between people
 working with the same files and code.
 The targeted audience for the document are for the design team within the
 AguaClara team utilizing the code repository to create MathCAD drawings.
 
\end_layout

\begin_layout Standard

\series bold
Proposed format: 
\end_layout

\begin_layout Standard
\SpecialChar \textcompwordmark{}

\end_layout

\begin_layout Standard

\series bold
File Name.

\series default
 The top of the file should include the file name and documentation of an
 overview of the file.
 The documentation should include purpose of the file, and what it is going
 to be used for.
 (Ex.
 include what other functions will call this fill or what does it draw exactly.)
 The reason of this comment is for people to open the file and easily read
 the first line of the document and know exactly what to expect with the
 file/function.
 
\end_layout

\begin_layout Standard

\series bold
References.

\series default
 List all references that the function will call in order for the current
 file to work.
 This is using the Mathcad functionality of referencing/exporting other
 files for the function to reuse variable names and functions.
 This current system is already in place, and it should be noted that the
 order in which files are referenced do matter.
 There should be enough operations for the task, and avoid unnecessary reference
s.
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Graphics
	filename Reference doc.png
	scale 60
	clip

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Example of good reference documentation; pulled from the EtFlocSedFi file
 on the AguaClara code server.
 
\end_layout

\end_inset


\end_layout

\begin_layout Plain Layout

\end_layout

\end_inset


\end_layout

\begin_layout Standard

\series bold
Input Values.

\series default
 This section will have all of the mutable input values that the designer
 can put in place.
 Comment out what the input values mean and explain the variable name that
 you are defining with the inputs.
\end_layout

\begin_layout Standard

\series bold
Variables/Functions.

\series default
 The functions are currently grouped by topics, and this model is adequate.
 Before each function, the input and output should be indicated for each
 function in order to clearly communicate to other engineers.
 A good description is definitional, and a bad description would be operational.
 Also, describe what the method does (abstractly).
 Exceptions to this would be defining variables with a relative obvious
 purpose of it.
 
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Graphics
	filename function_doc.png
	scale 60

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Example of good documentation in describing the variables and functions.
 
\end_layout

\end_inset


\end_layout

\begin_layout Plain Layout

\end_layout

\end_inset


\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Graphics
	filename topic_organization.png
	scale 60

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Example of how functions are grouped by topics.
 This example is pulled from the EntranceTank file.
 The functions and variables are sorted in a manner in which relate to the
 topics.
 
\end_layout

\end_inset


\end_layout

\begin_layout Plain Layout

\end_layout

\end_inset


\end_layout

\begin_layout Subsection
Design Details
\end_layout

\begin_layout Subsubsection*
EtFlocSedFi Files
\end_layout

\begin_layout Standard
The EtFlocSedFi files are referencing to the same files in the sections
 of MathCAD dimensions, AutoCAD drawing programs, Translators, Drawing functions
, Material Lists, and Layouts.
 The current model requires the user to know which range the flow rates
 falls in to know whether the Low, Regular, or High files will be executed.
 The main priority in reorganizing the code is having all of the functionality
 work, as if nothing had changed in the server.
 The challenge will be testing and debugging the reference changes throughout
 the code.
 The worse-case scenario will be that the changes will prevent the designs
 from working since the methods will no longer work correctly.
 
\end_layout

\begin_layout Standard
The task is to first analyze the layout of the code on the server.
 This consists of analyzing how the code is exactly referencing each other
 (for example, if the referencing is occurring outside of the file or is
 internally referencing in the same file).
 The second step is to see how the referencing can be minimized.
 SourceForge is a server that keeps all of the files together, and has no
 value added to all of the files and overall layout to the code.
 This will also include an investigation in other versions of MathCAD to
 explore other functionalities to execute the goal.
 In particular, MathCad Prime 3.0 will be investigated for the features and
 functionalities.
 
\end_layout

\begin_layout Subsubsection*
AguaClara Plant Cost Calculator
\end_layout

\begin_layout Standard
The purpose of the plant cost calculator is to share the cost information
 from the website and to make this information more visible.
 In designing the plant cost calculator, the design portion is separated
 into three different sections.
 The first is to determine the user needs.
 In this case, the user needs to receive information regarding the plant
 cost estimation.
 The user will be providing the input so that they will have a good idea
 on the cost estimate of the plants to make an informed decision.
 The most important factors to keep in mind in the design process is having
 the most accurate information and having a very clean and intuitive design
 for the users.
 Documentation is extremely important to tell users the intermediate steps
 in how the costs are being calculated and the total costs.
 The web page should be live and be dynamically changing through the contents
 of the pages as the user changes its input.
 Calculations will be derived from the MathCad document that calculates
 and compares the pricing of Mechanized and AguaClara.
 Utilizing the user input of a community size, dimensional analysis will
 be used in order to calculate the total pricing by multiplying the values
 by the proportions.
 These calculations will be made on a separate file that the website will
 pull from in order to display the information.
\change_inserted -2044378804 1385370476

\end_layout

\begin_layout Section
Documented Progress
\end_layout

\begin_layout Subsection
EtFlocSedFi Files
\end_layout

\begin_layout Standard
This section will document the process of combining the three EtFlocSedFi
 files within the AguaClara code server.
 Within the three EtFlocSedFi files, it is noted that the references in
 the MathCAD dimensions and AutoCAD drawing functions are identical in the
 low, high, and regular EtFlocSedFi files.
 The main difference is in the AutoCAD script files.
 A solution to combine all three of the documents will include an if-else
 statement to execute the chunk of code.
 
\end_layout

\begin_layout Standard

\series bold
Overview of proposed code structure: 
\end_layout

\begin_layout Standard
If (Qplant:= regular) { then references for the regular EtFlocSedFi references....
 }
\end_layout

\begin_layout Standard
If (Qplant:= low) { then references for the regular EtFlocSedFi references.....}
\end_layout

\begin_layout Standard
If (Qplant:=high) { then references for the high EtFlocSedFi references....}
\end_layout

\begin_layout Standard
The proposed solution from above will required for the MathCAD file to support
 this implementation.
 However, as combining these issues were being investigated, it was determined
 that MathCAD 15.0 will not be able to support this functionality.
 This prompted a research in MathCAD Prime 3.0, an advanced program that
 should behave similar to MathCAD 15.0 but contain a significant improvements
 in features to benefit the AguaClara design team.
 
\end_layout

\begin_layout Subsection
MathCAD Prime 3.0
\end_layout

\begin_layout Standard
The new MathCAD 3.0 is a lot quicker in terms of making calculations and
 the crashing/lagging was significantly improved compared to that of MathCAD
 15.0.
 Making documentations can be aesthetically clearer with MathCad 3.0.
 This will help with the clarity and communication within the team using
 the software.
 In addition, with MathCad 3.0, users are now able to integrate functions
 from C, C++ or other programming languages, which can allow me to solve
 the case statements with references to the files.
 The files will be called externally on the C or C++ programs that would
 use the if-else statements and be fed back into MathCAD Prime 3.0.
 There were steps taken in order to test the options of converting the files
 from the current MathCAD 15.0 to MathCAD Prime 3.0.
 The first step was to download the 30-day trial, made an account, read
 through all of the new features, and converted the files.
 
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Graphics
	filename Image 1.PNG
	lyxscale 30
	scale 30

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Screen of initializing MathCAD Prime 3.0 and converting AguaClara files to
 the new software.
 
\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Standard
The problems encountered was that the MathCAD files being run on prime 3.0
 were not behaving the same way in MathCAD 15.0.
 This is because the syntax difference between the programs causes complications
 that are currently not resolved.
 More specifications and features will have to be read in order to solve
 this issue.
 In addition, getting the actual program and receiving all of the functionalitie
s is a challenge due to the pricing and availability of resources.
 
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Graphics
	filename Image 4.PNG
	lyxscale 40
	scale 30
	BoundingBox 0bp 0bp 1350bp 927bp

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Error page of converting MathCAD 15.0 files to MathCAD 3.0.
 The files have synatax errors that disable the program from operating similar
 to that of MathCAD 15.0.
\end_layout

\end_inset


\end_layout

\begin_layout Plain Layout

\end_layout

\end_inset


\end_layout

\begin_layout Standard
The MathCAD prime 3.0 had a lot of technical difficulties to work with full
 functionality.
 This resulted in the process of contacting the support group in order to
 properly set up the program on a computer.
 
\end_layout

\begin_layout Subsection
Plant Cost Calculator
\end_layout

\begin_layout Standard
The design of the AguaClara plant cost calculator will be outlined within
 this section.
 The first task is to analyze the user needs.
 The user will need to be able to get an accurate estimate of the cost of
 building a plant.
 The user will provide two inputs of the flow rate of the plant that the
 user will want and the location in which the plant will be built.
 Using this information, a cost can be calculated and the user will want
 this information to be comprehensive and clear to read.
 The information should be well displayed and be well integrated with the
 website.
 In the breakdown of information, the user will want to know: technology
 transfer cost, capital costs for building a plant, and operating costs.
 The second step will be determining how the data will be stored.
 Currently, the calculations are within a MathCad file that step through
 all of the cost calculation, such as electricity, interest, capital, design,
 etc.
 To simplify the calculations for the files, the data should be in a separate
 file.
 The calculations can be made within the HTML file, and the main page will
 call references to access those data.
 The document in which the information and data will be stored will need
 to be well documented so that it can be easy to read and check whether
 calculations are correct.
 A lot of the calculations are unit conversions to convert information such
 as electricity unit to pricing.
 The data will be transferred and the HTML file will be dynamically changing
 using DOM principles to give it a 
\begin_inset Quotes eld
\end_inset

live
\begin_inset Quotes erd
\end_inset

 effect in the calculation.
\end_layout

\begin_layout Standard
Using the information provided above with a clear objective and direction
 of the cost calculator, the design of the AguaClara Plant Cost Calculator
 can be created.
 The most important information of the two inputs will be focused and verified
 as the user inputs the information.
 As the input is put in, a chart will be generated a segregated bar graph
 that dissects the total price into subsections of different colors.
 If the user scrolls over the sections, more information will be provided
 on how the costs were calculated.
 The most important piece of this will be clarity that will allow people
 to easily see the costs and the breakdown.
\end_layout

\begin_layout Section
Future Work
\end_layout

\begin_layout Standard
The next step is to determine how the code could be referenced by looking
 into the code of C or C++ in having an internal references to call upon
 the differentiating AutoCAD files within the EtFlocSedFi.
 After downloading the trial version these following steps need to be followed,
 as the issues were solved with receiving a 30-day trial of the program:
\end_layout

\begin_layout Standard
1.
 Launch the MathCAD Prime icon (M) 
\end_layout

\begin_layout Standard
2.
 Select MathCAD options from the drop down menu
\end_layout

\begin_layout Standard
3.
 Select license tab and get trial license
\end_layout

\begin_layout Standard
4.
 Sign in with the account.
\end_layout

\begin_layout Standard
The next step would be to use the MathCAD prime 3.0 and continue to test
 whether the files on the AguaClara server work.
 The files are being currently run on MathCAD 15.0 and the best case scenario
 is to have the same output and work functionally, but have all of the benefits
 mentioned previously in the report.
 
\end_layout

\begin_layout Standard
In addition, creating a running prototype of the calculator and implement
 the calculator into the website will be next step with the following design
 (Figure 6).
 The challenge will be calculating the most accurate calculations and documentin
g the process.
 
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Graphics
	filename 001.jpg
	lyxscale 20
	scale 60

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Paper prototype of the AguaClara Plant Cost Calculator.
 
\end_layout

\end_inset


\end_layout

\begin_layout Plain Layout

\end_layout

\end_inset


\end_layout

\end_body
\end_document
