Class LogisticFunctionMSBD
java.lang.Object
solvers.queueingnet.montecarloLogistic.numericalIntegration.SafeFunction
solvers.queueingnet.montecarloLogistic.solver.LogisticFunctionBase
solvers.queueingnet.montecarloLogistic.solver.LogisticFunctionMSBD
- All Implemented Interfaces:
Function
Implementation of the Multiserver Logistic Function, as given in Ong 2018:
Java Algorithms for Computer Performance Analysis. Uses Method 2, with the
Sum and Difference operators inside
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected cern.colt.matrix.linalg.Algebraprotected cern.colt.matrix.DoubleMatrix2Dprotected doubleprotected intprotected MathContextprotected intprotected cern.colt.matrix.DoubleMatrix1Dprotected intprotected cern.colt.matrix.DoubleMatrix1Dprotected cern.colt.matrix.DoubleMatrix2Dprotected ArrayList<solvers.queueingnet.montecarloLogistic.solver.LogisticFunctionMSBD.state> Fields inherited from class LogisticFunctionBase
hess_stat, u_stat, v_stat, x_statFields inherited from class SafeFunction
ndim -
Constructor Summary
ConstructorsConstructorDescriptionLogisticFunctionMSBD(int ndim, int[] population, double[][] demands, double[] servers, double epsilon) LogisticFunctionMSBD(int ndim, int[] population, double[][] demands, double[] servers, double epsilon, MathContext MC) LogisticFunctionMSBD(int ndim, cern.colt.matrix.DoubleMatrix1D population, cern.colt.matrix.DoubleMatrix2D demands, cern.colt.matrix.DoubleMatrix1D servers, double epsilon) LogisticFunctionMSBD(int ndim, cern.colt.matrix.DoubleMatrix1D population, cern.colt.matrix.DoubleMatrix2D demands, cern.colt.matrix.DoubleMatrix1D servers, double epsilon, MathContext MC) -
Method Summary
Modifier and TypeMethodDescriptionvoidStationary point Hessian calculations for multi-server networksvoidStationary point calculation for multi-server networks - requires CG descent.protected voidcheckInDomain(double[] point) Function that checks point in within the domain of the functioncopy()double[][]evaluateHessStat(double[] stat_point) Evaluate the Hessian of k(x) at the stationary point, stat_point.double[]evaluateJac(double[] point) Evaluate the Jacobian of k(x) at the given point, point Does not have to be the stat point.protected BigDecimalsafeEvaluate(double[] point) Implements the safeEvaluate abstract method.Methods inherited from class LogisticFunctionBase
getHess_stat, getU_stat, getV_stat, getX_statMethods inherited from class SafeFunction
checkPoint, evaluate
-
Field Details
-
N
protected int N -
R
protected int R -
K
protected int K -
epsilon
protected double epsilon -
demands
protected cern.colt.matrix.DoubleMatrix2D demands -
sigma
protected cern.colt.matrix.DoubleMatrix2D sigma -
servers
protected cern.colt.matrix.DoubleMatrix1D servers -
pop
protected cern.colt.matrix.DoubleMatrix1D pop -
A
protected cern.colt.matrix.linalg.Algebra A -
MC
-
States
protected ArrayList<solvers.queueingnet.montecarloLogistic.solver.LogisticFunctionMSBD.state> States
-
-
Constructor Details
-
LogisticFunctionMSBD
public LogisticFunctionMSBD(int ndim, int[] population, double[][] demands, double[] servers, double epsilon) throws InternalErrorException - Throws:
InternalErrorException
-
LogisticFunctionMSBD
public LogisticFunctionMSBD(int ndim, cern.colt.matrix.DoubleMatrix1D population, cern.colt.matrix.DoubleMatrix2D demands, cern.colt.matrix.DoubleMatrix1D servers, double epsilon) throws InternalErrorException - Throws:
InternalErrorException
-
LogisticFunctionMSBD
public LogisticFunctionMSBD(int ndim, cern.colt.matrix.DoubleMatrix1D population, cern.colt.matrix.DoubleMatrix2D demands, cern.colt.matrix.DoubleMatrix1D servers, double epsilon, MathContext MC) throws InternalErrorException - Throws:
InternalErrorException
-
LogisticFunctionMSBD
public LogisticFunctionMSBD(int ndim, int[] population, double[][] demands, double[] servers, double epsilon, MathContext MC) throws InternalErrorException - Throws:
InternalErrorException
-
LogisticFunctionMSBD
- Throws:
InternalErrorException
-
-
Method Details
-
safeEvaluate
Implements the safeEvaluate abstract method. Computes the logistic additive function at the point given by point, for multiserver networks e^(k(x))- Specified by:
safeEvaluatein classSafeFunction- Parameters:
point- Array representing point to be evaluated- Returns:
- BigDecimal equal to the function value at that point
- Throws:
InternalErrorException- if the operation cannot be completed
-
checkInDomain
Description copied from class:SafeFunctionFunction that checks point in within the domain of the function- Specified by:
checkInDomainin classSafeFunction- Parameters:
point- Point to be checked- Throws:
InternalErrorException- When point is invalid
-
copy
- Throws:
InternalErrorException
-
calculate_stationary_point
Stationary point calculation for multi-server networks - requires CG descent. Requires the implementation of a gradient MultivariateVectorFunction and a partial gradient MultivariateFunction to be given into the optimizer class. These will then be used in the nonlinear CG algorithm to calculate the direction of descent- Specified by:
calculate_stationary_pointin classLogisticFunctionBase- Throws:
InternalErrorException
-
calculate_hessian
Stationary point Hessian calculations for multi-server networks- Specified by:
calculate_hessianin classLogisticFunctionBase- Throws:
InternalErrorException
-
evaluateHessStat
Evaluate the Hessian of k(x) at the stationary point, stat_point. Will be correct iff stat-point is the correct stationary point- Parameters:
stat_point- stationry point to provide- Returns:
- double[][] containing the Hessian of log(k(x))
- Throws:
InternalErrorException
-
evaluateJac
Evaluate the Jacobian of k(x) at the given point, point Does not have to be the stat point. For use in gradient descent for finding the stationary point- Parameters:
point- Given point to evaluate Jacobian- Returns:
- double[] representing Jacobian
- Throws:
InternalErrorException
-