Package-level declarations

Types

Link copied to clipboard
open class ConfidenceIntervalEquality(level: Double = DEFAULT_CONFIDENCE_LEVEL, indifferenceZone: Double = 0.0) : SolutionEqualityIfc

Checks for equality between solutions based whether the confidence interval on the difference contains the indifference zone parameter.

Link copied to clipboard
@Serializable
data class EstimatedResponse(val name: String, val average: Double, val variance: Double, val count: Double) : EstimatedResponseIfc

Represents an estimated response based on an independent sample. For the case of sample size 1 (count equals 1), the variance will be undefined (Double.NaN).

Link copied to clipboard

An interface to define basic statistics for something that is estimated.

Link copied to clipboard
class EstimateResponseComparator(level: Double = DEFAULT_CONFIDENCE_LEVEL, indifferenceZone: Double = 0.0)
Link copied to clipboard
@Serializable
data class EvaluationRequest @JvmOverloads constructor(val modelIdentifier: String, val modelInputs: List<ModelInputs>, val crnOption: Boolean = false, val cachingAllowed: Boolean = true)

An evaluation request is used to request simulation oracle execution on a model.

Link copied to clipboard
class Evaluator @JvmOverloads constructor(val problemDefinition: ProblemDefinition, simulator: SimulationOracleIfc, val cache: SolutionCacheIfc? = null) : EvaluatorIfc

An evaluator should communicate with the simulation oracle to determine solutions for requests for evaluation from solvers.

Link copied to clipboard
interface EvaluatorIfc
Link copied to clipboard

This solution comparator returns 0 if the inputs are the same for the two solutions. If the solutions do not have the same inputs, then the penalized objective function is used to determine the ordering. Thus, two solutions are considered the same if they have the same input values, regardless of the value of the objective functions.

Link copied to clipboard
class InputsAndConfidenceIntervalEquality(level: Double = DEFAULT_CONFIDENCE_LEVEL, indifferenceZone: Double = 0.0) : ConfidenceIntervalEquality

Checks for equality between solutions based whether the confidence interval on the difference contains the indifference zone parameter and whether the input variable values are the same.

Link copied to clipboard
@Serializable
data class ModelInputs(val modelIdentifier: String, val numReplications: Int, val inputs: Map<String, Double> = emptyMap(), val responseNames: Set<String> = emptySet(), val requestTime: Instant = Clock.System.now())

The data associated with a request for a simulation evaluation. A critical aspect of this implementation is how the equality of instances is determined.

Link copied to clipboard
class ModelNotProvidedException(message: String? = null, cause: Throwable? = null) : Exception
Link copied to clipboard

Compares solutions based on granular objective function values.

Link copied to clipboard

A comparator for solutions based on the penalized objective function values.

class PenalizedObjectiveFunctionConfidenceIntervalComparator(level: Double = DEFAULT_CONFIDENCE_LEVEL, indifferenceZone: Double = 0.0)

Checks for equality between solutions based whether the confidence interval on the difference contains the indifference zone parameter.

Link copied to clipboard
class PenalizedObjectiveFunctionEquality(val solutionPrecision: Double = defaultNumericalPrecision) : SolutionEqualityIfc

Equality of the solutions is based on the penalized objective function values being within a specific precision.

Compares solutions based on granular penalized objective function values.

Link copied to clipboard
@Serializable
data class ResponseMap(val modelIdentifier: String, val responseNames: Set<String>, map: MutableMap<String, EstimatedResponse> = mutableMapOf()) : Map<String, EstimatedResponse>

A response map holds replication data from evaluations of the simulation oracle. The key to the map is the response name, which should match a named response within the simulation model and within the problem definition. The associated list of doubles is the within replication average for each replication.

Link copied to clipboard

An interface to define something that can simulate evaluation requests.

Link copied to clipboard

This simulation provider will execute evaluation requests on the same model and collect the desired responses. This provider runs the model's replications locally and sequentially in the same execution thread as the requests.

Link copied to clipboard

An interface that promises to run simulations on instances of input/output pairs. The keys of the map are evaluation requests for a specific number of replications for specific input variable values. The associated ResponseMap represents the desired responses from the simulation. It should contain the replication averages for each desired response.

Link copied to clipboard
class SimulationRunException(val simulationRun: SimulationRun, message: String? = simulationRun.runErrorMsg, cause: Throwable? = null) : Exception
Link copied to clipboard
abstract class SimulationService(val simulationRunCache: SimulationRunCacheIfc? = null) : SimulationServiceIfc
Link copied to clipboard

This simulation service will execute evaluation requests on models and collect the desired responses.

Link copied to clipboard
data class Solution(val inputMap: InputMap, val estimatedObjFnc: EstimatedResponse, val responseEstimates: List<EstimatedResponse>, val evaluationNumber: Int, val isValid: Boolean = true) : Comparable<Solution> , FeasibilityIfc, EstimatedResponseIfc

A solution represents the evaluated inputs for on a problem definition. Solution also implements the EstimatedResponseIfc interface by delegating to the supplied estimated objective function. The FeasibilityIfc interface is implemented by delegating to the supplied input map.

Link copied to clipboard
class SolutionChecker(var equalityChecker: SolutionEqualityIfc = InputEquality, noImproveThreshold: Int = defaultNoImproveThreshold)

A solution checker holds solutions up to a capacity (threshold). The solution checker will hold a maximum number of solutions to check (capacity/threshold). If the contained solutions all test as equal, then the checker returns true.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun interface SolutionEqualityIfc

A functional interface for checking if two solutions are equal.

Link copied to clipboard
class Solutions(capacity: Int = defaultCapacity, var allowInfeasibleSolutions: Boolean = false) : SolutionsIfc

Class to support a group of solutions (all containing inputs, responses, objective fns, penalties) The solutions are naturally ordered by comparison of Solution instances based on their penalized objective functions (without regard to sampling error).

Link copied to clipboard
interface SolutionsIfc : List<Solution>

Functions

Link copied to clipboard
fun List<Solution>.toDataFrame(): AnyFrame

Returns a DataFrame of the data associated with the solutions.

Link copied to clipboard

Returns a map of the data associated with the solutions.

Link copied to clipboard

A simple extension function to compute the total number of replications within a set of evaluation requests.