54
For local review only: For NAVSEA review: For more information: fl 1. nbstract of paper Brochure #, L :1]ti.x:'ffi",ffs*o= ' 'pr Submit one copy of this form with one capy of document ' (DO NOT submit original manuscript) Submit one copy of this form with two copies of docunent See DIRCINST5605.1 EE[!| (checkone) lo. lt Ee. []s. El 2. Paper, Paper Discussion, or Speech (lnclude viewgraphs/slides) n 3. New Report (lnclude number) _ fl4. Formerly Limited Document fl 5. World Wide Web Page(s) (Use Form 5605/14) ritre *rrw6 tpg€ DtF.FcT(vFf Date Required PReWeussy DCU€ uo|E 0 6t#fqt€r'L asitt Er,rlEPF'cE ( 6AE) Phone 2e2 -tz t z Author(s) sEAP's and Mentor's NAME: g Ft t+l,l S e fiw nw'. ( cut t Lf nea R t€,#frWi&) / hgtrpta Date Initiated | | tu6 }s?.f Purpose (lf technical paper or speech, include wnen, wn@ SEAP PROGRAM at NSWCCD (West Bethesda site) informal comments do not constitute official release - NSWCCD release is determined by Code It is the opinion of the author that the mateial to be released h1s no military application requiing classification, does nol contain controlled technology according to the Military Citicat Technologies List, and does' not iisclose triii i..i.,iii" "i privileged information. AII referenced mateial is unclassified and ctearddforpublic release Code Date ln Date Out 4rq 0117 Remarks , 35.to P tll'u'6 nLfu&+u urEl/ro P) I have made the determinations required under DOD 5500.7R (See Reverse) Date Retarrned: NAVSEA REVIEW Determination: n vrs fl No Date Fonararded: Relations Branch. Code 3810

ProbE_DOD_2005

Embed Size (px)

Citation preview

Page 1: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 1/54

For local review only:

For NAVSEAreview:

For more information:

fl 1. nbstract of paper Brochure #, L

:1]ti.x:'ffi",ffs*o=' 'pr

Submit one copy of this form with one capy of document '

(DO NOT submit original manuscript)

Submit one copy of this form with two copies of docunentSee DIRCINST5605.1

EE[!| (checkone) lo.ltEe.[]s.

El 2. Paper, Paper Discussion, or Speech (lnclude viewgraphs/slides)n 3. New Report (lnclude number) _fl4. Formerly Limited Document

fl 5. World Wide Web Page(s) (Use Form 5605/14)

ritre

*rrw6tpg€ DtF.FcT(vFf Date Required

PReWeussy DCU€ uo|E 0 6t#fqt€r'Lasitt Er,rlEPF'cE ( 6AE) Phone

2e2 -tz t zAuthor(s) sEAP's and Mentor's NAME: g Ft t+l,l S e fiw nw'. ( cut t Lf nea R t€,#frWi&) / hgtrpta

Date Initiated

| | tu6 }s?.f

Purpose (lf technical paper or speech, include wnen, wn@SEAP PROGRAM at NSWCCD (West Bethesda site)

informal comments do not constitute official release- NSWCCD release is determined by Code

It is the opinion of the author that the mateial to be released h1s no military application requiing classification, does nolcontain controlled technology according to the Military Citicat Technologies List, and does' not iisclose triii i..i.,iii"

"iprivileged information. AII referenced mateial is unclassified and ctearddforpublic release

Code Date ln Date Out

4rqRemarks

P tll'u'6 nLfu&+u urEl/ro P)

Page 2: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 2/54

Adding ProbE Directives to a Previously Developed

Graphical User Interface (GUI)

Brian Schwartz

Winston Churchill High School

August 11, 2005

Mentor

William M. Richardson

Naval Surface Warfare Center. Carderock Division

Page 3: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 3/54

CONTENTS

SectionAbstract

Introduction....Main Problem . .

The Goal

Program Design

Introduction....Human Interface Guidelines

lmplementation of Basic Program Functionality . ' '

Start UpAutomated Point Directive Creation

Automated Assembly Directive Creation

Creation of Plate Directives

Creation of Stiffener Directives . . . .

Creation of Shape Directives

Other Program Functionality . . .

File MenuFile Save Operations

File Open Operations

File Quit Operations

Directive Menu

Selecting Points and Assemblies .

Modifying Directives

Option Menu

Previous Viewing Area Operation . '

Restore Original Viewing Area Operation . .

ProbEinput Optimizations .

Page #

66

7

9

1l11

I4I6

r6I6l6T7

18

18

20

2l

2l2l22

Page 4: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 4/54

Figure #

FIGURES

Figure DescriptionProbEinput Menus

Start Up Screen

Before Clicking the "accept point" Button

After Clicking the "accept point" Button

Before Clicking the "accept assembly" Button

After Clicking the "accept assembly" Button

Example Plate Directive Before Creation

List of Existing Assembly Directives . . .

Assembly Name Automatically Filled In . ' .

Example of a Shape Directive Defining a T. . .

Assembly With a Stiffener.

Finding Local Coordinates for T-Shape . . . .

Opened ProbE Input File ExamPle

Quit Dialog Box . .

Selecting a Point Directive

Selecting an Assembly Directive . . . .

Modifying an Assembly (Highlighting Assembly In List) . .

Modifying an Assembly (Referencing "Connected Points"

Field to an Undefined Point)

Page #3

6

1

8

9

10

1l

t2t214

15

15

t6U

I2

3

4

5

6

7

8

9

10

11

t213

T4

15

16

I718

18

t920

Page 5: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 5/54

ABSTRACT

ProbE is a computer program that estimates the probability ofseaway loads exceeding the structural resistance over the lifetime of a

ship. Both loads and structural resistance are treated as random variables.

ProbEinput is designed to speed up prepalation of ProbE input file

directivei by supplying a graphical user interface (GUI) to allow for quick

creation, modification, and verification of ship geometry, as well as

inputting information on material properties, operational conditions, and

statistical distributions. The scope of this report pertains to the

development of an interface that seamlessly integrates ProbEinput'sgraphing capabilities with the ability to create, modify, and verify ProbE

input files textually as well as graphically in an intuitive and efhcient

manner.

INTRODUCTION

"ProbE computes the probability of exceedance of a ship cross section's strengthunder seaway loading by analyzing the components that make it up. These structural

components are specified by geometry and material directives that are input into ProbE

from a user-supplied input file. For a station, geometry and material directives describe

the location and properties of a cross section's assemblies, plates, points, shapes, and

stiffeners. Additional directive types describe the environment in which the ship operates

as well as statistical distributions" fSchwartz,20041.

The fundamental unit making up a cross section is a subsection consisting of an

assembly, plate, and stiffeners. To make use of a fundamental unit requires material and

shape directives.

Page 6: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 6/54

The following are two examples of point directives:

point 0 3.sta_!7 5.0 0.0 none nonepoint 0 5.sta_27 48.0 0.0

First example in words:

The point named "3.sta 27" lies on the 5.0 inch waterline and has a half breadth

of 0.0 inches. There is no statistical variability associated with either dimension ('none').

Second example in words:

The point named "5.sta_2J" lies on the 48.0 inch waterline and has a half breadthof 0.0 inches. The statistical variability associated with either dimension is not stated, so

ProbE will set the associated statistical distribution names to be 'not defined'.

Main Problem

"Creating a ProbE input file for a single cross section can sometimes take

upwards to two weeks. This is not surprising since a ProbE input file for a large ship

cross section can average 300 point directives and about half as many assembly directives

alone. Unfortunately, much of the time creating the text file is not consumed in thetyping in of directives, but rather in error-checking for missing and repeated directives as

well as for incorrect information in the directives" fSchwartz,2004l.

"The problem resides in the fundamental nature of assembly and point directives.

On the one hand, assembly directives can easily be typed into the input file by locating

them one by one on a cross section diagram as they appear and then finding the

corresponding values associated to them on the cross section's table of offsets (assuming

it is available). On the other hand, point directives are much trickier to input because

there is no apparent order in which they should appear due to the fact that a single point

can be assigned to multiple assemblies. Therefore, a great deal of time ends up being

Page 7: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 7/54

Most of ProbEinput's capabilities are accessed through the program's main menu

bar. In Figure 1 and the sections that follow, the various menus that can be found such as

I/O file operations, making/modifying directives, and automated graph transformationswill be fully described.

'u+t=:-::-=::_ Pro IrEnp ut EEtr ProbEinput

!l..d.r

i Dcrigo

I $J1!":

BE PrcbEnput-ffigg

Figure 1. ProbEinput Menus

One of the big ideas stressed throughout the development of ProbEinput is the

notion of a user defined program flow. Although there is a preferred sequence of steps tobe taken when using this program, it is understood that individual users work most

efficiently when they have the freedom to work in the order they see fit. Therefore,

Page 8: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 8/54

PROGRAM DESIGN

Introduction

"The design philosophy of ProbEinput may be broken into two major sections:

human interface guidelines and program capabilities. Both sections are equally impofiant

in accomplishing the overall goal because a powerful program is useless without an

equally intuitive interface and vice-versa. Therefore, neither section is given precedence

over the other so as to strike an acceptable balance between the two" [Schwartz, 2004].

Human Interface Guidelines

"From it inception, ProbEinput was designed to bring the power and versatility of

automating the creation of ProbE ship geometry directives to people fwith little computer

background]. With this infusion of power and versatility, ProbEinput hopes to supply

users of any background with an intuitive interface that requires nothing more than

experimentation to wield its powerful functions properly. ProbEinput's interface is

designed to incorporate all of the important functions of a digital drafting area without

seeming too complicated and clunky" fSchwartz, 20041.

"First, when graphing on its drafting area, deciding between selecting a point,

line, or drawing a new line altogether is all done intuitively by simply clicking the mouse

button in different manners. For instance, ProbEinput knows exactly when one means to

select a point over a line because selecting a point takes precedence of selecting the line ifthe mouse click is within 3 pixels (about Il24 in) from any particular point. Moreover,

ProbEinput "knows" to distinguish between selecting and graphing by merely calculating

whether or not the mouse moved in the timeframe of being clicked and released"

Page 9: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 9/54

non-editable text fields found in the interface below ProbEinput's graphing interface are

colored gray. This tells the user that although the information is important, it is solely

there to inform. Even further, all editable text fields are colored a muted yellow.

However, as soon as the text fields are altered, they immediately turn white to signal that

the user must click and release the "Enter" button before any change is reflected in the

drafting area. Once the "Enter" button is clicked and released, the editable text fields are

repainted in a muted yellow to signify that all of the text fields correspond correctly withthe graph. Finally, the "Enter" and "sig figs" buttons are painted a muted blue and the

"del line" button a muted red to indicate to the user that they are buttons. The "del line"button is painted red so the user understands that clicking that button will cause changes

to the drafting area that are final. On a final note, all colors used are muted so that theydo not take the user's focus away from the drafting area. The interface is merely a usefultool and not the fundamental purpose of ProbEinput" fSchwartz,2004].

Finally, ProbEinput was created with the programmer in mind. Thus, ProbEinputwas developed from the ground up in the Java language with object-orientedprogramming (OOP) because this design philosophy affords the programmer the

assumption that every basic feature should be encapsulated in its own class and be able to

be transplanted elsewhere in the program without having to duplicate code. This leads tothe idea of modularity. The different classes making up ProbEinput can be thought of as

Lego pieces. Even though the different classes can be stuck together, such as attaching an

instance of the GraphPlot class (graphing area) to an instance of the ActionPanel class

(transformation panel) to create a transformable graphing area, the classes exist on theirown and thus, can be applied to aid in tasks not originally intended. Furthermore, OOP

makes unfamiliar code much easier for a newcomer to read and make sense of.ProbEinput alone takes up just shy of 12,000lines of code. Although that may seem like

a lot of information for one to absorb, the entire collection of class files take up more thandouble that amount at nearly 30,000 lines of code. As a result, ProbEinput is split up into37 class files, each designated with an individual task to perform, in addition to a core

Page 10: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 10/54

IMPLEMENTATION OF BASIC PROGRAM FUNCTIONALITY

Start Up

A large emphasis is put on the organizatton of information relayed to the user atany one time. With the ability to quickly maneuver around an input file containinghundreds (potentially thousands) of directives, there comes the important task ofdisplaying the information in a coherent manner. Hence, a system of interchangeableJMenus,JPanels, andJLists was implemented in order to ease the user into learningwhere different information is displayed and collected. Upon the initial execution of the

ProbEinput executable file, an empty graph is displayed as illustrated in Figure 2. At thispoint, all graph variables are at their default values.

l l :': . FL-n ProlrEinprrt trE.trrf iynsSirectives

t8"n

Page 11: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 11/54

il

Automated Point Directive Creation

To dynamically create a point, click and release a spot on the graph and then click

the "make point" button. When the user clicks on the button, a JPanel will appear below

the graphing interface with input boxes requesting the data needed for the point directive.

As one can see in Figure 3, the information obtained from the graph is already filled into

input boxes such as the point name and its coordinates. That these input fields are

required is designated by the [r]. The remaining input boxes ask for the probability

distributions for the water line and half breadth as well as comments and are optional,

designated by the fo]. If one wishes to quickly clear all the data fields for any reason,

click and release the "cancel" button.

Fi le

| 0.5

5.S

fi.8

Di rectives llptiont

h

lilg-g 5-0 tg-s t5.e ?s.s 35.s

RXtS hor i zonto I vert i co I L IHE x c

Page 12: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 12/54

Finally, click and release the "accept point" button to create the directive. As one

can see in Figure 4, a point colored red is now in place where the user clicked to

represent the newly created point directive. Additionally, the input boxes are nowcleared to indicate that ProbEinput is ready to create another point directive.

II ProbEinF gHFile

1A "*

:] -t!

g-*

tr

llil,&.* x "& ! # -fl '13 "& 2ff -* 25.*

ffrt5

cross ut

hori=ontol verticsl LITIE

Line stort i:-'line end j

flousE

x

s.B

?,153

u

J.E]

B.E

2 ,84?

lomtion ---

feet/i n

lower- [eft

units --- | Enter 1i siq fiqs 11 4 ;j d+l liilc ,ll

make a*s*mbly mrke point

Page 13: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 13/54

coordinate system of the GraphPlot along with its units and scale, the coordinates are

ready to be stored in the point directive.

A utomated As s emb ly D irectiv e C re ationTo dynamically create an assembly, drag a line across the GraphPlot and cltck

and release the "make assembly" button. If a line is already drawn on the GraphPlot,select the line before clicking and releasing the "make assembly" button. When the user

releases the button, a JPanel will appear below the graphing interface with input boxes

requesting the data contained within an assembly directive. At this point, ProbEinput

automatically creates point directives for the start and end points of the assembly, leaving

the probability distribution and comment fields blank. The user is informed of thisbecause points colored red replace the start and end points of the drawn line. As one can

see in Figure 5, the information obtained from the graph is already filled into the inputboxes such as the names for its start and end points.

iFProbEinput=;53ffiHHFile Di rectives Options

l

m--_-_-_-_--_---_I----I s .a r.s I s.s | 5.s 28,a zs.aI

Page 14: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 14/54

Finally, click and release the "accept assembly" button to create the directive.

Demonstrated in Figure 6, a thick black line replaces the drawn line to represent the

newly created assembly directive. Additionally,the

inputboxes are now cleared to

indicate that ProbEinput is ready to create another assembly directive.

TJ

llptions

horizontsl verticsl LIIIE :

l ine gtnrt :

1 ine end :.i.

.:

iIOUSEl

x

5.8

?6.8

u

I E.E

I B.E

13.61'11 t/

,. ,.*--:

unit*

make r**embly ti make poi nt

Page 15: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 15/54

where the mouse is first clicked as well as the coordinates of the point where the mouse

button is finally released in the global coordinate system of the computer monitor. After

they are processed through a conversion formula to represent the local coordinate system

of the GraphPlot along with its units and scale, the coordinates of both points are ready

to be stored in point directives.

Creation of Plote Directives

Every assembly directive requires a coffesponding plate directive. Therefore, a

plate directive must now be created. Upon selecting the Plate menu item from the New

Directives drop-down menu, a JPanel appears below the graphing interface containing

input boxes pertaining to the creation of a plate directive. As one can see, the first tworequired input fields ask for an assembly name and a plate material name. This is

because the geometry and material of a plate is defined by a corresponding assembly and

material directive respectively. For this example, even though the "assembly name"

corresponding to the plate being created has already been defined, click and release the

"new" radio button besides the "assembly name" field and type in "as1" in the text fieldbelow to reference this plate with the assembly created earlier. ProbEinput does not care

how the information for "assembly name" is found as long as it is defined. Second, click

and release the "new" radio button next to the "plate material name" field and type in"materiall" in the text field below so that when the particular material directive is

eventually created, this assembly will immediately reference it. The third required fieldspecifies the plate's thickness in inches. After any other optional fields are filled in as

exhibited in Figure 7, click and release the "accept plate" button to create the directive.

fl l. Dir.ciiYGt OFtl6rt

Page 16: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 16/54

input fields ask for an assembly name and a shape name. This is because stiffeners are

assigned to specific assemblies and take on the geometry specified by a shape directive.

At this point, the user has already defined an assembly so one will click and

release the "exists" radio button besides the "assembly name" text field. Immediately, a

list pops up to the right of the program containing every assembly created thus far as

shown in Figure 8.

Figure 8. List of Existing Assembly Directives

There is only one assembly directive created thus far, so the user will select "as1".Upon selecting the assembly, "as1" automatically appears in the input box below the

"Assembly name" text field. This is shown in Figure 9.

Page 17: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 17/54

For now, no shape or material directives have been defined so the user will click

the "new"radio button besides the respective text fields and type in the name "shape1"

and "materiall" in their input boxes below.

The next step is to specify a side code. The side code specifies whether or not a

plate rotating counter-clockwise about the starting point of its associated assembly willpass through the stiffeners on the assembly. In place of the coresponding side code input

box, "side*" denotes that the plate will pass through it's corresponding stiffener upon

counter-clockwise rotation about the assembly's start point and "side-" denotes that the

plate will not. For the purpose of this report, a side code of "sidet" will be used.

Now, the edge code needs to be specified. This determines how stiffeners are

placed at the edges of an assembly. An edge code of "edge:l" will be used for this

example and places a stiffener at the starting point of the assembly.

At last, the final required text field "From Origin (in)" determines how the

stiffeners are placed across an assembly. There are four possible ways to place the

stiffeners: "avg", "loc", "num", and "spa". First, avg:17.8 puts stiffeners as close to anaverage spacing of 16.8" as possible - actual spacing will probably differ from 17.8", but

all spacing will be the same. Second, loc:35.4 puts a stiffener 35.4" from the start of the

assembly. Third, num:4 specifies that there will be 4 stiffeners on the assembly not

counting those at the edges and will get average spacing. Finally, spa:27.5 puts as many

shapes as possible with exactly 27.5" spacing - last stiffener may have non-uniform

spacing. This example will use "num:5". At the click and release of the "accept

stiffener" button. the stiffener directive will be created.

At this point, a fundamental ProbE unit has been defined. This unit consists of an

assembly, plate, and stiffener directive. However, the GraphPlot won't be able to draw

Page 18: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 18/54

Creation of Shape Directives

Upon selecting the Shape menu item from the New Directives drop-down menu, a

JPanel appears below the graphing interface containing input boxes pertaining to the

creation of a shape directive. At this point, all user-drawing capabilities such as drawing

nev/ assemblies and displaying old ones are temporarily disabled until one selects a

different directive type from the Directives drop-down menu. This is done so that there is

no confusion as to what the shape looks like when the computer outputs it to the

GraphPlot following the clicking and releasing of the "accept shape" button. There are

four possible shape types to draw: T, I, angle, and flatbar. An example of a shape

directive defining a T, as seen in Figure 10, uses the following dimensions in inches:

"Nominal Web Height" : 8, "Nominal Web Thickness" :4, "Nominal Flange Width" :6, and "Nominal Flange Thickness" :2.

-..f;::

..*r-_:;;fu ffi-- r r vELrrrFns

Fi le Di rective* 0ptior$

I I T

-

l"* tt.t 't".u 'rt.u 't-24 _8 -t 5 _S -16 _g -5 -Ai

ffx l5

cross ot

hor i zonto I vert i cq I LlltE : x

I ine stort:.''

B.B

Page 19: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 19/54

Now that the shape directive "shapel" has been defined, the GraphPlor will be

able to draw the stiffener that was defined onto the assembly directive "as1" as seen in

Figure 1 1. Drawing the stiffener on an assembly is accomplished by determining the

coordinates of the stiffener's shape in the local coordinate system of the assembly. This

is accomplished by comparing like angles as shown in Figure 12.

Figure 1 1. Assembly With A Stiffener

Page 20: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 20/54

OTHER PROGRAM FUNCTIONALITY

File Menu

File Save OperutionsWhen saving an input file with the "Save" menu selection, ProbEinput checks if

the file has previously been saved or not. If the file is new, a screen pops up asking for

the name under which to save the file. Else, the program replaces the existing file.

However, if one saves with the "Save As" menu selection, ProbEinput always brings up a

screen asking for a filename under which to save the input file.

File Open Operations

When opening an input file with the "Open" menu selection, directives are

processed through ProbEinput line by line because every directive type has a unique

opening procedure. Moreover, there is no particular order these directives must be placed

in the input file '. Figure 13 depicts what a realistic ProbE input file (with a mistake)

may look like when first opened by ProbEinput.

ProtrEinputffigE

Page 21: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 21/54

One limitation to the curent implementation of opening a file is that the file must

be located in the same directory as ProbEinput. However, this limitation is only a factor

due to the version of Java which wasavailable for use'

As each line is individually read, the program checks for a keyword at the

beginning of the line that denotes the type of directive being read in. If the word matches

any of the recognized keywords, the directive's opening procedures begin. Otherwise, the

line is stored in a data buffer so that it can be retrieved when it comes time to save the

fi1e.

Every directive has a unique opening procedure because each directive hasa

different number of required and optional fields. The way ProbEinput finds data is by

searching the line for character strings separated by blank spaces. Each character string

represents a different field in the directive and the opening procedures must be tailored so

that it knows how manv character strings to search for.

As each line is read in, an ..fro of the line is sent to ProbEinput's output screen.

This allows for a much easier debugging experience when searching for human errors in

the desired input file. When ProbEinput runs into a directive it cannot read, the last lineprinted to the output screen is the faulty line of input.

Upon completion of opening of the desired f,rle, ProbEinput automatically zooms

the graph for an optimal viewing area with the axis set at the lower-center porlion of the

graph. This is accomplished by an algorithm that compares the smallest and largest (x,y)

coordinates and adjusting the graph transformations accordingly.

File Quit OperationsIf changes have not been made prior to the last save or open operation, then one

may quit out of ProbEinput by simply clicking the "Quit" menu selection from the File

Page 22: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 22/54

The user may choose one of the following choices: "Save" before quitting, "Save

As ..." before quitting, "Quit" without saving, or "Cancel" the quit operation all together.

Throughout this process, the user may not select anywhere else on the screen until one ofthe four choices is selected. This is done to prevent the JFrame with the quitting options

from being accidentally unfocused and thus accidentally hidden from view.

Directive Menu

Selecting Points and Assemblies

As ProbEinputdata

files quickly grows larger, the ability to maneuver around thedata becomes increasingly important. Having to sift through thousands of lines of data

will easily get cumbersome unless there is a logical way to link related informationtogether. One such example is the ability to efficiently find corresponding pointdirectives for an assembly. What makes this so difficult is the fact that although an

assembly directive can only match up with two point directives, a point directive can

match up with any number of assembly directives. This problem is dealt with by givingthe user the ability to differentiate between clicking on a point versus an assembly and

displaying the appropriate name for the directive selected GraphPlot.

Whenever the user clicks on the GraphPlot, ProbEinput immediately calculates

the shortest distance (d) between the point clicked and one of the defined point directives:

d=mIf this distance is less than 8 pixels (about 1/9 inch) in length, the

program

displays the name of the point clicked on so that it can be quickly retrieved as seen inFigure 15.

Page 23: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 23/54

On the chance that a point directive is not in range, the program then searches for

the closest assembly. It can be shown that sin(angle) between any two vectors, starting

from a common point, is equal to their normalized cross-product fSchwartz,2004]:

By creating an invisible line that extends from the point clicked on by the mouse

to every point directive defined thus far, ProbEinput can find the smallest angle between

one of the invisible lines and the assembly containing the point in both the assembly as

well as the invisible line. If the angle of the assembly that refers to the smallest angle is

less than or equal to 0.2 radians (about 11o), then the program displays the name of the

assembly. In this case, the assembly selected in Figure 16 is named "Mn-dk-a-s".

ilffi=r,*:PrabEinp

Axesm(U) = 1=1-i=1

lAl.lBlttll

Page 24: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 24/54

Modfying Directives

Modifying all directives, no matter the type, follow the same procedure. In this

example, an assembly will be modified. Upon selecting the Assembly menu item from

the N4odify Directives drop-down menu, both a blank JPanel with input boxes pertaining

to assembly directives and a JList wfih the name of every assembly directive thus defined

is displayed. Notice that when the user clicks on an assembly from the list, the

GrapiPtot promptly zooms into the assembly, centering it on the screen, and the JPanel

immediately displays all of the data pertaining to the clicked upon assembly directive.

However, none of the data is editable until the user explicitly clicks and releases the

select button below the list. For explanatory purposes, the example assembly presumed

selected will be the one selected inFigure 17 named "Mn-dk-a-s".

ZEetZr tstz &***,{tr}tt t2 t { *619. t84.t

1*t* {*z}*8

h e a r_strd ke _s

_bk_02-03_p

h e d r_strd ke _p

l_bk_01 _02_5

s 5hell_01_02-5

l_b k_Mlt_d k-01 -5s_rhell_Mr-dk_01-5

Mn_dk_a_s

lvln _dk_lr _5

tulrr_dk_a-p

7? "e I t??"8 2??,4

verticul LIHE

Page 25: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 25/54

Option Menu

Previous Viewing Area Operation

After investing quite some time working with a ProbEinput file, one may begin to

make careless mistakes such as inputting the wrong numbers into the ActionPanel

transformation text fields before click and releaseing the enter button to reflect the

changes. As a result, one may find themselves staring at an unknown area of the

Graphflot or nothing at all. Consequently, the "Previous Viewing Area" operation

-uk"r sure that the most previous transformation settings are stored at all times so that

the current settings can be reverted to ones that are more familiar.

Make All Assemblies Visible Operation

Following a long session of ProbEinput, one may begin to lose their bearings as to

where in the graph they are. This may be due to different assemblies looking similar

when zoomed into the center of the GraphPlot or simply because one accidentally enters

in the wrong transformation settings into the ActionPanel. Whalever may be the case, the

"Make All Assemblies Visible" operation is designed to determine the best graph

transformation settines in order to be able to fit all defined assembly directives onto the

GraphPlot.

Page 26: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 26/54

PROBEINPUT OPTIMIZATIONS

With the ability to store thousands of directives, ProbEinput had a dangerous

potential of becoming a serious system resource hog. Unless the directives can be found

with great efficiency, the benefit from having ProbEinput quickly diminishes for speed is

the reason for commissioning ProbEinput's development in the first place. Hence, a

sound way of storing the data as well as an equally sound way of retrieving the data must

be created.

Following the initial implementation of drawing stiffeners onto assemblies within

ProbEinput, a serious hit to the program's performance was easily noticeable. The reason

for this turned out to be because of the GraphPlot's paint method. Paint methods are ran

on a system thread. This means that the programmer has no control over when the

method is called. In the particular case of the paint method, it is called continuously

throughout the duration of the program until the program is exited. What was happening

was that whenever the GraphPlot's paint method was called to paint the stiffeners onto

the screen, an (ry12 * nzl2 * ry12) search operation was taking place ': first the program

would search in each of the nr stiffeners, then it would search for any nz assemblies

referenced by each stiffener, and finally it would search for anyn3 shape referenced by

thestiffenerandassemblypair. InJavaterms,thisis aforloop within aforl.oop withina

for loop.

As a workaround to this clear problem, the memory address of the assembly and

shape referred to by a particular stiffener is immediately found and stored within the

stifiener directive .rpotr itr creation and/or modification. This setup makes sure that

probEinput searches for a stiffener's corresponding assembly and shape directive only

on"" und not every time the GraphPlot's paint method is called. Analyzing the numberof iterations in the search loops having to be performed when drawing the stiffeners on

assemblies with the new method versus the old one is quite staggering. Take the test

Page 27: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 27/54

PROBEINPUT ERROR-PROOFING

Along with a program as complex as ProbEinput, comes a greater possibility for

errors. These errors ian take on many forms such as a user feeding in the wrong input

type, manually creating an assembly connected to points that do not exist, and so on.

Aithough it is nearly impossible to trap for every error, much effort went into catching

the most common errors.

Foremost, directive input fields that require a number will make sure that the user

has indeed supplied a number rather than a word. Otherwise, upon clicking and releasing

the "accept fdirective]"button, the input boxes with invalid input will display the text

"invalid" and a directive will not be created until the input is corrected. This is

accomplished with try/ccttch blocks. When ProbEinput sets out to retrieve numerical data

that does not turn out to be numeric a7, a NumberFormatException is thrown and simply

prevents the execution of that particular line of code. This helps avert the complete

malfunctioning of the program by localizing the problem into a single error which can be

dynamically corrected. Furthermore, if a user decides to change the "connected points"

freld of an assembly directive and one or both of the points do not exist, ProbEinput

automatically creates new point directives for theunknown points. Even more,

ProbEinput furlher helps the user out by labeling the points in question from the point list

under the modify point directive menu item as shown in Figure 18.

{..xisti {t4 ftr}i *t f:i {"*2,"44:.2137 t*.J.14

r"3za:rtil:[t-| 32b.std_1 3

l47d.std_l3

'l,lID.std_'|3

l{Ic.sta_l 3

l.l7d.sta_13

Page 28: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 28/54

CONCLUSION

Over the past two summers, ProbEinput was designed and implemented from

scratch. As of 8111105, ProbEinput is capable of providing a graphical interpretation ofship geometry, real-time modification of ship geometry, and I/O file operations.Although there is still more to be implemented such as a delete function for spurious

directives, the core functionality of ProbEinput is finally in place and can now be utilized

properly with its original intentions in mind.

ACKNOWLEDGMENTS

In completing my summer internship, I would like thank those individuals who

went out of their way to make my summer experience a worthwhile and enjoyable one.

First, I would like to thank Norman Tadlock for the time and effort he invested incoordinating such a rewarding SEAP program. Finally, I would like to thank Mr.Richardson for the endless guidance and direction he gave me throughout the summer.

BIBLIOGRAPHY

Apple Computer, 1988. Apple Human Interface Guidelines: The Apple Desktop

Interface. Addison-Wesley Publishing Company, Inc: New York.

Horton, Ivor, 1999. Beginning Java 2. Wrox Click and release: Birmingham, United

Kingdom.

Richardson, William M., 1997 . PROBE: A Program for Level III Estimation of Ship

Structural Reliabiliq, - User's Guide. Naval Surface Warfare Center Carderock

Page 29: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 29/54

Previously

Graphical User Interface (GUI)

Brian Schwartz

Page 30: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 30/54

':

. ProbE input files consist of directives

Example: assembly directive (defines ship geometry):

of toads exc.-oi"*lifetime of a ship

Page 31: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 31/54

. Adheres to Apple Human Interface Guidelines

. Platform independent code

. lVritten in Java

Page 32: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 32/54

SrnPhinu ttrindmw

x s.s

s*m

.Intuitive and User'Friendly Interface

.scalable Graphing Technology

.Modular Design

lucatinn menu1\:tjtt.t)a::: .r:rr... :::::rd r,1, : :::::::. : ).: ntrl.,rl:hil;iti :: ::

.l-teet^f I n

units mf,nu

sturt

ntru$E

*iq fiq* I

Iurrrer- tef t

Page 33: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 33/54

Fi Ie Di rective* trptiun*

ProbEinput: Summer 2005g m *m

.Speedy Ship Directive Creation and llodification

ffi-w.I/O File Operations

.User Defined Program Flow#*w

w*ffi t,|{ ffi

-

tror i zonts I

t w *m $ m *ffi x# -w 3m *ffi

FXIS Yert i es I g

crtrss s tI

lnuntion Lawer- Left

feet/i n ltnusE 2.814 5 .2?S

4Enterunit*

mnke fi*$Gmbly

*ig fig*

mtke pui nt

Page 34: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 34/54

FrmhEinput

Page 35: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 35/54

I.

;i;;i

lii:'r

liirii

lii.,'

;ii.

il,..

iiiii

iitii

iriirl

;ii;

!Et;U

nIJ

13FI

r+

Page 36: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 36/54

il

iiljj

iilii.

illir:

iliiii

iit;ii

iitii

iil!rTs'ltrIIJ

nt-1IFI

rt

ioueinputffiHH

Page 37: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 37/54

Fi le Di rectlYe* Ilptiun*

AutomatedDirective

Assembly

Creation

sc{ s $t$ry*w s m *w :a*r * ss p5 *w$

]rsr i =srrts I rreFt i es I !J

1E.E

1E.g

1 -6Ior.uer- lef t 2E.E

1 I ..+?

fls=erb 11g t{ure [r I$qgrr f,nde- -,: -

l-orrg fiporr {in}

lrl

lrI

G lubs 1 Lnqd Eff [rl

f i:=tr Isl ,i-*-i exist* r"*-:' neu

---*--* !f-'-

nccepta*temhly $N *nn*el$

",ris

Page 38: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 38/54

ill

iiii;il

,''':l

iririil

'iriltiilii

!-FttH

g!d.!tU

E

FT

Hlro

Page 39: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 39/54

Fi l+

S SS -$*$

s *ss

ffi*ffi

Options

Fai ntJl*+ernhlyHrterirlFlate

ff,hrpc

Heade rDesignStation

Op---f,el l-itlp-Cel l-r

ffi*w $ W *W$

Accessing ShapeDirective Creation

5t i ffe ne

ffi *ws { tr} *ffi pw *&& ;am *w

I ]rsr i ;rrtrtr ts 1 rJer*t i cs I LIHE

I i rre =tsrtI i rre etrd

ft{}l-l5E

HXT5

cr'f}55 0 t {

$

ut E.g

lE:r4

1B.S?

B.13

Incationfee+.f i nunits

_*..**:.:. "

rrrrke fis$Grnbly

r**=-l teft

Enter

fts=erb 1g l{sre I r I Ccrrrrec ted Ps t rr t= [ r I$$

$:l

G laba I Losd Eff [r Ifiqlrr f,ade

Sparr {

lrI

Spurr fl i =tr Irr I ,.-.-j

ex i sts i:- :, neu

ncce pt ffssemhly

l-orrg

Gcrrerrtr= [o I

.:::"!

Page 40: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 40/54

il

!nFH

EtJ

3

tr+

Page 41: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 41/54

.

i

Page 42: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 42/54

E

Page 43: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 43/54

llriii

!.'trH

EII

HF

FT

n

Page 44: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 44/54

iliifi

!iiiil

iiiijj

iitiii

iliil

ltilli

ii:ijj

!-tr

EI

-Fri

Ititii

..:1 p;"glf EinpUt lffi,H

Page 45: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 45/54

Fr"il h Ei rr p ut tr.H

Page 46: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 46/54

Di rectire* trptinn*

LlllE ,,

Ii

ne stsrtline end.::::

lIOUSE

l-.$i tnler ii ,_ ____,___.,'--_ -., - *...........- l

ff$$Emhly

Selecting aPointDirective

*$ mwffi -w *x swffi *w -m#ffi **t

,l hnr i zuntn t rrert i cu L

5E1E . E

ffi-ffi g:il,$[$ffi*ffi gWffiffi.W$

pt: 2?-stu-|3 {-l -sr?tE-q}U

?29.?

E,E

*ig fig*

mnke point

Page 47: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 47/54

. Ease of selecting (forgiveness)

d- (x)'

PrnhEinput

Page 48: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 48/54

Page 49: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 49/54

O,

Eil\JA.lF(aoAv

f-bV)tDl-(?A\t(+-.:F-

OO

*,d,'vtl

oa-.tDx,-tDU):0

:

(t)tsr--7|'

@\/

tl

Page 50: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 50/54

!lNIHllrt l

ql

Fr-

Page 51: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 51/54

!lEIml

EI

Fi le Directirres Iptiun*

Page 52: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 52/54

**t_*$ 3S -ffi

Mo fiedir.

uri

Tls "|[$

f?^ffi i str-s tr?tr -&$

ilx 6 *S $ mq Wm $ m'R $3 $ rw*t $q***

ffST $wu*ur{$

t ffU.sta-t f

l4Tn.sta_l3l47lr.sta_13

l.llc.sta_l3l{Td.sta_l3

l4/e.gta_l3l4If.sta_13

l4Tq.sta_l3

l53a.sta_l3

l53lr.sta_l3l53r.sta_13

l53d.sta_l3

| 53e.sta_l3

| 53f.sta_l3

| 53g.sta_l3

| 5fia.sta_l3

| Sfrlt.sta_l3

| 6$a.sta_l3

I T$a.sta_l3

SIa.sta_l3

fitla.sta_l3*+ undefinBd *x fllasd.sta I

r: lln-dk-o---s

hor i zonts I Yert i cs 1 LITIE

I ine sttrrt

i nches/i n

unit* ---

mnke n**emhly mnke pui nt

P* i "i ttore [r I {in} [rl{in} [r]

Csrrents [ul

lln yfiu Htr.utt tn sflTE rltdllrJf,sT

Page 53: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 53/54

File Quit Operation

f,a nt* I

Page 54: ProbE_DOD_2005

8/7/2019 ProbE_DOD_2005

http://slidepdf.com/reader/full/probedod2005 54/54

. Analyzing spatial relationships among structural

elements easier rvith diagrams as opposed to

offset tables

. Intuitive and user-friendly interface