User:Colin Fagg/Project
Contents |
Introduction
The goal of this project is to design a piece of software for creating completion and workover diagrams for wellsites. The diagrams are meant to give an overview of the required components and their layout. There are likely to be changes to the components as decisions are made about the wellsite and so some information on the diagrams can be underspecified.
Currently such diagrams are done in excel by dragging and dropping common pieces and drawing new ones. Excel is still desired as the main way to distribute these diagrams as they allow the files to be shared across contractors and be updated with relative ease. The creation of the diagrams does still take a large amount of time due to aligning pieces in the diagram and other simple tasks that could be enhanced.
The main goal of the program is to output the arranged components along with their descriptions to excel.
Constraints and Requirements
Basic components: straight line, rectangle, arc, circle. All shapes are constructed from these pieces or from groupings of these pieces.
Components should know how to connect to other components: i.e. line up, packers stretch to the edge of the hole.
Outputs to excel. Workover, Completion.
Readable to and from file for updating.
Components often have common features i.e. packers so sub components should be reusable.
Several pieces of related information that should make up an object. Description, inner diameter, outer diameter, nominal size, notes, component image.
Other non typical objects: Hole and hole casing.
Other document information: company, well field, well, dates.
The software is expected to be expanded to include wellsite layout and the components as well. This means that later connection will not be limited to vertical connections.
The software may need to export to Visio at a later time.
Explanation
This design project focuses on the representation of the wellsite components in the system and how the information is output rather than the editor and frontend.
Component: Contains the various details about the component including its connections. The relevant behaviour for this design project is the visit method.
Size: This enum covers several sizes that are considered standard. The two excel outputs use these to size the component drawings relative to each other. While they are loosely related to I.D. and O.D. these values usually differ. May need to be changed to a full class to include comparison behaviour and for tidier output.
Direction: An enum that informs where a connection is located on a component.
Connection: There are multiple different connection types that a component can have.
ComponentDrawing: This is a group of basic Shapes and other ComponentDrawings giving a representation of the component. It also contains information on how this drawing aligns with other drawings.
Drawable: Covers the basic information required to locate and align objects.
OutputVisitor: This allows for access to the components represented in the system.
Patterns
Visitor Pattern
The visitor pattern allows for the appropriate information to be used when outputting files. Using this pattern we are able to access the appropriate data and change how the information is processed. For instance excel outputs of completions do not draw connections between components while workovers do. It also allows the appropriate behaviour for converting drawings to excel format and arrange them appropriately while allowing the XmlVisitor to store all information required to reload the file. It also allows extension for other output types such as to Visio at a later time.
Strategy Pattern
The strategy pattern is used to affect resize behaviour. This behaviour can affect how items are anchored in there component allowing them to stretch in the appropriate manner. This allows items such as the seals on packers to be resized appropriately.
Composite Pattern
The ComponentDrawing and Shape relationship are designed around the composite pattern allowing for the drawings to be built up from smaller pieces. This also allows for reuse of drawn components in other areas.