opm-common
Opm::TrackOrderingTSP::TrackCostWeights Struct Reference

Cost weights controlling the TRACK edge-cost function. More...

#include <TrackOrderingTSP.hpp>

Public Member Functions

constexpr bool isValid () const noexcept
 Check if the weights are valid for use in the edge-cost function. More...
 

Public Attributes

double w_ij {1.0}
 Weight for horizontal logical-grid distance in the I/J plane.
 
double w_k {0.5}
 Weight for logical K-index step distance.
 
double w_z {0.05}
 Weight for geometric depth difference.
 
double w_dir {0.25}
 Weight for direction-misalignment penalty between successive connections and their step vector. More...
 
double z_to_ij_scale {0.05}
 Scale factor that maps depth differences into the I/J distance metric used by the direction penalty term. More...
 

Detailed Description

Cost weights controlling the TRACK edge-cost function.

Member Function Documentation

◆ isValid()

constexpr bool Opm::TrackOrderingTSP::TrackCostWeights::isValid ( ) const
inlinenoexcept

Check if the weights are valid for use in the edge-cost function.

All weights must be non-negative and at least one weight must be positive to ensure that the edge-cost function is well-defined and can effectively guide the TSP heuristic.

Returns
Whether or not the weights are valid.

Member Data Documentation

◆ w_dir

double Opm::TrackOrderingTSP::TrackCostWeights::w_dir {0.25}

Weight for direction-misalignment penalty between successive connections and their step vector.

◆ z_to_ij_scale

double Opm::TrackOrderingTSP::TrackCostWeights::z_to_ij_scale {0.05}

Scale factor that maps depth differences into the I/J distance metric used by the direction penalty term.

Depth differences (dZ in meters) and horizontal grid distances (hypot(dI, dJ) in grid cells) are measured in different units and typically different magnitudes. When computing the direction penalty, we need to determine which component (horizontal vs. vertical) is dominant in the step vector to decide whether a connection follows the well trajectory. This requires a dimensionless comparison.

The z_to_ij_scale factor normalizes depth into equivalent I/J units: equivalent_ij_distance = |dZ| * z_to_ij_scale. For example, with z_to_ij_scale = 0.05, a depth increase of 20 meters becomes 1 unit of equivalent horizontal distance. This ensures that the direction penalty treats depth and horizontal components on equal footing, allowing the heuristic to balance vertical and horizontal progression appropriately.


The documentation for this struct was generated from the following file: