com.xj.anylogic.engine
Class ExperimentCompareRuns<ROOT extends ActiveObject>

java.lang.Object
  extended by com.xj.anylogic.engine.Presentable
      extended by com.xj.anylogic.engine.Utilities
          extended by com.xj.anylogic.engine.Experiment<ROOT>
              extended by com.xj.anylogic.engine.ExperimentCompareRuns<ROOT>
All Implemented Interfaces:
java.io.Serializable

public abstract class ExperimentCompareRuns<ROOT extends ActiveObject>
extends Experiment<ROOT>

Experiment used to run simulation several times with different parameter values set by user before each run.
To use this experiment you need to subclass from it and override method Experiment.onEngineFinished().
This object is only available in the AnyLogic Professional

Author:
XJ Technologies Company Ltd. www.anylogic.com
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.xj.anylogic.engine.Experiment
ERROR, FINISHED, IDLE, modelExecutionCommandQueue, mutexModelActionQueue, OPEN_RESULTS, OPEN_SNAPSHOT, PAUSE, PAUSED, PLEASE_WAIT, RUN, RUNNING, SAVE_RESULTS, SAVE_SNAPSHOT, STEP, STOP
 
Fields inherited from class com.xj.anylogic.engine.Utilities
AM, APRIL, AUGUST, DAY, DECEMBER, FEBRUARY, FRIDAY, HOUR, infinity, JANUARY, JULY, JUNE, MARCH, MAY, MILLISECOND, MINUTE, MONDAY, MONTH, NOVEMBER, OCTOBER, PM, SATURDAY, SECOND, SEPTEMBER, SUNDAY, THURSDAY, TIME_UNIT_DAY, TIME_UNIT_HOUR, TIME_UNIT_MILLISECOND, TIME_UNIT_MINUTE, TIME_UNIT_SECOND, TIME_UNIT_WEEK, TUESDAY, UNDECIMBER, WEDNESDAY, WEEK, YEAR
 
Fields inherited from class com.xj.anylogic.engine.Presentable
ALIGNMENT_CENTER, ALIGNMENT_LEFT, ALIGNMENT_RIGHT, CAD_ANTIALIASING, CAD_INVERTED, LINE_STYLE_DASHED, LINE_STYLE_DOTTED, LINE_STYLE_SOLID, NAVIGATION_FULL, NAVIGATION_LIMITED_TO_Z_ABOVE_ZERO, NAVIGATION_NONE, NAVIGATION_ROTATION_ONLY, SHAPE_ARC, SHAPE_BUTTON, SHAPE_CAD, SHAPE_CHART_BAR, SHAPE_CHART_HISTOGRAM, SHAPE_CHART_HISTOGRAM2D, SHAPE_CHART_PIE, SHAPE_CHART_PLOT, SHAPE_CHART_STACK, SHAPE_CHART_TIME_COLOR, SHAPE_CHART_TIME_PLOT, SHAPE_CHART_TIME_STACK, SHAPE_CHECKBOX, SHAPE_COMBOBOX, SHAPE_CURVE, SHAPE_EMBEDDED_OBJECT, SHAPE_FILECHOOSER, SHAPE_GROUP, SHAPE_IMAGE, SHAPE_LINE, SHAPE_LISTBOX, SHAPE_OVAL, SHAPE_PIXEL, SHAPE_POLYLINE, SHAPE_PROGRESSBAR, SHAPE_RADIOBUTTONS, SHAPE_RECTANGLE, SHAPE_ROUNDED_RECTANGLE, SHAPE_SLIDER, SHAPE_TEXT, SHAPE_TEXTFIELD
 
Constructor Summary
ExperimentCompareRuns()
           
 
Method Summary
 Engine getEngine()
          Returns the engine executing the model.
 double getProgress()
          Returns the progress of the experiment: in this case it is the same as the progress of the current simulation run.
 double getRunTimeSeconds()
          Returns the real duration of the experiment in seconds.
 int getState()
          Returns the current state of the experiment.
 boolean isCommandEnabled(int cmd)
          Checks if a command can be executed.
 void pause()
          Pauses the model execution.
 void registerPresentation_xjal(Presentation presentation)
          This method isn't designed to be called by user.
 void run()
          Runs the model from the current state.
abstract  void setupRootParameters(ROOT root, boolean callOnChangeActions)
          Is called to setup parameters of root active object.
 void step()
          Performs one step of the model execution.
 void stop()
          Terminates the model execution, destroys and forgets the model and calls garbage collector, but keeps all experiment data.
 
Methods inherited from class com.xj.anylogic.engine.Experiment
close, createRoot, error, getCommandLineArguments, getMutexRead_xjal, getMutexWrite_xjal, getName, getPresentation, getRunCount, getSnapshotFileName, getStep, getWindowHeight, getWindowWidth, initDefaultRandomNumberGenerator, isLoadRootFromSnapshot, onBeforeSimulationRun, onDestroy_xjal, onDestroy, onEngineFinished, onError, reset, setCommandLineArguments_xjal, setLoadRootFromSnapshot, setName, setup, setupEngine
 
Methods inherited from class com.xj.anylogic.engine.Utilities
bernoulli, bernoulli, beta, beta, beta, beta, beta, binomial, binomial, binomial, binomial, binomial, briefInfoOn, cauchy, cauchy, cauchy, chi2, chi2, chi2, copyToClipboard, createURL_xjal, date, dateToTime, day, difference, difference, differenceInDateUnits, differenceInDateUnits, dropTime, erlang, erlang, erlang, error, exponential, exponential, exponential, exponential, exponential, exponential, format, format, format, format, format, format, formatDayOfWeek, formatGeoHeading, formatLatitude, formatLongitude, formatMonth, formatTimeInterval, gamma_frac, gamma, gamma, gamma, gamma, gamma, gammaLog, geometric, geometric, getAmPm, getAmPm, getDayOfMonth, getDayOfMonth, getDayOfWeek, getDayOfWeek, getDayOfYear, getDefaultRandomGenerator, getDistance, getDistance, getDistanceFromPointToLine, getDistanceFromPointToLineSq, getDistanceFromPointToSegment, getDistanceFromPointToSegmentSq, getDistanceSq, getDistanceSq, getHour, getHour, getHourOfDay, getHourOfDay, getLength, getLength, getMillisecond, getMillisecond, getMinute, getMinute, getMonth, getMonth, getRandom, getRandom, getSecond, getSecond, getTime, getYear, getYear, gumbel1, gumbel1, gumbel2, gumbel2, hour, hypergeometric, hypergeometric, inspectOf, isLineIntersectingLine, isLineIntersectingRectangle, isPointInsideRectangle, isPointOnTheSameLine, laplace, laplace, limit, limitMax, limitMin, logarithmic, logarithmic, logistic, logistic, lognormal, lognormal, millisecond, minute, negativeBinomial, negativeBinomial, negativeBinomial, negativeBinomial, normal, normal, normal, normal, normal, normal, pareto, pareto, pareto, pert, pert, poisson, poisson, poisson, poisson, prepareBeforeExperimentStart_xjal, pulse, pulseTrain, quantum, ramp, randomFalse, randomFalse, randomTrue, randomTrue, rayleigh, rayleigh, rayleigh, second, setDefaultRandomGenerator, sqr, step, time, timeToDate, toDate, toDateInMillis, toLatitude, toLongitude, toTimeout, trace, traceln, traceln, traceln, triangular, triangular, triangular, triangular, triangular, uniform_discr, uniform_discr, uniform_discr, uniform_pos, uniform_pos, uniform, uniform, uniform, uniform, uniform, week, weibull, weibull, weibull, weibull, weibull, xidz, zidz
 
Methods inherited from class com.xj.anylogic.engine.Presentable
contains, drawCollection, drawDatabase, drawDataset, drawExcelFile, drawFunction, drawHistogram2DData, drawHistogramData, drawInsert, drawKeyValueTable, drawModel, drawModelElements, drawPlainVariable, drawPresentation, drawQuery, drawSchedule, drawShape, drawStatistics, drawTableFunction, drawTextFile, drawUpdate, executeShapeControlAction, executeShapeControlAction, executeShapeControlAction, executeShapeControlAction, executeShapeControlAction, executeShapeControlAction, finishReadObject_xjal, getExperiment, getNameOfShape, getPersistentShape, getShapeArcAngle, getShapeArcAngle, getShapeArcStartAngle, getShapeArcStartAngle, getShapeCADCustomLayerColors, getShapeCADDrawingAttributes, getShapeCADDrawingAttributes, getShapeCADFileName, getShapeCADFileName, getShapeCADVisibleLayerNames, getShapeChartColorFromDouble, getShapeChartDataColors, getShapeChartDataItems, getShapeChartDataPlotOptions, getShapeChartDataSets, getShapeChartDataTitles, getShapeChartHistogram2DOptions, getShapeChartHistogramOptions, getShapeChartHistograms, getShapeChartHistograms2D, getShapeChartProperties, getShapeControl, getShapeControl, getShapeControlDefaultValueBoolean, getShapeControlDefaultValueBoolean, getShapeControlDefaultValueDouble, getShapeControlDefaultValueDouble, getShapeControlDefaultValueInt, getShapeControlDefaultValueInt, getShapeControlDefaultValueString, getShapeControlDefaultValueString, getShapeControlManager, getShapeControlMaximum, getShapeControlMaximum, getShapeControlMinimum, getShapeControlMinimum, getShapeControlMultipleSelectionMode, getShapeControlMultipleSelectionMode, getShapeControlProgressString, getShapeControlProgressString, getShapeControlTexts, getShapeControlTexts, getShapeControlTexts2D, getShapeControlTexts2D, getShapeControlType, getShapeControlType, getShapeControlValueType, getShapeControlValueType, getShapeEmbeddedObject, getShapeEmbeddedObject, getShapeFillColor, getShapeFillColor, getShapeFont, getShapeFont, getShapeGroupContent, getShapeHeight, getShapeHeight, getShapeImageFileNames, getShapeImageFileNames, getShapeImageNumber, getShapeImageNumber, getShapeLineColor, getShapeLineColor, getShapeLineDx, getShapeLineDx, getShapeLineDy, getShapeLineDy, getShapeLineStyle, getShapeLineStyle, getShapeLineWidth, getShapeLineWidth, getShapeNPoints, getShapeNPoints, getShapePackagePrefix, getShapePointsDx, getShapePointsDx, getShapePointsDy, getShapePointsDy, getShapeRadiusX, getShapeRadiusX, getShapeRadiusY, getShapeRadiusY, getShapeReplication, getShapeRotation, getShapeRotation, getShapeScaleX, getShapeScaleX, getShapeScaleY, getShapeScaleY, getShapeText, getShapeText, getShapeTextAlignment, getShapeTextAlignment, getShapeType, getShapeWidth, getShapeWidth, getShapeX, getShapeX, getShapeY, getShapeY, getViewAreas, iconContains, isShapeCADNegative, isShapeCADNegative, isShapeClosed, isShapeClosed, isShapeControlEnabled, isShapeControlEnabled, isShapeControlVertical, isShapeControlVertical, isShapePublic, isShapeVisible, isShapeWithManualControlPoints, isShapeWithManualControlPoints, modelElementContains, modelElementContains, onClickIconAt, onClickModelAt, onClickPresentationAt, onItemRemoved, onSelectionChanged, onShapeClick, onShapeClickAt, onShapeGroupDraw, presentationContains, readCustomData, setControlValueToDefault, setControlValueToDefault, writeCustomData
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExperimentCompareRuns

public ExperimentCompareRuns()
Method Detail

getProgress

public final double getProgress()
Returns the progress of the experiment: in this case it is the same as the progress of the current simulation run.

Returns:
the progress of the experiment

isCommandEnabled

public boolean isCommandEnabled(int cmd)
Description copied from class: Experiment
Checks if a command can be executed. The possible command ids are: OPEN_RESULTS, SAVE_RESULTS, OPEN_SNAPSHOT, SAVE_SNAPSHOT, RUN, STEP PAUSE, STOP.

Overrides:
isCommandEnabled in class Experiment<ROOT extends ActiveObject>
Parameters:
cmd - the command id
Returns:
true if the command can be executed, false otherwise

setupRootParameters

public abstract void setupRootParameters(ROOT root,
                                         boolean callOnChangeActions)
Is called to setup parameters of root active object. This method must be defined in a subclass.

Parameters:
root - the root active object instance
callOnChangeActions - if true this method should use set_* methods of root to setup parameters, otherwise parameter values should be simply assigned to the fields of root

getEngine

public Engine getEngine()
Returns the engine executing the model.

Specified by:
getEngine in class Presentable
Returns:
the engine executing the model

getState

public final int getState()
Returns the current state of the experiment. Possible states are: IDLE, RUNNING, PAUSED, FINISHED, ERROR, and PLEASE_WAIT

Specified by:
getState in class Experiment<ROOT extends ActiveObject>
Returns:
the current state of the experiment

getRunTimeSeconds

public final double getRunTimeSeconds()
Returns the real duration of the experiment in seconds.
This includes simulation run time and excludes pause times.

Specified by:
getRunTimeSeconds in class Experiment<ROOT extends ActiveObject>
Returns:
the real duration of the experiment in seconds

run

public final void run()
Runs the model from the current state. If model is not yet existing, resets the experiment, creates and starts the model.

Specified by:
run in class Experiment<ROOT extends ActiveObject>

step

public final void step()
Performs one step of the model execution. If model is not yet existing, resets the experiment, creates and starts the model (not making a step).

Specified by:
step in class Experiment<ROOT extends ActiveObject>

pause

public final void pause()
Pauses the model execution.
This method has different behavior depending on context where it is called:

Specified by:
pause in class Experiment<ROOT extends ActiveObject>

stop

public final void stop()
Terminates the model execution, destroys and forgets the model and calls garbage collector, but keeps all experiment data.
This method has different behavior depending on context where it is called:

Specified by:
stop in class Experiment<ROOT extends ActiveObject>

registerPresentation_xjal

public void registerPresentation_xjal(Presentation presentation)
Description copied from class: Experiment
This method isn't designed to be called by user.
Public due to technical reasons
May be removed in future releases

Overrides:
registerPresentation_xjal in class Experiment<ROOT extends ActiveObject>


Copyright © 1991-2008 XJ Technlogies. All Rights Reserved.