Package-level declarations

Types

Link copied to clipboard
class AdditiveMODAModel(metricDefinitions: Map<MetricIfc, ValueFunctionIfc>, weights: Map<MetricIfc, Double> = makeEqualWeights(metricDefinitions.keys), name: String? = null) : MODAModel

Represents a multi-objective decision analysis (MODA) model that uses an additive model for the attribute valuation. The supplied weights must correspond to weights within the model.

Link copied to clipboard

How the alternatives are compared to arrive at a single recommendation.

Link copied to clipboard
data class AlternativeDefinitionResult(val accepted: List<String>, val rejected: List<AlternativeRejection>)

Which of the offered alternatives a model took in, and why it left out any that it did not.

Link copied to clipboard
data class AlternativeRankFrequencyData(var id: Int = nextId(), var modaName: String = "", var alternative: String = "", var value: Int = 0, var count: Double = 0.0, var proportion: Double = 0.0, var cumProportion: Double = 0.0) : DbTableData
Link copied to clipboard
sealed interface AlternativeRejection

The reason an alternative offered to a model was not taken into it.

Link copied to clipboard
data class ElicitationRecord(val order: List<String>, val ratings: Map<String, Double>, val elicitedAgainst: Map<String, ElicitedRange>, val adjustableRanges: List<String>)

What was asked, and what was answered, when weights were elicited by the swing method, together with the ranges the answers were given against.

Link copied to clipboard
data class ElicitedRange(val lowerLimit: Double, val upperLimit: Double)

The range a metric was measured over when a weight was elicited for it.

Link copied to clipboard
data class FlipPoint(val metric: String, val currentWeight: Double, val criticalWeight: Double, val displacedBy: String)

A weight at which the alternative a study currently recommends would be displaced by another.

Link copied to clipboard

Uses a linear transformation to transform from score with a metric domain to the value domain.

Link copied to clipboard
class LogisticFunction(var location: Double = 0.0, scale: Double = 1.0) : ValueFunctionIfc
Link copied to clipboard
open class Metric(val name: String, val domain: Interval = Interval(0.0, Double.MAX_VALUE), val allowLowerLimitAdjustment: Boolean = true, val allowUpperLimitAdjustment: Boolean = true) : MetricIfc

This class serves as a base class for classes that implement the MetricIfc interface. A metric is figure of merit that characterizes the performance of a device, system, method, or entity, relative to its alternatives.

Link copied to clipboard
data class MetricData(var id: Int = nextId(), var modaName: String = "", var metricName: String = "", var direction: String = "", var weight: Double = 1.0, var domainLowerLimit: Double = 0.0, var domainUpperLimit: Double = Double.POSITIVE_INFINITY, var unitsOfMeasure: String? = null, var description: String? = null, var allowLowerLimitAdjustment: Boolean = false, var allowUpperLimitAdjustment: Boolean = false) : DbTableData
Link copied to clipboard
interface MetricIfc

A performance metric is figure of merit that characterizes the performance of a device, system, method, or entity, relative to its alternatives.

Link copied to clipboard
data class MetricRecord(val name: String, val direction: String, val weight: Double, val declaredLowerLimit: Double, val declaredUpperLimit: Double, val effectiveLowerLimit: Double, val effectiveUpperLimit: Double, val domainWasRescaled: Boolean, val allowLowerLimitAdjustment: Boolean, val allowUpperLimitAdjustment: Boolean, val realizedLowestScore: Double? = null, val realizedHighestScore: Double? = null, val hadTiedScores: Boolean, val valueFunctionId: String, val unitsOfMeasure: String?, val description: String?)

What was known about one metric at the moment a study was evaluated.

Link copied to clipboard
class MODAAnalyzer(alternativeNames: Set<String>, responseDefinitions: Set<MODAAnalyzerData>, responseData: List<WithinRepViewData>)
Link copied to clipboard
data class MODAAnalyzerData(val responseName: String, val direction: MetricIfc.Direction = MetricIfc.Direction.SmallerIsBetter, var weight: Double = 1.0, val valueFunction: ValueFunctionIfc = LinearValueFunction(), val domain: Interval = Interval(0.0, Double.MAX_VALUE), var unitsOfMeasure: String? = null, var description: String? = null)
Link copied to clipboard
abstract class MODAModel(metricDefinitions: Map<MetricIfc, ValueFunctionIfc>, name: String? = null) : IdentityIfc

Defines a base class for creating multi-objective decision analysis (MODA) models.

Link copied to clipboard
interface MODAReportData

The plain, name-keyed data an AdditiveMODAModel report section needs.

Link copied to clipboard
class ModaSensitivity(snapshot: ModaSnapshot)

Asks how much a study's recommendation depends on the weights it was given.

Link copied to clipboard
data class ModaSnapshot(val name: String, val metrics: List<MetricRecord>, val alternatives: List<String>, val scores: Map<String, Map<String, Double>>, val values: Map<String, Map<String, Double>>, val overallValues: Map<String, Double>, val firstRankCounts: Map<String, Int>, val averageRankings: Map<String, Double>, val rankingMethod: String, val aggregationMethod: AggregationMethod, val primaryRecommendation: String, val warnings: List<ModaWarning>, val replicationAggregation: String? = null)

The result of evaluating a MODA study, complete and standing on its own.

Link copied to clipboard
sealed interface ModaWarning

Something worth telling the user about that came up while a model was being set up or its metric domains adjusted.

Link copied to clipboard
data class OverallValueData(var id: Int = nextId(), var modaName: String = "", var alternative: String = "", var weightedValue: Double = 0.0, var firstRankCount: Int = 0, var averageRank: Double = 0.0) : DbTableData
Link copied to clipboard
data class Score(val metric: MetricIfc, val value: Double, var valid: Boolean = true)

A score represents an evaluation of an alternative, system, or entity based on some metric. Each score is related to a metric and has a value that represents the value of the metric. If there is an issue with computing the score, then the property valid indicates whether the score can be trusted (true) or not (false). The default value of the valid property is true. The supplied value must be within the specified domain of the supplied metric; otherwise, an illegal argument exception will occur.

Link copied to clipboard
data class ScoreData(var id: Int = nextId(), var modaName: String = "", var alternative: String = "", var scoreName: String = "", var scoreValue: Double = 0.0) : DbTableData
Link copied to clipboard
data class SweepPoint(val weight: Double, val overallValues: Map<String, Double>, val winner: String)

What a study would conclude if one metric carried a given weight.

Link copied to clipboard
data class ValueData(var id: Int = nextId(), var modaName: String = "", var alternative: String = "", var metricName: String = "", var metricValue: Double = 0.0, var rank: Double = 0.0) : DbTableData
Link copied to clipboard

A value function maps values from some metric domain to the value range of 0.0, 1.0, where 0.0 implies no value and 1.0 implies maximal value.

Link copied to clipboard
fun interface ValueFunctionIfc

A value function maps values from some domain to the value range of 0.0, 1.0, where 0.0 implies no value and 1.0 implies maximal value.

Functions

Link copied to clipboard
fun main()
Link copied to clipboard

Projects this model's results into a plain MODAReportData holder. The ranking projections use this model's defaultRankingMethod, matching the behavior of the no-argument ranking accessors, so the rendered report is unchanged from rendering the live model directly.