Package-level declarations

Types

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

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
class EvaluationRequestBuggers(numReps: Int, val inputMap: InputMap) : FeasibilityIfc

A request for evaluation by the simulation oracle for the provided input values. Note that two requests are considered equal if their input maps are the same. Input maps are considered the same if all (name, value) pairs are equivalent. The number of replications of the request is not considered in the determination of equality.

Link copied to clipboard
class Evaluator(val problemDefinition: ProblemDefinition, simulator: RunSimulationsForResponseMapsIfc, val cache: SolutionCacheIfc? = null, oracleReplicationBudget: Int = Int.MAX_VALUE) : 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
class ModelNotProvidedException(message: String? = null, cause: Throwable? = null) : Exception
Link copied to clipboard
class NaivePenaltyFunction(val initialValue: Double = 1000.0, val exponent: Double = 2.0) : PenaltyFunctionIfc

A naive penalty function as describe in Chuljin Park, Seong-Hee Kim (2015) Penalty Function with Memory for Discrete Optimization via Simulation with Stochastic Constraints. Operations Research 63(5):1195-1212 (https://doi.org/10.1287/opre.2015.1417)

Link copied to clipboard
fun interface PenaltyFunctionIfc
Link copied to clipboard
@Serializable
data class RequestData(val modelIdentifier: String, var numReplications: Int, val inputs: Map<String, Double> = emptyMap(), val responseNames: Set<String> = emptySet(), val experimentRunParameters: ExperimentRunParameters? = null, val modelConfiguration: Map<String, String>? = null, val requestTime: Instant = Clock.System.now())

The data associated with a request for a simulation evaluation.

Link copied to clipboard
@Serializable
data class ResponseData(val modelIdentifier: String, val responses: Map<String, EstimatedResponse>)
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

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
open class SimulationService(val modelProvider: ModelProviderIfc, val simulationRunCache: SimulationRunCacheIfc? = null, var useCachedSimulationRuns: Boolean = false) : SimulationServiceIfc

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

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 numReplications: Int, val estimatedObjFnc: EstimatedResponse, val responseEstimates: List<EstimatedResponse>, val iterationNumber: Int) : Comparable<Solution> , FeasibilityIfc

A solution represents the evaluated inputs for on a problem definition.

Link copied to clipboard
@Serializable
data class SolutionData(val id: Int, val dataType: String, val subType: String?, val dataName: String, val dataValue: Double)

A class to assist with capturing data from a solution.

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

Class to support a group of solutions (each 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

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