Package com.anylogic.engine
- Field Summary
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- addPreConstraint
- addObjective
- addParameter
- addPostConstraint
- addSuggestedSolution
- continueOptimization
- Evaluate
- getBestIteration
- getBestObjectiveValue
- getBestParam
- getBestParamValue
- getBestReplicationsNumber
- getCurrentIteration
- getCurrentObjectiveValue
- getCurrentParam
- getCurrentParamValue
- getCurrentReplication
- getMaximumIterations
- getNumberOfCompletedIterations
- getSelectedNthBestIteration
- getSelectedNthBestObjectiveValue
- getSelectedNthBestParam
- getSelectedNthBestParamValue
- getSelectedNthBestReplicationsNumber
- isBestSolutionFeasible
- isCurrentSolutionFeasible
- isLastReplication
- isSelectedNthBestSolutionFeasible
- isStarted
- isUseReplications
- MonitorStatus
- performParallel
- performSerial
- prepareRestart
- selectNthBestSolution
- setAutoStop
- setCurrentObjectiveValue
- setCurrentPostConstraintValue
- setExperiment
- setFixedReplicationsNumber
- setMaximumIterations
- setParameterSuggestedValue
- setUserControlledStop
- setUseReplications
- stopOptimization
- setPostConstraint
- setPreConstraint
- setVariableReplicationsNumber
- validateInput
- createObjective
- createContinuousVariable
- createDiscreteVariable
- createBooleanVariable
- createPostConstraint
- createPreConstraint
- setCurrentPreConstraintValue
- java.lang.Object
- com.opttek.optquest.COptQuestOptimization
- com.anylogic.engine.OptQuestOptimization
- All Implemented Interfaces:
IOptimization
public class OptQuestOptimization extends com.opttek.optquest.COptQuestOptimization implements IOptimization
A wrapper class for COptQuestOptimization. Sets the OptQuest license, and
defines two methods: Evaluate and MonitorStatus so that they call
experiment's evaluate() and monitor() correspondingly. Also takes care of
stopping the optimization if interrupted flag was set.
DEMOLICENSE, OCLP_COEFFOFSEMI1VAR, OCLP_COEFFOFSEMI2VAR, OCLP_COEFFOFVAR, OCLP_IRR, OCLP_MAX, OCLP_MEAN, OCLP_MEDIAN, OCLP_MIN, OCLP_NONE, OCLP_NPV, OCLP_PBP, OCLP_PERCENTILE, OCLP_PROBABILITY, OCLP_SEMI1STDDEV, OCLP_SEMI1VARIANCE, OCLP_SEMI2STDDEV, OCLP_SEMI2VARIANCE, OCLP_STDDEV, OCLP_VARIANCE, REPLTERM_MAXREPLICATIONS, REPLTERM_METCONFIDENCE, REPLTERM_NEEDMORE, REPLTERM_NOTNEARBEST, REPLTERM_REMOVEBYRAS, REPLTERM_STILLINRAS, TERM_AUTOSTOP, TERM_BESTFOUND, TERM_CANNOTGENERATE, TERM_EXCEPTION, TERM_FACTORIESDONE, TERM_INFEASIBLE, TERM_LP, TERM_MAXITERATIONS, TERM_MAXTIME, TERM_NOTSTARTED, TERM_OPTIMALFOUND, TERM_RUNNING, TERM_USERSTOPPED
Constructor | Description |
---|---|
OptQuestOptimization() |
AddAdditionalReplicationsSolution, AddConstraint, AddConstraint, AddConstraint, AddDiscountRate, AddObjective, AddObjectiveFunction, AddPermutationGroup, AddPredictor, AddRankAndSelectionSolution, AddRequirement, AddRequirement, AddSelectionGroup, AddSuggestedSolution, AddVariable, ChangeVariableConstraint, CheckOptimization, CloseLogSetupFile, CloseSolutionLog, ContinueOptimize, CreateSolution, CreateSolutionSet, EfficientFrontier, EvaluateComplete, GetApproxSolutionSize, GetAutoStopCycles, GetAutoStopNumberSolutions, GetAutoStopPercentImprove, GetBestSolution, GetCheckDup, GetElapsedTime, GetEndingVarPrecision, GetEvaluateException, GetGradientAnalysis, GetIterationSolution, GetMaximumIterations, GetMaximumReplications, GetMaximumTime, GetMinimumReplications, GetName, GetNthBestSolution, GetNthEfficientFrontier, GetNumberEfficientFrontier, GetNumberofCompletedIterations, GetNumberOfFeasibleSolutions, GetNumberOfInfeasibleSolutions, GetNumberOfStringConstraints, GetObjective, GetObjPrecision, GetPatternFrontier, GetPatternFrontier, GetRegressionAnalysis, GetRejectNonLinear, GetRequirement, GetStartingVarPrecision, GetStringConstraint, GetTerminationReason, GetTerminationReasonString, GetUseCrossEntropy, GetUseInfeasibilityIndex, GetUserControlledStop, GetUserControlledVariableConstraint, GetUseReplications, GetVariable, GetVariables, GetVersion, IsAdditionalReplicationsMode, IsAutoStopByCycles, IsAutoStopByPercentImprovement, IsEnumerable, IsNthEfficientFrontierFeasible, IsRankAndSelectionMode, IsRunRepeatableEvaluation, IsStopped, LogSetup, LogSolutions, Optimize, OptimizeAdditional, RankAndSelect, Recalculate, RemoveConstraint, RemoveConstraint, RemoveRequirement, RunRepeatableEvaluations, SearchRestart, SetAdditionalIterations, SetAdditionalReplications, SetAdditionalReplicationsSolutions, SetAdditionalTime, SetAutoStopByCycles, SetAutoStopByPercentImprovement, SetAutoStopCycles, SetAutoStopNumberSolutions, SetAutoStopPercentImprove, SetCannotGenerateAsTermReason, SetCheckDup, SetDOEType, SetEndingVarPrecision, SetEvaluate, SetGradientAnalysis, SetLicenseID, SetMaximumIterations, SetMaximumReplications, SetMaximumTime, SetMetaHeuristic, SetMinimumReplications, SetName, SetObjPrecision, SetRandomSeed, SetRankAndSelectionCorrectProbability, SetRankAndSelectionIndifferenceZone, SetRankAndSelectionSolutions, SetRegressionAnalysis, SetRejectNonLinear, SetStartingVarPrecision, SetUseCrossEntropy, SetUseDOE, SetUseInfeasibilityIndex, SetUseMinimizeError, SetUseNeuralNetworkGenerator, SetUsePortfolioAlgorithms, SetUserControlledStop, SetUserControlledVariableConstraint, SetUseReplications, StopOnSuccessfulMILP, StopOptimization, UseEnglishOnly
public OptQuestOptimization()
public void addPreConstraint(IPreConstraint constraint)
- Specified by:
addPreConstraint
in interfaceIOptimization
public void addObjective(IObjective objective)
- Specified by:
addObjective
in interfaceIOptimization
public void addParameter(IVariable variable)
- Specified by:
addParameter
in interfaceIOptimization
public void addPostConstraint(IPostConstraint requirement)
- Specified by:
addPostConstraint
in interfaceIOptimization
public void addSuggestedSolution()
- Specified by:
addSuggestedSolution
in interfaceIOptimization
public void continueOptimization()
- Specified by:
continueOptimization
in interfaceIOptimization
public void Evaluate(com.opttek.optquest.COptQuestSolution solution) throws com.opttek.optquest.COptQuestException
- Overrides:
Evaluate
in classcom.opttek.optquest.COptQuestOptimization
- Throws:
com.opttek.optquest.COptQuestException
public int getBestIteration()
- Specified by:
getBestIteration
in interfaceIOptimization
public double getBestObjectiveValue()
- Specified by:
getBestObjectiveValue
in interfaceIOptimization
public Object getBestParam(IVariable variable)
- Specified by:
getBestParam
in interfaceIOptimization
public double getBestParamValue(IVariable variable)
- Specified by:
getBestParamValue
in interfaceIOptimization
public int getBestReplicationsNumber()
- Specified by:
getBestReplicationsNumber
in interfaceIOptimization
public int getCurrentIteration()
- Specified by:
getCurrentIteration
in interfaceIOptimization
public double getCurrentObjectiveValue()
- Specified by:
getCurrentObjectiveValue
in interfaceIOptimization
public Object getCurrentParam(IVariable variable)
- Specified by:
getCurrentParam
in interfaceIOptimization
public double getCurrentParamValue(IVariable variable)
- Specified by:
getCurrentParamValue
in interfaceIOptimization
public int getCurrentReplication()
- Specified by:
getCurrentReplication
in interfaceIOptimization
public int getMaximumIterations()
- Specified by:
getMaximumIterations
in interfaceIOptimization
public int getNumberOfCompletedIterations()
- Specified by:
getNumberOfCompletedIterations
in interfaceIOptimization
@Deprecated public int getSelectedNthBestIteration()
Deprecated.
@Deprecated public double getSelectedNthBestObjectiveValue()
Deprecated.
@Deprecated public Object getSelectedNthBestParam(IVariable variable)
Deprecated.
@Deprecated public double getSelectedNthBestParamValue(IVariable variable)
Deprecated.
@Deprecated public int getSelectedNthBestReplicationsNumber()
Deprecated.
public boolean isBestSolutionFeasible()
- Specified by:
isBestSolutionFeasible
in interfaceIOptimization
public boolean isCurrentSolutionFeasible()
- Specified by:
isCurrentSolutionFeasible
in interfaceIOptimization
public boolean isLastReplication()
- Specified by:
isLastReplication
in interfaceIOptimization
public boolean isSelectedNthBestSolutionFeasible()
public boolean isStarted()
- Specified by:
isStarted
in interfaceIOptimization
public final boolean isUseReplications()
public void MonitorStatus(com.opttek.optquest.COptQuestSolution sol) throws com.opttek.optquest.COptQuestException
- Overrides:
MonitorStatus
in classcom.opttek.optquest.COptQuestOptimization
- Throws:
com.opttek.optquest.COptQuestException
public Throwable performParallel(boolean restart)
- Specified by:
performParallel
in interfaceIOptimization
public Throwable performSerial(boolean restart)
- Specified by:
performSerial
in interfaceIOptimization
public void prepareRestart()
- Specified by:
prepareRestart
in interfaceIOptimization
@Deprecated public void selectNthBestSolution(int bestSolutionIndex)
Deprecated.
public void setAutoStop(boolean stop)
- Specified by:
setAutoStop
in interfaceIOptimization
public void setCurrentObjectiveValue(IObjective objective, double value)
- Specified by:
setCurrentObjectiveValue
in interfaceIOptimization
public void setCurrentPostConstraintValue(IPostConstraint requirement, double value)
- Specified by:
setCurrentPostConstraintValue
in interfaceIOptimization
public void setExperiment(ExperimentOptimization<?> experiment)
- Specified by:
setExperiment
in interfaceIOptimization
public void setFixedReplicationsNumber(int replicationsNumber)
- Specified by:
setFixedReplicationsNumber
in interfaceIOptimization
public void setMaximumIterations(int numberOfIterations)
- Specified by:
setMaximumIterations
in interfaceIOptimization
public void setParameterSuggestedValue(IVariable variable, Object value)
- Specified by:
setParameterSuggestedValue
in interfaceIOptimization
public void setUserControlledStop(boolean stop)
- Specified by:
setUserControlledStop
in interfaceIOptimization
public void setUseReplications(boolean useReplications)
public void stopOptimization()
- Specified by:
stopOptimization
in interfaceIOptimization
public void setPostConstraint(IPostConstraint requirement, double bound, ConstraintTypeEnum type)
- Specified by:
setPostConstraint
in interfaceIOptimization
public void setPreConstraint(IPreConstraint constraint, double bound, ConstraintTypeEnum type, String expression)
- Specified by:
setPreConstraint
in interfaceIOptimization
public void setVariableReplicationsNumber(int minimumReplications, int maximumReplications, ExperimentMultipleRuns.ConfidenceLevel confidenceLevel, double errorPercent)
public void validateInput()
- Specified by:
validateInput
in interfaceIOptimization
public IObjective createObjective()
- Specified by:
createObjective
in interfaceIOptimization
public IContinuousVariable createContinuousVariable()
- Specified by:
createContinuousVariable
in interfaceIOptimization
public IDiscreteVariable createDiscreteVariable()
- Specified by:
createDiscreteVariable
in interfaceIOptimization
public IBinaryVariable createBooleanVariable()
- Specified by:
createBooleanVariable
in interfaceIOptimization
public IPostConstraint createPostConstraint()
- Specified by:
createPostConstraint
in interfaceIOptimization
public IPreConstraint createPreConstraint()
- Specified by:
createPreConstraint
in interfaceIOptimization
public void setCurrentPreConstraintValue(IPreConstraint constraint, double value)
- Specified by:
setCurrentPreConstraintValue
in interfaceIOptimization