Package com.anylogic.engine
- Nested Class Summary
- Nested classes/interfaces inherited from class com.anylogic.engine.ExperimentMultipleRuns
- Nested classes/interfaces inherited from class com.anylogic.engine.Experiment
- Field Summary
- Fields inherited from class com.anylogic.engine.ExperimentMultipleRuns
- Fields inherited from class com.anylogic.engine.Experiment
- Fields inherited from class com.anylogic.engine.Utilities
- Fields inherited from class com.anylogic.engine.Presentable
- Fields inherited from interface com.anylogic.engine.AgentConstants
- Fields inherited from interface com.anylogic.engine.EnvironmentConstants
- Fields inherited from interface com.anylogic.engine.UtilitiesMath
- Fields inherited from interface com.anylogic.engine.UtilitiesRandom
- Constructor Summary
- Method Summary
- Methods inherited from class com.anylogic.engine.ExperimentMultipleRuns
- Methods inherited from class com.anylogic.engine.ExperimentRunFast
- Methods inherited from class com.anylogic.engine.Experiment
- Methods inherited from class com.anylogic.engine.Utilities
- Methods inherited from class com.anylogic.engine.Presentable
- Methods inherited from class java.lang.Object
- Methods inherited from interface com.anylogic.engine.UtilitiesRandom
- Constructor Details
- Method Details
- getProgress
- getCurrentIteration
- getNumberOfCompletedIterations
- getCurrentReplication
- isUseReplications
- setUseReplications
- setFixedReplicationsNumber
- setVariableReplicationsNumber
- isLastReplication
- evaluateStopConditions
- getRangeParametersNumber
- setupRangeVariedParameter
- getMaximumIterations
- setupRootParameters
- getValueForConfidenceComputation
- calculateRangeParameterValuesNumbers
- java.lang.Object
- com.anylogic.engine.Presentable
- com.anylogic.engine.Utilities
- com.anylogic.engine.Experiment<ROOT>
- com.anylogic.engine.ExperimentRunFast<ROOT>
- com.anylogic.engine.ExperimentMultipleRuns<ROOT>
- com.anylogic.engine.ExperimentParamVariation<ROOT>
- Type Parameters:
ROOT
- class of top-level agent
- All Implemented Interfaces:
AgentConstants
,EnvironmentConstants
,UtilitiesMath
,UtilitiesRandom
,UtilitiesString
,Serializable
public abstract class ExperimentParamVariation<ROOT extends Agent> extends ExperimentMultipleRuns<ROOT>
Experiment used to run simulation several times with different parameter
values. To use this experiment you need to subclass from it.
By default, this experiment works in range parameters variation mode (override
for freeform parameters override
Experiments which use replications should call
For varied replications number mode also
By default, this experiment works in range parameters variation mode (override
getRangeParametersNumber()
,
calculateRangeParameterValuesNumbers()
,
setupRangeVariedParameter(Agent, int, int, boolean)
,
setupRootParameters(Agent, int, boolean)
methods),for freeform parameters override
getMaximumIterations()
and
setupRootParameters(Agent, int, boolean)
methodsExperiments which use replications should call
setUseReplications(boolean)
and
setFixedReplicationsNumber(int)
or
setVariableReplicationsNumber(int, int, com.anylogic.engine.ExperimentMultipleRuns.ConfidenceLevel, double)
from overridden
#setup(java.awt.Container)
method,For varied replications number mode also
getValueForConfidenceComputation(Agent)
method should be
overridden define- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
- Serialized Form
CONFIDENCE_LEVEL_80, CONFIDENCE_LEVEL_90, CONFIDENCE_LEVEL_95, CONFIDENCE_LEVEL_98, CONFIDENCE_LEVEL_99, CONFIDENCE_LEVEL_99_9
ERROR, FINISHED, IDLE, modelExecutionCommandQueue, mutexModelActionQueue, OPEN_RESULTS, OPEN_SNAPSHOT, PAUSE, PAUSED, PLEASE_WAIT, RUN, RUNNING, SAVE_RESULTS, SAVE_SNAPSHOT, STEP, STOP
AM, APRIL, AUGUST, DECEMBER, FEBRUARY, FRIDAY, JANUARY, JULY, JUNE, LENGTH_UNIT_CENTIMETER, LENGTH_UNIT_FOOT, LENGTH_UNIT_INCH, LENGTH_UNIT_KILOMETER, LENGTH_UNIT_METER, LENGTH_UNIT_MILE, MARCH, MAY, MONDAY, NOVEMBER, OCTOBER, PM, SATURDAY, SEPTEMBER, SUNDAY, THURSDAY, TIME_UNIT_DAY, TIME_UNIT_HOUR, TIME_UNIT_MILLISECOND, TIME_UNIT_MINUTE, TIME_UNIT_MONTH, TIME_UNIT_SECOND, TIME_UNIT_WEEK, TIME_UNIT_YEAR, TUESDAY, UNDECIMBER, WEDNESDAY
ALIGNMENT_CENTER, ALIGNMENT_LEFT, ALIGNMENT_RIGHT, ARROW_FILLED, ARROW_NONE, ARROW_THIN, CAD_ANTIALIASING, CAD_INVERTED, LINE_STYLE_DASHED, LINE_STYLE_DOTTED, LINE_STYLE_SOLID, SHAPE_DRAW_2D, SHAPE_DRAW_2D3D, SHAPE_DRAW_3D
AGENT_ORIENTATION_FRONT, AGENT_ORIENTATION_LEFT, AGENT_ORIENTATION_REAR, AGENT_ORIENTATION_RIGHT, ALL, ALL_CONNECTED, ALL_NEIGHBORS, AREA_ACCESS_RESTRICTION_BY_CAPACITY, AREA_ACCESS_RESTRICTION_BY_CONDITION, AREA_ACCESS_RESTRICTION_BY_SCHEDULE, AREA_ACCESS_RESTRICTION_BY_THROUGHPUT, AREA_ACCESS_RESTRICTION_MANUAL, CENTIMETER, CONVEYOR_BACKWARD, CONVEYOR_CUSTOM_STATION_AGENT_LOCATION_CENTER, CONVEYOR_CUSTOM_STATION_AGENT_LOCATION_NEAR_CONVEYOR, CONVEYOR_CUSTOM_STATION_AGENT_LOCATION_RANDOM, CONVEYOR_FORWARD, CONVEYOR_SIMPLE_STATION_DELAY_TYPE_MANUAL, CONVEYOR_SIMPLE_STATION_DELAY_TYPE_TIMEOUT, CONVEYOR_TYPE_BELT, CONVEYOR_TYPE_CELL, CONVEYOR_TYPE_ROLLER, CUBIC_METER, CUBIC_METER_PER_SECOND, CUSTOM_COLOR_SCHEME, DAY, DEG_PER_SECOND, DEGREE, DENSITY_VALUE_MAX, DENSITY_VALUE_MEAN, EAST, ELEVATOR_DIRECTION_DOWN, ELEVATOR_DIRECTION_NONE, ELEVATOR_DIRECTION_UP, ELEVATOR_DOOR_FRONT, ELEVATOR_DOOR_REAR, ELEVATOR_DOORS_FRONT, ELEVATOR_DOORS_FRONT_REAR, ELEVATOR_DOORS_FRONT_REAR_XJAL, ELEVATOR_DOORS_FRONT_XJAL, ELEVATOR_MOVEMENT_BY_SPEED, ELEVATOR_MOVEMENT_BY_TIME_PER_LEVEL, ELEVATOR_STATE_FAILED, ELEVATOR_STATE_IDLE, ELEVATOR_STATE_LOADING, ELEVATOR_STATE_MOVING, ESCALATOR_STAY_ALL, ESCALATOR_WALK_ALL, ESCALATOR_WALK_ON_LEFT_SIDE, ESCALATOR_WALK_ON_RIGHT_SIDE, EVENT_TIMEOUT_MODE_CYCLIC, EVENT_TIMEOUT_MODE_ONCE, EVENT_TIMEOUT_MODE_USER, EXCEEDED_QUEUE_CROWD_ROUND_AT_THE_END, EXCEEDED_QUEUE_EXTEND_TO_THE_FREE_SPACE, EXT_AGENT_CONTINUOUS, EXT_AGENT_DISCRETE, EXT_AGENT_GIS, EXT_AGENT_INTERACTIVE, EXT_AGENT_NETWORK, EXT_ENTITY, EXT_ENVIRONMENT_CONTINUOUS, EXT_ENVIRONMENT_DISCRETE, EXT_ENVIRONMENT_GIS, EXT_ENVIRONMENT_INTERACTIVE, EXT_SPACE, FLOW_STATISTICS_BOTH, FLOW_STATISTICS_LEFT, FLOW_STATISTICS_RIGHT, FOOT, FPM, FPS, FPS_SQ, HOUR, INCH, JIB_CRANE_CAT_HEAD, JIB_CRANE_FLAT_TOP, JIB_CRANE_INDUSTRIAL, JIB_CRANE_MOVEMENT_CONCURRENT, JIB_CRANE_MOVEMENT_STEP_BY_STEP, KILOGRAM, KILOGRAM_PER_SECOND, KILOMETER, KN, KPH, LIFT_PLATFORM_FLAT, LIFT_PLATFORM_ROLLER, LIFT_SELECTION_MODE_COMPARISON, LIFT_SELECTION_MODE_FIFO, LIFT_SELECTION_MODE_PRIORITY, LINEAR_COLOR_SCHEME, LITER, LITER_PER_SECOND, LOGARITHMIC_COLOR_SCHEME, METER, MILE, MILLIMETER, MILLISECOND, MINUTE, MONTH, MPH, MPS, MPS_SQ, NAUTICAL_MILE, NORTH, NORTHEAST, NORTHWEST, OBJECT_3D_INTERNAL_LIGHTING_GLOBAL, OBJECT_3D_INTERNAL_LIGHTING_INSIDE, OBJECT_3D_INTERNAL_LIGHTING_OFF, OBJECT_3D_XYZ_AXIS_ORDER, OBJECT_3D_YZX_AXIS_ORDER, OBJECT_3D_ZXY_AXIS_ORDER, OIL_BARREL, OIL_BARREL_PER_SECOND, OVERHEAD_CRANE_BRIDGE, OVERHEAD_CRANE_GANTRY, OVERHEAD_CRANE_GIRDER_DOUBLE_TIE, OVERHEAD_CRANE_GIRDER_SINGLE_FLAT, OVERHEAD_CRANE_MOVEMENT_CONCURRENT, OVERHEAD_CRANE_MOVEMENT_INDEPENDENT_HOIST, OVERHEAD_CRANE_MOVEMENT_STEP_BY_STEP, PALLET_RACK_LEFT_TO_RIGHT, PALLET_RACK_NO_DIRECTION, PALLET_RACK_RIGHT_TO_LEFT, PALLET_RACK_SINGLE_AISLE_LEFT, PALLET_RACK_SINGLE_AISLE_RIGHT, PALLET_RACK_TWO_AISLES, PALLET_RACK_TWO_PALLET_RACKS, PARKING_LOT_PARALLEL, PARKING_LOT_PERPENDICULAR, PATH_CONVEYOR, PATH_DASHEDLINE, PATH_LINE, PATH_RAILROAD, PATH_ROAD, PEDESTRIAN_MAP_TYPE, PER_DAY, PER_HOUR, PER_MILLISECOND, PER_MINUTE, PER_MONTH, PER_SECOND, PER_WEEK, PER_YEAR, POSITION_CHOICE_ARRANGED, POSITION_CHOICE_BY_ATTRACTORS, POSITION_CHOICE_RANDOM, RACK_PLACEMENT_BACK_TO_BACK, RACK_PLACEMENT_STAND_ALONE, RACK_TYPE_DRIVE_IN, RACK_TYPE_FIFO_FLOW, RACK_TYPE_LIFO_FLOW, RACK_TYPE_SELECTIVE, RAD_PER_SECOND, RADIAN, RAILWAY_SWITCH_ALL_TO_ALL, RAILWAY_SWITCH_DOUBLE_SLIP, RAILWAY_SWITCH_SINGLE_SLIP, RANDOM, RANDOM_CONNECTED, RANDOM_NEIGHBOR, ROAD_LEFT_HAND, ROAD_LINE_DOUBLE, ROAD_LINE_DOUBLE_DASHED, ROAD_LINE_SINGLE, ROAD_LINE_SINGLE_DASHED, ROAD_RIGHT_HAND, RPM, SECOND, SERVICE_GROUP_BEHAVIOR_DEPENDS_ON_INCOMING_GROUP, SERVICE_GROUP_BEHAVIOR_SAME_FOR_ALL_GROUPS, SERVICE_GROUP_INDIVIDUAL_SERVING, SERVICE_GROUP_ONE_MEMBER_IS_SERVED_OTHERS_WAIT_IN_AREA, SERVICE_GROUP_ONE_MEMBER_IS_SERVED_OTHERS_WAIT_IN_QUEUE, SERVICE_QUEUE_CLOSEST_NON_EMPTY, SERVICE_QUEUE_CLOSEST_STRICT, SERVICE_QUEUE_CUSTOM, SERVICE_QUEUE_LONGEST, SERVICE_QUEUE_NEXT_ROUND_ROBIN, SERVICE_QUEUE_PRIORITY, SERVICE_TYPE_LINEAR, SERVICE_TYPE_POINT, SIGNAL_GREEN, SIGNAL_NONE, SIGNAL_RED, SIGNAL_YELLOW, SIMPLE_STATION_LOADING_MODE_AFTER_UNLOADING, SIMPLE_STATION_LOADING_MODE_SIMULTANEOUS_WITH_UNLOADING, SIMPLE_STATION_PROCESSING_WHEN_AGENT_ENTERS, SIMPLE_STATION_PROCESSING_WHEN_CAPACITY_FULL, SOUTH, SOUTHEAST, SOUTHWEST, SPACE_CONTINUOUS, SPACE_CONTINUOUS_2D, SPACE_DISCRETE, SPACE_DISCRETE_2D, SPACE_GIS, SPACE_UNDEFINED, SQ_CENTIMETER, SQ_FOOT, SQ_INCH, SQ_KILOMETER, SQ_METER, SQ_MILE, SQ_MILLIMETER, SQ_NAUTICAL_MILE, SQ_YARD, TON, TON_PER_SECOND, TRANSFER_MODE_AUTOMATIC, TRANSFER_MODE_MANUAL, TRANSPORTER_MAP_TYPE, TURN, TURN_STATION_MODE_ANGLE, TURN_STATION_MODE_ORIENTATION, WALL_FILL_HATCHING, WALL_FILL_NONE, WALL_FILL_SOLID, WEEK, WEST, WINDOW_3D_NAVIGATION_FULL, WINDOW_3D_NAVIGATION_LIMITED_TO_Z_ABOVE_ZERO, WINDOW_3D_NAVIGATION_NONE, WINDOW_3D_NAVIGATION_ROTATION_ONLY, YARD, YEAR
LAYOUT_ARRANGED, LAYOUT_RANDOM, LAYOUT_RING, LAYOUT_SPRING_MASS, LAYOUT_USER_DEFINED, NEIGHBORHOOD_EUCLIDEAN, NEIGHBORHOOD_MOORE, NETWORK_ALL_IN_RANGE, NETWORK_RANDOM, NETWORK_RING_LATTICE, NETWORK_SCALE_FREE, NETWORK_SMALL_WORLD, NETWORK_USER_DEFINED
Constructor | Description |
---|---|
ExperimentParamVariation() | |
ExperimentParamVariation |
Same as
ExperimentParamVariation() but allows to disable
parallel evaluations on multicore/multiprocessor systems
(which are enabled by default) |
Modifier and Type | Method | Description |
---|---|---|
int[] | calculateRangeParameterValuesNumbers() |
This method should be overridden in experiments which work with parameters
varied in range
This method will be called only one time |
boolean | evaluateStopConditions |
User's extension point for experiment stop conditions
By default returns false |
int | getCurrentIteration() |
Returns the current iteration number (1, 2...)
|
int | getCurrentReplication() |
Returns the replication number for the current iteration (1, 2...)
Ensure replications are used ( ExperimentMultipleRuns.isUseReplications() ) before
calling this method |
int | getMaximumIterations() |
Returns total number of iterations being performed in this experiment
Default implementation works with range varied parameters Override in subclass if experiment uses free-form parameters |
int | getNumberOfCompletedIterations() |
Returns the number of completed iterations.
|
final double | getProgress() |
Returns the progress of the experiment: a number between 0 and 1
corresponding to the part of the experiment completed so far (based on
iteration count or time limit), or
-1 if this cannot be calculated. |
int | getRangeParametersNumber() |
This method should be overridden to return the number of parameters varied
in range in the corresponding experiments
|
double | getValueForConfidenceComputation |
Returns the value used in confidence computation when experiment uses
replications and variable replications number is used
Must be implemented in a subclass in such experiments. |
final boolean | isLastReplication() |
Return
true if we have run the last replication for the current iteration |
final boolean | isUseReplications() |
Returns
true if experiment uses replications |
void | setFixedReplicationsNumber |
Sets experiment to use a fixed number of replications.
No confidence testing is to be used For confidence testing use ExperimentMultipleRuns.setVariableReplicationsNumber(int, int, ConfidenceLevel, double) This is setup method, user should not call it |
void | setupRangeVariedParameter |
This method should be overridden in experiments which work with parameters
varied in range
|
void | setupRootParameters |
Setups all parameters of top-level agent
Default implementation works only with range varied parameters Override in subclass if experiment uses freeform parameters or uses range varied parameters and has fixed parameters, in this case overridden method should call super.setupRootParameters(root, index); and then setup
values for fixed parameters
|
void | setUseReplications |
Sets experiment to use replications
This is setup method, user should not call it |
void | setVariableReplicationsNumber |
Sets experiment to stop replications after the minimum replications when
the confidence level is reached (i.e.
|
getEngine, getMutexRead_xjal, getMutexWrite_xjal, getParallelEvaluatorsCount, getRunCount, getSimulationProgress_xjal, getStep, onAfterExperiment, onAfterIteration, onDestroy_xjal, registerExperimentHost_xjal
addExecutionListener, close, createRoot, destroy_xjal, error, errorInModel, getCommandLineArguments, getExperimentHost, getName, getSnapshotFileName, getWindowHeight, getWindowWidth, initDefaultRandomNumberGenerator, internalFillConfig, isCommandEnabled, isLoadRootFromSnapshot, isTestExperiment, onBeforeSimulationRun, onDestroy, onEngineFinished, onError, onError, removeExecutionListener, reset, setCommandLineArguments_xjal, setLoadRootFromSnapshot, setName, setup, setupEngine, warning, warning
addToDate, addToDate, atan2fast, bernoulli, beta, beta, binomial, binomial, briefInfoOn, castNumberTypes, castTypes, castTypesBack, cauchy, chi2, convertMarkupSegmentDescriptors_xjal, copyToClipboard, copyToClipboard, copyToClipboard, createTableElementDatabaseBuilder, createTrajectoryGIS, createURL_xjal, date, dateToTime, day, deleteFrom, difference, difference, differenceInCalendarUnits, differenceInCalendarUnits, differenceInDateUnits, differenceInDateUnits, differenceInDateUnits, differenceInDateUnits, dirToAngle, dropTime, erlang, error, error, error, errorInModel, errorInModel, errorInModel, executeAction, executeExpression, executeExpression, executeStatement, exponential, exponential, findExistingFile, format, format, format, format, format, format, format, formatAmountUnits, formatDayOfWeek, formatFlowRateUnits, formatGeoHeading, formatLatitude, formatLengthUnits, formatLengthUnits, formatLongitude, formatMonth, formatSpeedUnits, formatTimeInterval, gamma, gamma, gammaLog, geometric, getAmPm, getAmPm, getCanonicalPath, getDatabaseConnection, getDateWithTimeNextTo, getDayOfMonth, getDayOfMonth, getDayOfWeek, getDayOfWeek, getDayOfYear, getDefaultRandomGenerator, getDistance, getDistance, getDistanceFromPointToLine, getDistanceFromPointToLineSq, getDistanceFromPointToSegment, getDistanceFromPointToSegment, getDistanceFromPointToSegmentSq, getDistanceFromPointToSegmentSq, getDistanceGIS, getDistanceGIS, getDistanceSq, getDistanceSq, getFullName, getHour, getHour, getHourOfDay, getHourOfDay, getLength, getLength, getLengthSq, getLengthSq, getMillisecond, getMillisecond, getMinute, getMinute, getMonth, getMonth, getName, getNearestPointOnSegment, getNearestPointOnSegment, getPerformanceParallelWorkersCount_xjal, getRandom, getRandom, getResult, getSecond, getSecond, getTime, getTimeoutToNextTime, getYear, getYear, gumbel1, gumbel2, hour, hypergeometric, insertInto, inspectOf, inspectOfLink_xjal, isFinite, isLineIntersectingLine, isLineIntersectingRectangle, isLoggingClassToDB, isLoggingToDB, isPointInsideRay, isPointInsideRectangle, isPointInsideSegment, isPointOnTheSameLine, isRayIntersectingSegment, joinArrays_xjal, laplace, layoutTypeToString, limit, limit, limitMax, limitMax, limitMin, limitMin, logarithmic, logistic, lognormal, logToDB, logToDB, logToDB, logToDB, millisecond, minute, month, negativeBinomial, negativeBinomial, normal, normal, pareto, pert, poisson, poisson, prepareBeforeExperimentStart_xjal, prepareStatement, pulse, pulseTrain, quantum, ramp, randomColor, randomFalse, randomFrom, randomFrom, randomFrom, randomlyCreate, randomlyCreate, randomTrue, randomWhere, randomWhere, rayleigh, roundToDecimal, roundToInt, second, selectAndDoForEach, selectArrayOfDouble, selectArrayOfInt, selectExists, selectExists, selectFirstValue, selectFirstValue, selectFirstValue, selectFirstValue, selectFrom, selectResultSet, selectTableFunction, selectUniqueValue, selectUniqueValue, selectUniqueValue, selectUniqueValue, selectValues, selectValues, setDefaultRandomGenerator, sqlGetObject, sqlGetObject, sqlGetObject, sqlGetObject, sqlSetObject, sqr, step, time, time, timeToDate, toDate, toDate, toDate, toDateInMillis, toLatitude, toLongitude, toModelRate, toModelTime, toRateUnits, toStringAlignedNameValues, toTimeout, toTimeout, toTimeoutInCalendar, toTimeUnits, trace, trace, traceln, traceln, traceln, traceln, traceln, traceToDB, traceToDB, triangular, triangular, triangularAV, uniform, uniform, uniform_discr, uniform_pos, update, week, weibull, weibull, xidz, year, zidz
createElementDescriptors, executeShapeControlAction, executeShapeControlAction, executeShapeControlAction, executeShapeControlAction, executeShapeControlAction, executeShapeControlAction, getElementDesciptors, getElementProperty, getExperiment, getModelElementsShape, getPresentation, getPresentationShape, getShapeControlDefaultValueBoolean, getShapeControlDefaultValueDouble, getShapeControlDefaultValueInt, getShapeControlDefaultValueString, getViewAreas, iconContains, onSelectionChanged_xjal, onShapeClick, onShapeGroupDraw, presentationContains, readCustomData, updateShapeDynamicProperties, writeCustomData
bernoulli, beta, beta, beta, binomial, binomial, binomial, cauchy, cauchy, chi2, chi2, erlang, erlang, exponential, exponential, exponential, exponential, gamma, gamma, gamma, geometric, gumbel1, gumbel2, hypergeometric, laplace, logarithmic, logistic, lognormal, negativeBinomial, negativeBinomial, normal, normal, normal, normal, pareto, pareto, pert, poisson, poisson, random, randomFalse, randomFrom, randomFrom, randomFrom, randomlyCreate, randomlyCreate, randomTrue, randomWhere, randomWhere, rayleigh, rayleigh, shuffle, triangular, triangular, triangular, triangularAV, uniform, uniform, uniform, uniform_discr, uniform_discr, uniform_pos, weibull, weibull, weibull
public ExperimentParamVariation()
public ExperimentParamVariation(boolean allowParallelEvaluations)
Same as
ExperimentParamVariation()
but allows to disable
parallel evaluations on multicore/multiprocessor systems
(which are enabled by default)- Parameters:
allowParallelEvaluations
- iffalse
, the iterations/replications of experiment will be performed sequentially- See Also:
public final double getProgress()
Returns the progress of the experiment: a number between 0 and 1
corresponding to the part of the experiment completed so far (based on
iteration count or time limit), or
-1
if this cannot be calculated.- Overrides:
getProgress
in classExperimentMultipleRuns<ROOT extends Agent>
- Returns:
- the progress of the experiment
public int getCurrentIteration()
Description copied from class:
ExperimentMultipleRuns
Returns the current iteration number (1, 2...)
- Specified by:
getCurrentIteration
in classExperimentMultipleRuns<ROOT extends Agent>
- Returns:
- the current iteration number
public int getNumberOfCompletedIterations()
Description copied from class:
ExperimentMultipleRuns
Returns the number of completed iterations. Use this method to track
the progress in preference to the
ExperimentMultipleRuns.getCurrentIteration()
because of parallel (multi-threaded) implementation.- Overrides:
getNumberOfCompletedIterations
in classExperimentMultipleRuns<ROOT extends Agent>
- Returns:
- the number of completed iterations
public int getCurrentReplication()
Description copied from class:
ExperimentMultipleRuns
Returns the replication number for the current iteration (1, 2...)
Ensure replications are used (
Ensure replications are used (
ExperimentMultipleRuns.isUseReplications()
) before
calling this method- Specified by:
getCurrentReplication
in classExperimentMultipleRuns<ROOT extends Agent>
- Returns:
- the current number of replication
public final boolean isUseReplications()
Description copied from class:
ExperimentMultipleRuns
Returns
true
if experiment uses replications- Specified by:
isUseReplications
in classExperimentMultipleRuns<ROOT extends Agent>
- Returns:
true
if experiment uses replications,false
otherwise
public void setUseReplications(boolean useReplications)
Description copied from class:
ExperimentMultipleRuns
Sets experiment to use replications
This is setup method, user should not call it
This is setup method, user should not call it
public void setFixedReplicationsNumber(int replicationsNumber)
Description copied from class:
ExperimentMultipleRuns
Sets experiment to use a fixed number of replications.
No confidence testing is to be used
For confidence testing use
This is setup method, user should not call it
No confidence testing is to be used
For confidence testing use
ExperimentMultipleRuns.setVariableReplicationsNumber(int, int, ConfidenceLevel, double)
This is setup method, user should not call it
- Specified by:
setFixedReplicationsNumber
in classExperimentMultipleRuns<ROOT extends Agent>
- Parameters:
replicationsNumber
- the number of replications to be run- See Also:
public void setVariableReplicationsNumber(int minimumReplications, int maximumReplications, ExperimentMultipleRuns.ConfidenceLevel confidenceLevel, double errorPercent)
Description copied from class:
ExperimentMultipleRuns
Sets experiment to stop replications after the minimum replications when
This is optimization setup method, user should not call it
- the confidence level is reached (i.e. mean confidence is within the given
percentage
errorPercent
of the value obtained at the last replication) - maximum replications number is reached
ExperimentMultipleRuns.setFixedReplicationsNumber(int)
This is optimization setup method, user should not call it
- Specified by:
setVariableReplicationsNumber
in classExperimentMultipleRuns<ROOT extends Agent>
- Parameters:
minimumReplications
- minimum number of replicationsmaximumReplications
- minimum number of replicationsconfidenceLevel
- one oferrorPercent
- the error percentage as a value > 0 and < 1.- See Also:
public final boolean isLastReplication()
Description copied from class:
ExperimentMultipleRuns
Return
true
if we have run the last replication for the current iteration- Specified by:
isLastReplication
in classExperimentMultipleRuns<ROOT extends Agent>
- Returns:
true
if this is the last replication of the iteration
@AnyLogicInternalCodegenAPI public boolean evaluateStopConditions(ROOT root)
User's extension point for experiment stop conditions
By default returns
By default returns
false
- Returns:
true
if experiment needs to be terminated after current iteration/replication
public int getRangeParametersNumber()
This method should be overridden to return the number of parameters varied
in range in the corresponding experiments
- Returns:
- the number of parameters varied in range
@AnyLogicInternalCodegenAPI public void setupRangeVariedParameter(ROOT root, int paramIndex, int valueIndex, boolean callOnChangeActions)
This method should be overridden in experiments which work with parameters
varied in range
- Parameters:
root
- rootAgent
whose parameter value is being setupparamIndex
- index of parameter (from 0 to
)getRangeParametersNumber()
valueIndex
- index of parameter value (from0
togetRangeParameterValuesNumber(paramIndex) - 1
)callOnChangeActions
- iftrue
this method should useset_*
methods ofroot
to setup parameters, otherwise parameter values should be simply assigned to the fields ofroot
public int getMaximumIterations()
Returns total number of iterations being performed in this experiment
Default implementation works with range varied parameters
Override in subclass if experiment uses free-form parameters
Default implementation works with range varied parameters
Override in subclass if experiment uses free-form parameters
- Specified by:
getMaximumIterations
in classExperimentMultipleRuns<ROOT extends Agent>
- Returns:
- total number of iterations being performed in this experiment
@AnyLogicInternalCodegenAPI public void setupRootParameters(ROOT root, int index, boolean callOnChangeActions)
Setups all parameters of top-level agent
Default implementation works only with range varied parameters
Override in subclass if experiment
Default implementation works only with range varied parameters
Override in subclass if experiment
- uses freeform parameters or
- uses range varied parameters and has fixed parameters, in this case
overridden method should call
super.setupRootParameters(root, index);
and then setup values for fixed parameters
- Parameters:
root
- rootAgent
whose parameters are being setupindex
- iteration number (0-based)callOnChangeActions
- iftrue
this method should useset_*
methods ofroot
to setup parameters, otherwise parameter values should be simply assigned to the fields ofroot
@AnyLogicInternalCodegenAPI public double getValueForConfidenceComputation(ROOT root)
Returns the value used in confidence computation when experiment uses
replications and variable replications number is used
Must be implemented in a subclass in such experiments.
Must be implemented in a subclass in such experiments.
- Parameters:
root
- the top-level agent- Returns:
- the value used in confidence computation
@AnyLogicInternalCodegenAPI public int[] calculateRangeParameterValuesNumbers()
This method should be overridden in experiments which work with parameters
varied in range
This method will be called only one time
This method will be called only one time
- Returns:
- array with dimensions of parameters values ranges