Use of Object-Oriented Programming in Particle Accelerator Alignment* Class Diagram (Booch notation)...

1
Stations 387 Targets 3892 Heightdifferences 918 O bservation triplets:distance-horizontal-vertical 8778 Coordinateunknow ns 12837 N uisanceparam eters:rotation anglesand offsets 1512 Datum parameters 4 Use of Object-Oriented Programming in Particle Use of Object-Oriented Programming in Particle Accelerator Alignment* Accelerator Alignment* Use of Object-Oriented Programming in Particle Use of Object-Oriented Programming in Particle Accelerator Alignment* Accelerator Alignment* Class Diagram (Booch notation) feedback project input resect interplus closedphoto le go metho d simplex compa ct jordan catstat approx “is a” “has a” Application Dependent Generic interface to solve: ax l v ikk i i k n 1 Algorithm: Simplex Storage: full design matrix Algorithm: Modified Gauss elimination Storage: envelope of normal matrix Algorithm: Gauss Jordan with partial pivoting Storage: full normal matrix Base class Finds the position and orientation of a theodolite station given a set of known targets. Finds the position and orientation of a camera station given a set of known targets. Finds the position of a target given a set of known stations. Finds the 7 parameter transformation between 2 coordinate systems. simili Exports all the usual statistical distributions. Exports user alarms and logging primitives. Loads the public data members of project . Finds an approximate solution for a network of loosely leveled theodolites and/or trackers. Holds the input data and results in a form convenient for user display and editing. Checks the coherence of all entries. Converts them into storage and access efficient forms. Exports high-level interface for solving loaded algorithms. pv ii i n 2 1 Minimize s pv ii i n 2 1 Minimize s pv ii i n || 1 Minimize s Thesis: Until now, most of the effort in network analysis has been devoted to achieving faster resolution and treating larger data sets. This has led to the creation of large dedicated FORTRAN programs well adapted to their task. When the object of the survey is changing fast in size, shape and content, the architecture of the program has to be flexible enough to accommodate constant redesign. I propose the object oriented paradigm in C++ programming language as a new focus of network analysis programming. Major geodetic features: Blunder detection: data snooping and L1 norm resolution Approximation computations: automatic for semi-leveled stations Datum choice: free, constrained and connected networks Observation variety: gravity based or not Dynamic measurements: inside adjustment or a-posteriori computations Discussion: The LEGO classes are not the product of an a-priori design. Instead, they were abstracted from the structures of the early C version of the program. The first motivation was to provide clean and simple interfaces as well as data hiding in order to facilitate code sharing with user interface designers. This lead to the creation of the two main classes: project and lego and the idea of two other application dependent classes: feedback and input .The immense benefit of the concept encapsulation provided by the classes became further evident in the maintenance of the core algorithms and the port to different environments. From then on, new extensions were designed from an object-oriented point of view. Examinations of the LEGO algorithms showed structure and interface similarities. This was easily translated into two fundamental features of object-oriented programming: inheritance from a common base class and polymorphism through virtual functions. The class method was created to encapsulate all the data members and functions common to all solving algorithms. Currently LEGO maintains three derived classes: compact and jordan for the L2 resolution and simplex for the L1 resolution. The first one is the one called in most applications because of its computational speed. This architecture has been very efficient these past 4 years, allowing the introduction of additional measurement types (photogrammetry) as well as new capabilities (dynamic measurements and connected networks). Next Generation: The Next Linear Collider project presents new challenges for the particle accelerator surveying community for two reasons: its size (30 km long linear accelerator) and its positioning accuracy (30 µm placement requirements for adjacent components). To answer, SLAC is embarking on two complementary axes of research: development of new alignment techniques, primarily based on various kinds of reference lines, and study of appropriate coordinate systems. The LEGO architecture is ready for the addition of new measurement techniques. On the other hand, it is too monolithic to allow for different extensions of the same method to be tested in parallel. The main classes could use subclasses to unify access to the data no matter the representation system and to work on this unified data model through virtual functions. A new implementation based on a hierarchical point-classes diagram is on its way. These new classes will be integrated into the production version of the program at a later date. Current implementations: SLAC-WinGeonet GUI in Microsoft Visual Basic SLAC-SIMS GUI in Borland C++ SMXInsight® GUI in Microsoft Visual C++ Results: The LEGO architecture has been used routinely at SLAC for 4 years for the precise mapping of the magnets which focus and bend the high energy electron/positron beam. The last major application at SLAC was the mapping of the PEP-II Asymmetric B- factory consisting of two independent storage rings, located one above the other in a tunnel. The tunnel has a circumference of 2.2 kilometers with an average height and width of 2.5 meters and 3.5 meters respectively. Network characteristics Magnet fiducials as well as floor and wall monuments have been surveyed using SMX 4000 laser trackers, Leica TC2002 total stations and a Leica NA3000 precise digital level. Catherine Le Cocq Stanford Linear Accelerator Center, Stanford, CA, USA Home: SLAC 2575 Sand Hill Road Menlo Park, CA 94025 USA www.slac.stanford. edu Collaboration: SMX 222 Gale Lane Kennett Square, PA 19348 USA www.smxcorp.com For more information and access to LEGO Windows DLLs, please email: [email protected] * Work supported by Department of Energy under Contract DE-AC03-76SF00515

Transcript of Use of Object-Oriented Programming in Particle Accelerator Alignment* Class Diagram (Booch notation)...

Page 1: Use of Object-Oriented Programming in Particle Accelerator Alignment* Class Diagram (Booch notation) feedback project input resect interplus closedphoto.

Stations 387Targets 3892

Height differences 918Observation triplets: distance-horizontal-vertical 8778

Coordinate unknowns 12837Nuisance parameters: rotation angles and offsets 1512Datum parameters 4

Use of Object-Oriented Programming in Particle Accelerator Alignment*Use of Object-Oriented Programming in Particle Accelerator Alignment*Use of Object-Oriented Programming in Particle Accelerator Alignment*Use of Object-Oriented Programming in Particle Accelerator Alignment*

Class Diagram(Booch notation)

feedback

project

input

resect

interplus

closedphoto

lego

method

simplexcompact

jordan

catstat

approx

“is a”

“has a”

Application Dependent

Generic interface to solve:

a x l vik k i i

k

n

1

Algorithm: Simplex

Storage: full design matrix

Algorithm: Modified Gauss elimination

Storage: envelope of normal matrix

Algorithm: Gauss Jordan with partial pivoting

Storage: full normal matrix

Base class

Finds the position and orientation of a theodolite

station given a set of known targets.

Finds the position and orientation of a camera station

given a set of known targets.

Finds the position of a target given a set of known stations.

Finds the 7 parameter transformation between 2

coordinate systems.

simili

Exports all the usual statistical distributions.

Exports user alarms and logging primitives.

Loads the public data members of project.

Finds an approximate solution for a network of loosely leveled

theodolites and/or trackers.

Holds the input data and results in a form convenient for user

display and editing.

Checks the coherence of all entries. Converts them into storage and access efficient forms. Exports high-level

interface for solving loaded algorithms.

p vi i

i

n2

1Minimizes p v

i ii

n2

1Minimizes p v

i ii

n| |

1Minimizes

Thesis: Until now, most of the effort in network analysis has been devoted to achieving faster resolution and treating larger data sets. This has led to the creation of large dedicated FORTRAN programs well adapted to their task. When the object of the survey is changing fast in size, shape and content, the architecture of the program has to be flexible enough to accommodate constant redesign. I propose the object oriented paradigm in C++ programming language as a new focus of network analysis programming.

Major geodetic features: • Blunder detection: data snooping and L1 norm resolution• Approximation computations: automatic for semi-leveled stations• Datum choice: free, constrained and connected networks• Observation variety: gravity based or not• Dynamic measurements: inside adjustment or a-posteriori computations

Discussion:The LEGO classes are not the product of an a-priori design. Instead, they were abstracted from the structures of the early C version of the program. The first motivation was to provide clean and simple interfaces as well as data hiding in order to facilitate code sharing with user interface designers. This lead to the creation of the two main classes: project and lego and the idea of two other application dependent classes: feedback and input.The immense benefit of the concept encapsulation provided by the classes became further evident in the maintenance of the core algorithms and the port to different environments. From then on, new extensions were designed from an object-oriented point of view.Examinations of the LEGO algorithms showed structure and interface similarities. This was easily translated into two fundamental features of object-oriented programming: inheritance from a common base class and polymorphism through virtual functions. The class method was created to encapsulate all the data members and functions common to all solving algorithms. Currently LEGO maintains three derived classes: compact and jordan for the L2 resolution and simplex for the L1 resolution. The first one is the one called in most applications because of its computational speed.This architecture has been very efficient these past 4 years, allowing the introduction of additional measurement types (photogrammetry) as well as new capabilities (dynamic measurements and connected networks).

Next Generation:The Next Linear Collider project presents new challenges for the particle accelerator surveying community for two reasons: its size (30 km long linear accelerator) and its positioning accuracy (30 µm placement requirements for adjacent components). To answer, SLAC is embarking on two complementary axes of research: development of new alignment techniques, primarily based on various kinds of reference lines, and study of appropriate coordinate systems. The LEGO architecture is ready for the addition of new measurement techniques. On the other hand, it is too monolithic to allow for different extensions of the same method to be tested in parallel. The main classes could use subclasses to unify access to the data no matter the representation system and to work on this unified data model through virtual functions. A new implementation based on a hierarchical point-classes diagram is on its way. These new classes will be integrated into the production version of the program at a later date.

Current implementations:

SLAC-WinGeonet

GUI in Microsoft Visual Basic

SLAC-SIMS

GUI in Borland C++

SMXInsight®

GUI in Microsoft Visual C++

Results: The LEGO architecture has been used routinely at SLAC for 4 years for the precise mapping of the magnets which focus and bend the high energy electron/positron beam.

The last major application at SLAC was the mapping of the PEP-II Asymmetric B-factory consisting of two independent storage rings, located one above the other in a tunnel. The tunnel has a circumference of 2.2 kilometers with an average height and width of 2.5 meters and 3.5 meters respectively.

Network characteristics

Magnet fiducials as well as floor and wall monuments have been surveyed using SMX 4000 laser trackers, Leica TC2002 total stations and a Leica NA3000 precise digital level.

Catherine Le CocqStanford Linear Accelerator Center, Stanford, CA, USA

Home:SLAC2575 Sand Hill RoadMenlo Park, CA 94025USAwww.slac.stanford.edu

Collaboration:SMX222 Gale LaneKennett Square, PA 19348USAwww.smxcorp.com

For more information and access to LEGO Windows DLLs, please email:

[email protected]

* Work supported by Department of Energy under Contract DE-AC03-76SF00515