Class COptQuestException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.opttek.optquest.COptQuestException
All Implemented Interfaces:
Serializable

public class COptQuestException extends Exception
Exceptions thrown by the OptQuest Engine. A COptQuestException contains the following information
  • The exception error code
  • A reason code which gives more detailed information about the exception code.
  • An error token. If the exception was related to user input, the error token will identify the location of the error within the user string.
  • An error string which may give additonal information on the error. This is primarily used for EXCEPT_INTENAL exceptions.
Error Codes:
EXCEPT_CONSTRAINTINFEASIBLE = -1201
Constraints are infeasible.
EXCEPT_NONLINEAR_CONSTRAINTINFEASIBLE = -1201
Nonlinear constraints of input variables are infeasible.
EXCEPT_EXCLUSIVERANGEINFEASIBLE = -1202
Problem is infeasible because of exclusive ranges.
EXCEPT_CONSTRAINTDOESNOTEXIST = -1203
The constraint does not exist in the current optimization.
EXCEPT_BADLICENSE= -5000
Wrong license number
EXCEPT_INTERNAL=-10000
Internal OptQuest Error
EXCEPT_STACK=-11001
A stack error has occurred in the solving of an equation.
EXCEPT_NOPERMINCONS=-11020
Permutation variables cannot be used in constraints.
EXCEPT_FIXEDBOUNDS=-11021
Variable bounds cannot be changed.
EXCEPT_FIXEDSTEPSIZE=-11022
Variable step size cannot be changed.
EXCEPT_NOUSERINCONS=-11023
User controlled variables cannot be used in constraints.
EXCEPT_NOENUMERATIONINCONS=-11024
Enumeration variables cannot be used in constraints.
EXCEPT_NODESIGNINCONS=-11025
Design variables cannot be used in constraints.
EXCEPT_OBJECTIVEEQUATIONSET=-11042
Only one objective function can be defined. An objective function equation has already been defined.
EXCEPT_OBJECTIVEOBJECTSET=-11044
Only one objective can be defined. You cannot add COptQuestObjective object to the optimization and use this method.
EXCEPT_OBJECTIVENOTFOUND=-11045
The objective could not be found.
EXCEPT_FRONTIEROBJECTIVE=-11046
A COptQuestFrontierMultiObjective must have at least 2 objectives added to it.
EXCEPT_BADSEARCHPARAM = -11051
Search parameter incorrect.
EXCEPT_NOOVEQUATION=-11060
Error defining objective equation. Equation string is empty.
EXCEPT_NOCONEQUATION=-11061
Error defining constraint equation. Equation string is empty.
EXCEPT_BADOVEQUATION=-11063
Error in objective function equation.
EXCEPT_BADCONEQUATION=-11064
Error in constraint equation.
EXCEPT_CANNOTCHANGECONSTRAINTLINEARITY = -11066
The linearity of a constraint cannot be changed (i.e. linear to non-linear)
EXCEPT_BADDSUGGESTEDSOLUTION = -11070
Error in suggested solution. Decision variables were added after the suggested solution was added.
EXCEPT_NODECISIONVARIABLES = -11071
The optimization problem has no decision variables.
EXCEPT_ADDDECISIONVARIABLE = -11072
Decision variables must be added before calling the Optimize() or OptimizeAdditional() method.
EXCEPT_ADDREQUIREMENT = -11073
Requirements must be added before calling the Optimize() method.
EXCEPT_ADDTOOPT = -11074
Object must be added to COptQuestOptimization object before calling CheckExpression().
EXCEPT_REQUIREMENTDOESNOTEXIST = -11075
The requirement does not exist in the current optimization.
EXCEPT_DUPLICATEVARIABLENAMES=-11081
A variable name has been duplicated.
EXCEPT_VARIABLEISFUNCTION=-11083
The variable name is a reserved function name.
EXCEPT_BADPERIOD=-11085
Period does not fall between 1 and number of periods (inclusive).
EXCEPT_DISCOUNTRATESET=-11086
Discount Rate has already been set.
EXCEPT_BADOBSERVATIONNUMBER=-11087
Bad observation number.
EXCEPT_BADVARUPPERBOUND= -11088
Upper bound is smaller than lower bound.
EXCEPT_DISCOUNTRATEOBSERR=-11089
The discount rate must be a constant or define observations by period.
EXCEPT_NOTUSERCONSTROLLED=-11091
Variable Requirements are not user controlled.
EXCEPT_NOTREPLICATING=-11092
Replications are not being used.
EXCEPT_VARIABLENUMERIC = -11093
The variable name cannot start with a number.
EXCEPT_NOENUMERATIONVALUES = -11094
The enumeration variables has no values set.
EXCEPT_BADPARALLELID=-11100;
The number of parallel evaluators or parallel id is invalid.
EXCEPT_CANNOTREDUCEEVALUATORS = -11103
The number of parallel evaluators cannot be reduced.
EXCEPT_DUPLICATEGROUP=-11300
Permutation Variables can belong to only one group.
EXCEPT_SOLUTIONNOTEVALUATED=-11400
Solution has not been evaluated.
EXCEPT_EVALUATE=-12000
Error in Evaluation.
EXCEPT_BADSOLID=-12001
The solution identifier is invalid.
EXCEPT_STEPSIZEISZERO=-13000
Step value must be greater than zero.
EXCEPT_STEPSIZERANGE =-13001
Step value is larger than variable range.
EXCEPT_BADOBSCOUNT = -13100
All projects/periods must have the same number of observations.
EXCEPT_NOPERIODS = -13101
You need to define periods for the measure being used.
EXCEPT_BADSTATISTIC = -13102
Bad statistic or statistic value.
EXCEPT_BADMEASURE = -13103
Bad measure value.
EXCEPT_MULTIOBJECTIVEINCOMPATIBILITY = -16000
Method is not compatible with multi-objective optimization.
EXCEPT_FRONTIEROBJECTIVEINCOMPATIBILITY = - 16001
Method is not compatible with COptQuestFrontierMultiObjective optimization.
EXCEPT_NOPROJECTS = -13104
No project variables are defined.
EXCEPT_MIXEDOBSERVATIONS = -13105
Problem contains both observations by project and observations by period.
EXCEPT_ILLEGALMETHOD = -13106
The method is illegal for the object.
EXCEPT_BADSOLUTION = -13107
The solution violates one or more of the variables, bounds, step size or exclusive range.
EXCEPT_CANNOTGENERATE = -14000
New (different) solutions cannot be generated.
EXCEPT_CANNOTENUMERATE = -14001
Cannot enumerate. Please use different meta-heuristic.
EXCEPT_CANNOTPSO = -14002
Optimization problem cannot use Particle Swarm Optimization.
EXCEPT_BADCONFIDENCETYPE = -15000
"Bad value for replication confidence type.
EXCEPT_BADCONFIDENCELEVEL = -15001
Bad value for replication confidence level.
EXCEPT_BADCONFIDENCEERRPCT = -15002
Bad value for the replication confidence error percent.
EXCEPT_BADREPLICATIONMINIMUM = -15003
Bad value for minimum replications.
EXCEPT_BADREPLICATIONMAXIMUM = -15004
Bad value for maximum replications.
EXCEPT_BADADDITIONALREPLICATIONS = -15005
The number of additional replications has not been set.
EXCEPT_BADCONFIDENCESTATISTIC = -15007
When using replication confidence, the objective or requirement statistic must be the mean.
EXCEPT_NO_CONFIDENCE_SETTINGS = -15008
You have requested confidence width on an objective or requirement that does not have confidence settings.
EXCEPT_NESTED_STATISTIC = -15009
You have defined a statistic on a COptQuestStringObjective and the expression contains a COptQuestUserControlledVariable that also contains a statistic.
EXCEPT_BAD_REPLICATION_BATCHSIZE = -15010
The replication batch size mut be >= 1.
EXCEPT_BAD_PERCENTILE = -15011
The percentile must be a value between 0.0 and 1.0.
EXCEPT_NOITERATIONS = -15100
To run OptimizeAdditional() you need to specify more iterations.
EXCEPT_ITERATIONS = -15200
The number of iterations allowed with the demo license has been reached.
EXCEPT_NOSOLUTIONSINSET = -15300
The COptQuestSolutionSet has no solutions.
Reason Codes:
REASON_NONE = 0
"No reason code."
REASON_NOEQUATION = 1
No equation string defined.
REASON_EQMISSINGOP = 2
An operator may be missing.
REASON_EQMISSINGPARAMS = 3
Missing function parameters.
REASON_EQMISSINGSTARTPAREN = 4
Missing starting paren after a function name.
REASON_EQMISSINGCLOSEPAREN = 5
Missing closing paren after a function name.
REASON_EQNOTAVARIABLE = 6
The variable was not found.
REASON_EQINCOMPLETE = 7
Incomplete equation.
REASON_EQMISSINGBRACE = 8
Missing closing bracket or brace.
REASON_EQMISSINGLHS = 9
Cannot find an expression before the comparison operator.
REASON_EQMISSINGRHS = 10
Cannot find an expression after the comparison operator.
REASON_EQMISSINGCOMPOP = 11
Cannot find the comparison operator.
REASON_EQPARENERR = 15
Missing closing paren.
REASON_EQVARIABLEBOUND = 16
Error in constraint variable bound.
REASON_EQNUMBERERR = 17
Number expected but not found.
See Also:
  • Field Details

    • EXCEPT_CONSTRAINTINFEASIBLE

      public static final int EXCEPT_CONSTRAINTINFEASIBLE
      See Also:
    • EXCEPT_NONLINEAR_CONSTRAINTINFEASIBLE

      public static final int EXCEPT_NONLINEAR_CONSTRAINTINFEASIBLE
      See Also:
    • EXCEPT_EXCLUSIVERANGEINFEASIBLE

      public static final int EXCEPT_EXCLUSIVERANGEINFEASIBLE
      See Also:
    • EXCEPT_CONSTRAINTDOESNOTEXIST

      public static final int EXCEPT_CONSTRAINTDOESNOTEXIST
      See Also:
    • EXCEPT_BADLICENSE

      public static final int EXCEPT_BADLICENSE
      See Also:
    • EXCEPT_INTERNAL

      public static final int EXCEPT_INTERNAL
      See Also:
    • EXCEPT_STACK

      public static final int EXCEPT_STACK
      See Also:
    • EXCEPT_NOPERMINCONS

      public static final int EXCEPT_NOPERMINCONS
      See Also:
    • EXCEPT_FIXEDBOUNDS

      public static final int EXCEPT_FIXEDBOUNDS
      See Also:
    • EXCEPT_FIXEDSTEPSIZE

      public static final int EXCEPT_FIXEDSTEPSIZE
      See Also:
    • EXCEPT_NOUSERINCONS

      public static final int EXCEPT_NOUSERINCONS
      See Also:
    • EXCEPT_NODESIGNINCONS

      public static final int EXCEPT_NODESIGNINCONS
      See Also:
    • EXCEPT_OBJECTIVEEQUATIONSET

      public static final int EXCEPT_OBJECTIVEEQUATIONSET
      See Also:
    • EXCEPT_OBJECTIVEOBJECTSET

      public static final int EXCEPT_OBJECTIVEOBJECTSET
      See Also:
    • EXCEPT_OBJECTIVENOTFOUND

      public static final int EXCEPT_OBJECTIVENOTFOUND
      See Also:
    • EXCEPT_FRONTIEROBJECTIVE

      public static final int EXCEPT_FRONTIEROBJECTIVE
      See Also:
    • EXCEPT_BADSEARCHPARAM

      public static final int EXCEPT_BADSEARCHPARAM
      See Also:
    • EXCEPT_NOOVEQUATION

      public static final int EXCEPT_NOOVEQUATION
      See Also:
    • EXCEPT_NOCONEQUATION

      public static final int EXCEPT_NOCONEQUATION
      See Also:
    • EXCEPT_BADOVEQUATION

      public static final int EXCEPT_BADOVEQUATION
      See Also:
    • EXCEPT_BADCONEQUATION

      public static final int EXCEPT_BADCONEQUATION
      See Also:
    • EXCEPT_CANNOTCHANGECONSTRAINTLINEARITY

      public static final int EXCEPT_CANNOTCHANGECONSTRAINTLINEARITY
      See Also:
    • EXCEPT_BADDSUGGESTEDSOLUTION

      public static final int EXCEPT_BADDSUGGESTEDSOLUTION
      See Also:
    • EXCEPT_NODECISIONVARIABLES

      public static final int EXCEPT_NODECISIONVARIABLES
      See Also:
    • EXCEPT_ADDDECISIONVARIABLE

      public static final int EXCEPT_ADDDECISIONVARIABLE
      See Also:
    • EXCEPT_ADDREQUIREMENT

      public static final int EXCEPT_ADDREQUIREMENT
      See Also:
    • EXCEPT_ADDTOOPT

      public static final int EXCEPT_ADDTOOPT
      See Also:
    • EXCEPT_REQUIREMENTDOESNOTEXIST

      public static final int EXCEPT_REQUIREMENTDOESNOTEXIST
      See Also:
    • EXCEPT_DUPLICATEVARIABLENAMES

      public static final int EXCEPT_DUPLICATEVARIABLENAMES
      See Also:
    • EXCEPT_VARIABLEISFUNCTION

      public static final int EXCEPT_VARIABLEISFUNCTION
      See Also:
    • EXCEPT_BADPERIOD

      public static final int EXCEPT_BADPERIOD
      See Also:
    • EXCEPT_DISCOUNTRATESET

      public static final int EXCEPT_DISCOUNTRATESET
      See Also:
    • EXCEPT_BADOBSERVATIONNUMBER

      public static final int EXCEPT_BADOBSERVATIONNUMBER
      See Also:
    • EXCEPT_BADVARUPPERBOUND

      public static final int EXCEPT_BADVARUPPERBOUND
      See Also:
    • EXCEPT_DISCOUNTRATEOBSERR

      public static final int EXCEPT_DISCOUNTRATEOBSERR
      See Also:
    • EXCEPT_NOTUSERCONSTROLLED

      public static final int EXCEPT_NOTUSERCONSTROLLED
      See Also:
    • EXCEPT_NOTREPLICATING

      public static final int EXCEPT_NOTREPLICATING
      See Also:
    • EXCEPT_VARIABLENUMERIC

      public static final int EXCEPT_VARIABLENUMERIC
      See Also:
    • EXCEPT_NOENUMERATIONVALUES

      public static final int EXCEPT_NOENUMERATIONVALUES
      See Also:
    • EXCEPT_BADPARALLELID

      public static final int EXCEPT_BADPARALLELID
      See Also:
    • EXCEPT_CANNOTREDUCEEVALUATORS

      public static final int EXCEPT_CANNOTREDUCEEVALUATORS
      See Also:
    • EXCEPT_DUPLICATEGROUP

      public static final int EXCEPT_DUPLICATEGROUP
      See Also:
    • EXCEPT_SOLUTIONNOTEVALUATED

      public static final int EXCEPT_SOLUTIONNOTEVALUATED
      See Also:
    • EXCEPT_EVALUATE

      public static final int EXCEPT_EVALUATE
      See Also:
    • EXCEPT_BADSOLID

      public static final int EXCEPT_BADSOLID
      See Also:
    • EXCEPT_STEPSIZEISZERO

      public static final int EXCEPT_STEPSIZEISZERO
      See Also:
    • EXCEPT_STEPSIZERANGE

      public static final int EXCEPT_STEPSIZERANGE
      See Also:
    • EXCEPT_BADOBSCOUNT

      public static final int EXCEPT_BADOBSCOUNT
      See Also:
    • EXCEPT_NOPERIODS

      public static final int EXCEPT_NOPERIODS
      See Also:
    • EXCEPT_BADSTATISTIC

      public static final int EXCEPT_BADSTATISTIC
      See Also:
    • EXCEPT_BADMEASURE

      public static final int EXCEPT_BADMEASURE
      See Also:
    • EXCEPT_NOPROJECTS

      public static final int EXCEPT_NOPROJECTS
      See Also:
    • EXCEPT_MIXEDOBSERVATIONS

      public static final int EXCEPT_MIXEDOBSERVATIONS
      See Also:
    • EXCEPT_ILLEGALMETHOD

      public static final int EXCEPT_ILLEGALMETHOD
      See Also:
    • EXCEPT_BADSOLUTION

      public static final int EXCEPT_BADSOLUTION
      See Also:
    • EXCEPT_CANNOTGENERATE

      public static final int EXCEPT_CANNOTGENERATE
      See Also:
    • EXCEPT_CANNOTENUMERATE

      public static final int EXCEPT_CANNOTENUMERATE
      See Also:
    • EXCEPT_CANNOTPSO

      public static final int EXCEPT_CANNOTPSO
      See Also:
    • EXCEPT_CANNOTELECTRO

      public static final int EXCEPT_CANNOTELECTRO
      See Also:
    • EXCEPT_BADCONFIDENCETYPE

      public static final int EXCEPT_BADCONFIDENCETYPE
      See Also:
    • EXCEPT_BADCONFIDENCELEVEL

      public static final int EXCEPT_BADCONFIDENCELEVEL
      See Also:
    • EXCEPT_BADCONFIDENCEERRPCT

      public static final int EXCEPT_BADCONFIDENCEERRPCT
      See Also:
    • EXCEPT_BADREPLICATIONMINIMUM

      public static final int EXCEPT_BADREPLICATIONMINIMUM
      See Also:
    • EXCEPT_BADREPLICATIONMAXIMUM

      public static final int EXCEPT_BADREPLICATIONMAXIMUM
      See Also:
    • EXCEPT_BADADDITIONALREPLICATIONS

      public static final int EXCEPT_BADADDITIONALREPLICATIONS
      See Also:
    • EXCEPT_BADCONFIDENCESTATISTIC

      public static final int EXCEPT_BADCONFIDENCESTATISTIC
      See Also:
    • EXCEPT_NO_CONFIDENCE_SETTINGS

      public static final int EXCEPT_NO_CONFIDENCE_SETTINGS
      See Also:
    • EXCEPT_NESTED_STATISTIC

      public static final int EXCEPT_NESTED_STATISTIC
      See Also:
    • EXCEPT_BAD_REPLICATION_BATCHSIZE

      public static final int EXCEPT_BAD_REPLICATION_BATCHSIZE
      See Also:
    • EXCEPT_BAD_PERCENTILE

      public static final int EXCEPT_BAD_PERCENTILE
      See Also:
    • EXCEPT_NOITERATIONS

      public static final int EXCEPT_NOITERATIONS
      See Also:
    • EXCEPT_ITERATIONS

      public static final int EXCEPT_ITERATIONS
      See Also:
    • EXCEPT_NOSOLUTIONSINSET

      public static final int EXCEPT_NOSOLUTIONSINSET
      See Also:
    • EXCEPT_MULTIOBJECTIVEINCOMPATIBILITY

      public static final int EXCEPT_MULTIOBJECTIVEINCOMPATIBILITY
      See Also:
    • EXCEPT_FRONTIEROBJECTIVEINCOMPATIBILITY

      public static final int EXCEPT_FRONTIEROBJECTIVEINCOMPATIBILITY
      See Also:
    • REASON_NONE

      public static final int REASON_NONE
      See Also:
    • REASON_NOEQUATION

      public static final int REASON_NOEQUATION
      See Also:
    • REASON_EQMISSINGOP

      public static final int REASON_EQMISSINGOP
      See Also:
    • REASON_EQMISSINGPARAMS

      public static final int REASON_EQMISSINGPARAMS
      See Also:
    • REASON_EQMISSINGSTARTPAREN

      public static final int REASON_EQMISSINGSTARTPAREN
      See Also:
    • REASON_EQMISSINGCLOSEPAREN

      public static final int REASON_EQMISSINGCLOSEPAREN
      See Also:
    • REASON_EQNOTAVARIABLE

      public static final int REASON_EQNOTAVARIABLE
      See Also:
    • REASON_EQINCOMPLETE

      public static final int REASON_EQINCOMPLETE
      See Also:
    • REASON_EQMISSINGBRACE

      public static final int REASON_EQMISSINGBRACE
      See Also:
    • REASON_EQMISSINGLHS

      public static final int REASON_EQMISSINGLHS
      See Also:
    • REASON_EQMISSINGRHS

      public static final int REASON_EQMISSINGRHS
      See Also:
    • REASON_EQMISSINGCOMPOP

      public static final int REASON_EQMISSINGCOMPOP
      See Also:
    • REASON_EQPARENERR

      public static final int REASON_EQPARENERR
      See Also:
    • REASON_EQVARIABLEBOUND

      public static final int REASON_EQVARIABLEBOUND
      See Also:
    • REASON_EQNUMBERERR

      public static final int REASON_EQNUMBERERR
      See Also:
    • serialVersionUID

      public static final long serialVersionUID
      See Also:
  • Constructor Details

    • COptQuestException

      public COptQuestException(int errorCode, String moreInfoString)
    • COptQuestException

      public COptQuestException(int errorCode)
    • COptQuestException

      public COptQuestException(int errorCode, int reasonCode, String errorToken)
  • Method Details

    • ErrorNumber

      public int ErrorNumber()
    • ReasonNumber

      public int ReasonNumber()
    • ReasonString

      public String ReasonString()
      Get a string description of the exception reason
    • ErrorToken

      public String ErrorToken()
    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable
    • Description

      public String Description()
      Get a string description of the exception