Optimizers in the Reed Study Model - edwardkort/WWIDesigner GitHub Wiki

Introduction

This page summarizes the optimizer tools that the reed study models provides. Each optimizer varies specific aspects of the instrument geometry, to produce an instrument that plays as close as possible to the selected tuning. The reed study models currently support the optimizers listed below. A couple of these optimizers appear in two versions: local and global. The local optimizer makes local refinements to a near-optimal instrument; the global optimizer optimizes the same dimensions as the corresponding regular optimizer, but uses the DIRECT-C global optimizer to perform a slower, more thorough, search for a global optimum in the entire search space.

Unless specified below, optimizers minimize the difference in cents between the target frequency and the frequency predicted by the reed model, for all notes in the tuning file that have a target frequency. When optimizing the tuning of more than one note, the optimizer minimizes the sum of the squares of the differences (multiplied by any optimization weights).

The reed study model offers a number of options for optimizing the bore profile. The bore profile optimizations, in particular, tend to be difficult for optimizers. The standard (local) optimizers work well refining an instrument design from a reasonable initial geometry. However, the success of the local optimizers can be highly dependent on the initial instrument geometry. A local optimizer may find a local optimum close to the initial geometry, missing a much better global optimum that is farther away.

If you do not have a reasonable initial geometry, or want to find the best solution over the entire search space, use the global version of the optimizer. The global optimizer may take considerably more time than the local version. Global optimizers do not use the initial geometry, but success can be highly dependent on the constraints used. You should generally reduce the constraint bounds, particularly the bounds on bore length or bore diameter ratios, to bracket the expected solution. You may need to run several trials with different constraint bounds for best results.

01. Reed Calibrator

Varies the alpha and beta factors to minimize the difference between the measured playing frequencies and the predictions of the reed model. Total number of dimensions: 2.

Used in calibrating the reed model. The tuning file must have measured frequencies, rather than target frequencies.

02. Hole Size Optimizer

Varies the sizes of all holes to minimize the tuning error. Total number of dimensions = number of holes.

03. Hole Spacing Optimizer

Varies the total bore length and the spacing between holes to minimize the tuning error. Total number of dimensions = number of holes + 1.

04. Hole Size+Spacing Optimizer, 10. Global Hole Size+Spacing Optimizer

Varies the total bore length and spacing between holes, and the sizes of holes, to minimize the tuning error. Total number of dimensions = 2 * number of holes + 1.

05. Bore Diameter Optimizer

Varies bore diameters at existing bore points at the bottom of the bore. For each bore point from the bottom up, varies the ratio of the diameter at this bore point to that at the prior bore point upward. The lowest bore point left unchanged will be: the highest bore point with a name that contains the word "Body", or the lowest bore point with a name that contains the word "Head", or the lowest bore point above the top tonehole, or the lowest bore point above the middle of the bore if there are no toneholes. Bore point positions are unchanged. Total number of dimensions = number of bore points below that unchanged bore point.

Use of diameter ratios rather than absolute diameters allows constraints to control the direction of taper. If the lower bound is 1.0, as in the default constraints for this optimizer, the bore flares out toward the bottom; if the upper bound is 1.0, the bore tapers inward toward the bottom.

06. Bore Point Position Optimizer

Varies the absolute position of the bottom bore point, and for other bore points from the bottom upward, the distance from the prior bore point to this bore point, expressed as a fraction of the distance from the prior bore point to the bottom. The lowest bore point left unchanged will be: the highest bore point with a name that contains the word "Body", or the lowest bore point with a name that contains the word "Head", or the lowest bore point above the top tonehole, or the lowest bore point above the middle of the bore if there are no toneholes. Bore point diameters are unchanged. Total number of dimensions = number of bore points below that unchanged bore point.

The constraints limit the absolute position of the bottom bore point, and the relative positions of remaining bore points. The relative position constraints should always be greater than zero and less than 1.

07. Bore Point Optimizer

Varies the position and diameter for bore points at the bottom of the instrument. The lowest bore point left unchanged will be: the highest bore point with a name that contains the word "Body", or the lowest bore point with a name that contains the word "Head", or the lowest bore point above the top tonehole, or the lowest bore point above the middle of the bore if there are no toneholes. Bore point diameters are unchanged. Total number of dimensions = 2 * (number of bore points below that unchanged bore point).

Uses the same form of constraints as the bore diameter and bore position optimizers described above.

08. Hole and Bore Diameter Optimizer, 11. Global Hole and Bore Diameter Optimizer

Varies position and diameter of toneholes, plus the diameter of bore points at the bottom of the instrument. The lowest bore point left unchanged will be: the highest bore point with a name that contains the word "Body", or the lowest bore point with a name that contains the word "Head", or the lowest bore point above the top tonehole, or the lowest bore point above the middle of the bore if there are no toneholes. Total number of dimensions = 2 * number of holes + number of bore points below the unchanged bore point.

09. Hole and Bore Position Optimizer

Varies position and diameter of toneholes, plus the position of all bore points at the bottom of the instrument. The lowest bore point left unchanged will be: the highest bore point with a name that contains the word "Body", or the lowest bore point with a name that contains the word "Head", or the lowest bore point above the top tonehole, or the lowest bore point above the middle of the bore if there are no toneholes. Total number of dimensions = 2 * number of holes + number of bore points below the unchanged bore point.