Index

 

Demonstration of Optim.exe

 

Optim.exe is a program that demonstrates the construction, evaluation, and optimization of blade curve shapes for direct laryngoscopy. This document describes step-by-step procedures for the demonstration of each of these features. It can be printed and used as an introduction to the use of the program.

 

For a more detailed description of the available options see the document OpMenu.doc. To view the relevant source code, see the document OpSource.doc.

 

The program Optim.exe can be run from Windows Explorer or My Computer, or by entering the path using the Run command on the Start menu. No installation is required.

Construction

Optim.exe constructs a model of the oral and pharyngeal anatomy of a patient positioned for direct laryngoscopy, with a laryngoscope blade of some arbitrary shape inserted to a desired depth. This model is implemented by the Shape class hierarchy. A number of graphical views are displayed: this was very useful (in fact, essential) during the development of the program.

 

Run the program Optim.exe and maximize the window, then click Data/Random Data to calculate and display a blade shape. The window is divided into three panes. The bottom pane now displays a graph of a laryngoscope whose curve has been calculated from a set of random data values. The top right pane displays derived indices used to evaluate the blade shape. The top left pane displays a graph of the data used to construct the blade curve.

 

Use the mouse to drag the horizontal border to the top of the window: this maximizes the size of the blade graph. The lower red and blue curve represents the curve of the blade that is in contact with the patient’s tongue (the lingual curve). It is drawn upside down, as if the patient were lying face down. The distal end of the blade that is inserted into the vallecula and lifts the hyoid bone is at point (0,0) on the graph. This is point T as described by Marks, Hancock and Chalmers, 1993 (MHC 93). The other end of the curve at (20, 0) is the point at which the blade contacts or nearly contacts the lower incisor teeth when fully inserted (point L), and the point above and to the right of point L is point I, at the location of the upper incisor teeth. The upper curve (the incisor curve) represents the point of contact or near contact between the blade and the upper incisor teeth at different insertion depths.  The distance between the curves is wider than an actual blade because it represents the full distance between the lower and upper incisor teeth.

 

To display the blade as if inserted to different distances, hold the mouse cursor over the lingual curve of the bade and drag the insertion point. The dark green line runs from point L to point T at the selected insertion depth, and the line from I to T (the IT line) is shown. Also displayed are the angles EIT and MIT, which are used to evaluate the score, function for the blade. Note that the blade can only be inserted to a depth of 33% of the greatest IT distance. Select Parameters/Insertion Range, and enter different values to set the deepest insertion of the blade to different fractions of the IT distance. It is also possible to set the minimum number of curve segments between the teeth and point T (select Parameters/Settings/Minimum Segment): this is needed only for very unusual “pathological curves”, and for most purposes should be set to 1. However, trying different combinations of deepest insertion and minimum segment demonstrates visually some of the subtleties required to model a “reasonable” curve with various parameters and over the entire function space.

 

To investigate the effect of changing the patient’s anatomical parameters, select Parameters/Anatomy and enter new values for the three parameters. The LI/IT ratio determines the distance between the upper and lower incisor teeth, and the angle LIT is the angle between the interdental line LI and the incisor-tracheal line IT. The ratio IC/IT determines the point C as described in MCH 93, and is a measure of the position of the mandible relative to the teeth and the trachea.

 

Drag the horizontal border to about the middle of the screen, then drag the vertical border to the far right hand side. This will display both the blade graph and the data graph. The bar graph displays the values of the data vector used to calculate the blade shape. Move the mouse cursor over the graph, click on any bar, and enter a new value. Repeating this process demonstrates how a curve is generated from any particular input values. Clicking Data/Random Data creates a curve from random input values, and clicking Data/Random Blade creates input values intended to produce a wide range of “random” curves. Click Data/Scale Factor to change the scale factor for randomized data and curves.

 

The resolution of the curve (the number of line segments) is one greater than the number of dimensions (independent data values). Click Parameters/Dimensions to change the number of dimensions.

 

To view information about the current blade, click View/Blade Information. To return to the main blade view, click View/Blade Display (or select Data/Enable Modification).

Evaluation

The purpose of constructing a model of a laryngoscope blade and its insertion is to evaluate the shape of the blade using a scoring function. This program uses the angle EIT (the eye line deviation angle) and the angle MIT (a measure of the available forward space) at each insertion depth to calculate an overall score value for each blade shape considered. For a given choice of scoring algorithm, anatomical parameters, and range of blade insertion depths, the model can be used to calculate a function f(x), where x is an N‑dimensional vector. This evaluation function is implemented by classes derived from class Scope.

 

To reset parameters to their default values, select File/New and click “No”. Then select Data/Random Data, drag the vertical border to the far left side of the screen, and drag the horizontal border to near the middle of the screen. This will display both the blade graph and the score graph.

 

Using the mouse, click at various points along the lingual curve in the blade graph. The vertical line in the score graph will move to indicate the depth of insertion at that point, measured as a fraction of the IT distance. The green line shows the value of the angle EIT at each insertion depth. The dark blue line represents the angle MIT. The red and blue line displays the score at that insertion depth, with the red and blue segments corresponding to the segments used to construct the blade curve. The scoring algorithm used is the MHC score, which is the sum of the angle EIT and the angle MIT at that insertion depth. The overall score is the highest (worst) score over the entire insertion range for that blade, and is indicated by the horizontal black line. The number in the upper right hand corner of the score graph is the score for the blade displayed in the blade graph. This number is the value returned by the evaluation function for the input vector displayed in the data graph.

 

The first successful optimization runs (see below) quickly revealed that the MHC score (angle EIT plus angle MIT) was an inadequate way to evaluate laryngoscope blade shapes. To see why, click File/Open and open the file MHCdem.opt in the directory Scope/Opfiles. The blade score is 6.49 (a near optimal MHC score), but the blade is obviously not a clinically useful curve. The reason is that the very large (about thirty degrees) EIT angles at the greater insertion distances are balanced by comparably large negative MIT angles: the blade gives very good forward space into which to displace the tongue, but at the expense of eye line deviation angles that are too large to visualize the larynx.

 

An improved scoring system (REIT) was devised: the angle EIT was limited to a clinically reasonable maximum (an eye line angle that allows good visualization of the larynx), and with that restriction the blade was scored using the value of the angle MIT. This scoring system gives better scores to blades that have better forward displacements, but only if they also have good eye line deviations. To demonstrate the REIT (Restricted EIT) score, open a new file. Click Parameters/Score, select “Restricted angle EIT”, and then click “OK”. Enter a value of 5.0 for MaxEIT. Note that for many random blades, the REIT score is a very high value (because the angle EIT is not less than 5 degrees at all insertion depths). To see an example of a better (but not optimized) blade, click File/Open and open the file REITdem.opt in the directory Scope/OpFiles. The green line in the score graph (EIT angles) is always 5 or less while the red and blue line (the score, which for this blade always equals the angle MIT) varies with the depth of insertion. The overall blade score is 12.32.

Optimization

 

Given a blade shape evaluation function f(x) where x is an N‑dimensional vector, the values of f(x) define a surface over the (N‑dimensional) space of all possible laryngoscope blade curves, and the lowest point (global minimum) on that surface corresponds to the optimal blade shape as evaluated by that function. In general, the topology of such a multidimensional surface is extremely complex and finding the global minimum is very difficult. Simulated annealing algorithms have been used successfully to find good approximations to the solutions of otherwise intractable multidimensional optimization problems. This program uses the Numerical Recipes in C routine AMEBSA, a simulated annealing algorithm for continuous N‑dimensional control spaces.

 

If you are running Optim.exe, exit the program (select File/Exit or click the close button). Then run the program again to start it with all parameters reset to the defaults. To demonstrate the optimization of laryngoscope blade shapes, click Optimize/Algorithm. Make sure that “amebsa” is selected, and click “OK”. This will display the dialogue box for entering the parameters required to run the simulated annealing algorithm amebsa. The default values were chosen to allow short runs for evaluation purposes: if you have a fast computer, you may want to increase the “Iterations per step” by a factor of ten. Serious optimization runs require many more iterations (and greater dimensions as well). Click “OK” to accept the parameter values. You can select Optimize/Current Settings to display a summary of the scoring function and optimization settings.

 

Click Optimize/Run. Click “No” when prompted to save the file, then click “OK” to start the optimization, and click “Cancel” to avoid saving the result of the optimization to a new file. This will start an optimization run that displays the current iteration of the evaluation function every 1.5 seconds.

 

Select View/History: the History Graph shows a line graph of the best score value found so far plotted against the number of function iterations performed. Note that many iterations are performed between displays. This allows monitoring of the progress of the optimization run while at the same time not greatly affecting the speed of the program. (For prolonged optimization runs, efficiency can be maximized by choosing the “No display” option and turning off any screen saver). Select View/Progress: The Progress Graph shows a moving bar graph of the score values for the blade curves calculated at the beginning of each new display cycle. The blue bars represent the score value calculated for the blade curve displayed, while the red bars show the added penalty value. Green bars represent negative score values. Click Optimize/Pause to stop the optimization run temporarily in order to view the best blade evaluated so far, and click it again to continue. When the optimization run is completed, you can select any view, but menu items that would modify the optimized blade are grayed out. To change the blade, it is necessary to select Data/Enable Modification. This prevents accidental loss of the results of the optimization.

 

Even though the optimization just performed is abbreviated, the resulting curve should give an idea of what an optimal curve looks like. It will immediately be obvious (for reasons discussed above) that this curve is not clinically useful. For this reason, it was necessary to develop a better scoring system. The REIT (Restricted EIT) score uses the angle MIT (the available forward space into which the tongue can be displaced) to score blade shapes, with the constraint that the angle EIT (the eye line angle) is restricted to be no greater than a clinically reasonable size. To perform an optimization run using the REIT score, follow the instructions given above, but before starting the optimization run click Parameters/Score, select “Restricted angle EIT”, click “OK”, and enter a value for MaxEIT (the default of 5.0 is suggested). You can also set the desired number of dimensions, deepest insertion, or anatomical parameters. However, for an REIT score optimization it is best to start with a blade whose input data values are all zero: this avoids an initial period of wandering through regions of the function space where the angle EIT is too large. If the History or Progress graphs require scaling, just click with the mouse when the cursor changes to a circle.

 

If you wish to perform an optimization to better precision, open one of the files in the directory DataFiles that was optimized with amebsa using 39 dimensions. Click View/Blade Information, and use similar settings. Be aware, however, that run times at this level may be measured in hours rather than minutes. Long optimization runs will run faster if you disable the screen saver and close any programs that may be running in the background. For maximum speed, select “No display” from the Optimize/Display Cycle menu when not monitoring the progress of the optimization run. Optim.exe will continue its calculations in the background if it is convenient to run other programs (including other instances of itself) at the same time.

 

The optimization algorithms powell and amoeba are Numerical Recipes routines that find a local minimum. The random algorithm is a simple minded one that just keeps trying shapes at random. These functions were used in developing and debugging the program, and for checking the results given by amebsa.

 

The range of insertion depths (ie, the fraction of the IT distance over which the score is evaluated) has an important effect on the optimization of the blade. To demonstrate this, open the files v3.opt, v75.opt, v9.opt, and v1.opt. The most efficient blade is one that is inserted to only a single insertion depth (shortest IT distance of 1.0). Click View/Best Angle for each of these blade shapes to explore the relationships graphically. (Also see the graph of optimized REIT scores.)

                                                                                                                                         

Click View/Flattened to make it easier to compare the essential differences between the curves. In the “flattened” curve, all parts of the lingual curve that do not contribute to the calculation of any angle MIT are replaced with straight line segments. Since all MIT angles remain the same and all EIT angles remain the same or become smaller, the REIT score for the curve is not changed. The MHC score will improve if possible (the score of a curve that has been optimized should not change), but cannot become worse.

Other Options

There are a number of other options available that have not been demonstrated above. These include printing, saving data in various formats, exporting images, annotation, and special purpose display features. These are all documented in the file OpMenu.doc.

 

The computer code is structured such that other blade models and scoring systems can be created and their implications explored.