Problem Definition
This class describes an optimization problem for use within simulation optimization algorithms. The general optimization problem is presented as minimizing the expected value of some function H(x), where x is some input parameters to the simulation and H(.) is the simulation model response for the objective function. The input parameters are assumed to be real-valued specified by a name between a lower and upper bound and a granularity. The granularity specifies the acceptable precision of the input. The problem can have a set of linear constraints. The linear constraints are a deterministic function of the inputs. The problem can also have a set of functional constraints. A functional constraint is a deterministic function of the inputs that is bounded by constraints. This permits non-linear deterministic functional forms for the problem. In addition, a set of probabilistic constraints of the form EG(x)< c can be specified, where G(x) is some response from the simulation.
To use this class, the user first defines the objective function response name, the names of the input variables, and the names of the responses to appear in the problem. Then the reference to the class can be used to specify inputs and constraints.
Parameters
the name of the problem for labeling and identification purposes. If no name is supplied, then a unique name is constructed.
the identifier of the model that this problem definition is associated with. The identifier should correspond to an actual model name registered with a simulation provider. The input names and response names should be valid for the identified model.
the name of the response within the simulation model. This name is used to extract the observed simulation values from the simulation
the names of the inputs for the simulation model. These names are used to set values for the simulation when executing experiments. Any constraints specified on the input variables must use these names.
the names of any responses that will appear in response constraints. The default is empty.
The type of optimization to perform, either MINIMIZE or MAXIMIZE.
a parameter that represents the smallest actual difference that is important to detect for the objective function response. This parameter can be used by solvers to determine if differences between solutions are considered practically insignificant. The default is zero.
the granularity of the objective function
Constructors
Properties
Returns a list of the names for all the responses referenced in the problem in the order in which they are specified in the problem creation. The first name will be the name of the response associated with the objective function, then each response name from the provided set of response names.
The functional constraints for the problem as a list
True if there are functional constraints
True if there are linear constraints
True if there are response constraints
A parameter that represents the smallest actual difference that is important to detect for the objective function response. This parameter can be used by solvers to determine if differences between solutions are considered practically insignificant. The default is zero. Must be greater than or equal to zero.
The input definitions for the problem as a list
The input definitions as a list. The key is the name of the input parameter, and the value is the input definition.
The granularity associated with each input variable as an array
The intervals for each input variable
The lower bounds for each input variable
The mid-point of each input variable's range
The names of the input parameters over which the problem is being optimized, i.e., the decision variable names. These need to correspond to simulation model inputs. This list cannot be empty.
The range (width) of each input variable's interval
The upper bounds for each input variable
A problem definition is considered integer-ordered if its input variables are all integer-ordered.
The linear constraints for the problem as a list
The maximum number of iterations when sampling for an input feasible point
The mid-point of each input variable's range as an input map
Used to maximization problems into minimization problems
The specified granularity indicates the acceptable precision for the objective function's value with respect to decision-making. If the granularity is 0 then no rounding will be applied when evaluating the objective function. Granularity defines the level of precision for variable to which the problem will be solved. Setting granularity to 0, the default, means that the solver should attempt to find a solution to the level of machine precision. For any positive granularity value, the solution will be found to some multiple of that granularity. As a special case, setting granularity to 1 implies an integer-ordered input variable. The specification of granularity reflects a reality for the decision maker that there is a level of precision beyond which it is not practical to implement a solution.
The user may supply a penalty function to use when computing the constraint violation penalty; otherwise the default penalty function is used.
The response constraints as a list
The names of the responses over which the problem is being optimized. These are the simulation response names. This list may be empty.
Can be supplied to provide a method for specifying a feasible starting point. The default is to randomly generate a starting point
Functions
Creates an infeasible and bad solution. This is useful when initializing solvers or when rejecting requests.
Translates the supplied list of arrays to a set of named input pairs (name, value). Assumes that the order of the array elements is the same as the order of the defined names for the problem. NOTE!!: If the supplied value is outside the range of the named variable, it is adjusted to the closest boundary. In addition, the granularity of the input variable is applied.
Returns a new empty response map to hold the responses associated with the problem
Filters the supplied list of arrays to a set of input maps that are input feasible. Each array is checked if it is input-feasible isInputFeasible and if so added to the resulting returned set.
Creates an FunctionalConstraint based on the supplied function.
Computes and returns the violation for each functional constraint.
Generates a random point that is feasible with respect to the input ranges, the linear constraints, and the functional constraints. If the number of sampling iterations needed to get a feasible point exceeds maxFeasibleSamplingIterations then an IllegalStateException will occur.
Generates a random point within the ranges defined by the inputs. The point will have the appropriate granularity based on the definitions of the inputs.
Computes the objective function value for the provided solution in terms of its specified granularity. If the granularity is 0.0 then the raw value is returned. Ensures that the returned value is oriented according to the optimization type.
Computes the granular version of the penalized objective function value for the provided solution in terms of its specified granularity. If the granularity is 0.0 then the raw value is returned. Ensures that the returned value is oriented according to the optimization type.
Computes the penalty function value for the provided solution in terms of its specified granularity. If the granularity is 0.0 then the raw value is returned. Ensures that the returned value is oriented according to the optimization type.
Generates the specified number of points using Latin hyper-cube sampling over the ranges of inputs. The points may not be feasible with respect to linear or functional constraints.
Generates the specified number of points using Latin hyper-cube sampling over the ranges of inputs. The points may not be feasible with respect to linear or functional constraints.
Defines an input variable for the problem. The order of specification for the input variables defines the order when interpreting an array of inputs.
Checks if the array's elements are feasible with respect to any functional constraints
Interprets the supplied map as inputs for the problem definition and returns true if the values are within functional constraints. False will be returned if at least one functional constraint is infeasible.
The supplied input is considered input-feasible if it is feasible with respect to the defined input parameter ranges, the linear constraints, and the functional constraints.
Checks if the array's elements are within the defined input ranges for each input variable.
Interprets the supplied map as inputs for the problem definition and returns true if the values are within the ranges defined for the variables. False will be returned if at least one input variable is not within its defined range.
Checks if the array's elements are feasible with respect to any linear constraints
Interprets the supplied map as inputs for the problem definition and returns true if the values are within linear constraints. False will be returned if at least one linear constraint is infeasible.
Returns true if the name is a valid response name or the name associated with the objective function.
Creates an LinearConstraint based on the supplied linear equation as specified by the map. The names in the map must be valid input names. If an input name does not exist in the map, then the coefficient for that variable is assumed to be 0.0.
Returns the coefficients of the constraints as a matrix. Assume we have the constraint A*x < b, then this function returns the A matrix. The coefficients have been adjusted to ensure a less-than orientation for the constraints.
Returns the coefficients of the constraints as a matrix. Assume we have the constraint Ax < b or Ax b, then this function returns the A matrix. The coefficients have not been adjusted for the direction of the constraints.
Assume we have the constraint Ax < b or Ax b, then this function returns the b vector. The values have been adjusted for the direction of the constraint such that the constraint is considered to have a less-than orientation.
Returns the adjusted left-hand side values for each constraint. Makes the adjustment such that the constraint is considered less-than orientation.
Assume we have the constraint, Ax < b or Ax b, then this function returns the b vector. The values have not been adjusted for the direction of the constraint.
Computes and returns the violation for each linear constraint.
Computes the objective function value for the provided solution. Ensures that the returned value is oriented according to the optimization type.
Computes the penalized objective function value for the provided solution. Ensures that the returned value is oriented according to the optimization type. This is the objective function value plue the penality function value.
Returns the total violation penalty associated with the constraints for the problem. Ensures that the returned value is oriented according to the optimization type.
Randomly selects from the list of valid input names with an equal likelihood.
Randomly generates a new value for the named input variable and a new input map. The input should be feasible with respect to linear or functional constraints. If the number of sampling iterations needed to get a feasible point exceeds maxFeasibleSamplingIterations then an IllegalStateException will occur.
Randomly generates a new value for the named input variable and returns a new input map. The input map may not be feasible with respect to linear or functional constraints.
Creates an ResponseConstraint based on the supplied response name and right-hand side value.
Returns the adjusted right-hand side values for the response constraints.
Returns the unadjusted right-hand side values for the response constraints.
The violations associated with the response constraints for the provided values within the response map.
The array x is mutated to hold values that have appropriate granularity based on the input definitions.
The map values are mutated to hold values that have appropriate granularity and range based on the input definitions.
Returns a starting point for the problem. If the user specified an instance of the StartingPointIfc via the ProblemDefinition.startingPointGenerator property then the supplied generator is used; otherwise, the problem definition attempts to randomly generate an input feasible starting point via the ProblemDefinition.generateInputFeasibleValues function.
Translates the supplied array to named input pairs (name, value). Assumes that the order of the array is the same as the order of the defined names for the problem. NOTE!!: If the supplied value is outside the range of the name variable, it is adjusted to the closest boundary. In addition, the granularity of the input variable is applied. Thus, the returned input map will be input-range-feasible after this conversion process.
Ensures that the supplied map is translated to an appropriate map containing name, value pairs for this problem. The resulting InputMap will have valid names and values that are input-range-feasible. The values will be rounded to the appropriate granularity for the named input variable.
Translates the supplied array to named input pairs (name, value). Assumes that the order of the array is the same as the order of the defined names for the problem. NOTE!!: No adjustment of the value is performed. The resulting map may be infeasible with respect to input variable ranges and other deterministic constraints.
Computes and returns the total violation for the functional constraints.
Computes and returns the total violation for the linear constraints.
The total violations associated with the response constraints for the provided values within the map holding the average response for each named response.
Checks if the supplied value is a valid input value for the supplied input name.
Checks if the names in the map are valid for the problem definition
Validates whether the provided model has the input and response names required by the problem.