public class ContinuousParameter extends IndependentParameter
constraints
.
constraints
: 1: no under boundary, no upper boundary 2: under boundary, no upper boundary 3: under boundary, upper boundary 4: no under boundary, upper boundary
This project was carried out at:
and supported byGenOpt Copyright (c) 1998-2021, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.
Modifier and Type | Field and Description |
---|---|
protected int |
constraint
kind of constraint
1: continuous, unconstrained, 2: continuous, lower bounded, 3: continuous, lower and upper bounded, 4: continuous, upper bounded |
protected double |
maximum
upper boundary
|
protected double |
minimum
lower boundary
|
protected double |
original
value in the original space
|
protected double |
originalStepSize
step size in the original space
|
name
Constructor and Description |
---|
ContinuousParameter()
constructor.
|
ContinuousParameter(java.lang.String VariableName,
double MinValue,
double OriginalValue,
double MaxValue,
double OriginalStepSize,
int Constraint)
Constructor for a continuous variable.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
clone()
Clone
|
int |
getKindOfConstraint()
Gets the kind of constraint
|
double |
getMaximum()
Gets the maximum restriction of the parameter
|
double |
getMinimum()
Gets the minimum restriction of the parameter
|
double |
getOriginalStepSize()
Gets the step size in the original space
|
double |
getOriginalValue()
Gets the parameter value in the original space
|
static double |
getTransformedStepSize(double x,
double dx,
double l,
double u,
int con,
int dir)
Gets the step size in the transformed space
|
double |
getTransformedValue()
Gets the parameter value in the transformed space
|
static double[] |
transformValue(double[] x,
double[] l,
double[] u,
int[] con,
int dir)
Transforms a value from the original to the transformed space or
vice-versa, depending on the value of
direction |
static double |
transformValue(double x,
double l,
double u,
int con,
int dir)
Transforms a value from the original to the transformed space or
vice-versa, depending on the value of
direction |
getName
protected double original
protected double minimum
protected double maximum
protected double originalStepSize
protected int constraint
public ContinuousParameter()
public ContinuousParameter(java.lang.String VariableName, double MinValue, double OriginalValue, double MaxValue, double OriginalStepSize, int Constraint)
VariableName
- Name of the free parameter as specified in the
command fileMinValue
- Minimum of free parameterOriginalValue
- Initial value of free parameter in orginal spaceMaxValue
- Maximum of free parameterOriginalStepSize
- Step size in original spaceConstraint
- Integer that specifies the kind of parameter
constraintsprotected java.lang.Object clone()
clone
in class java.lang.Object
public final double getOriginalValue()
public final double getTransformedValue()
public final double getMinimum()
public final double getMaximum()
public final double getOriginalStepSize()
public final int getKindOfConstraint()
public static double[] transformValue(double[] x, double[] l, double[] u, int[] con, int dir)
direction
x
- the value that has to be transformedl
- its minimum value (or any dummy value if not applicable for this
type of constraintu
- its minimum value (or any dummy value if not applicable for this
type of constraintcon
- kind of constraintdir
- 0
if transformation has to be done
from original to transformed space, 1
otherwisepublic static double transformValue(double x, double l, double u, int con, int dir)
direction
x
- the value that has to be transformedl
- its minimum value (or any dummy value if not applicable for this
type of constraintu
- its minimum value (or any dummy value if not applicable for this
type of constraintcon
- kind of constraintdir
- 0
if transformation has to be done
from original to transformed space, 1
otherwisepublic static double getTransformedStepSize(double x, double dx, double l, double u, int con, int dir)
x
- the parameter value in the original spacedx
- the step size in the original spacel
- its minimum value (or any dummy value if not applicable for this
type of constraintu
- its minimum value (or any dummy value if not applicable for this
type of constraintcon
- kind of constraintdir
- 0
if transformation has to be done
from original to transformed space, 1
otherwise