public class SetType extends Object implements Serializable
ParameterInstance
objects. This list represents parameter instances
that loosely depend on each other. Each element of this list is exclusive to
one Settype (by default, this is the default Settype, see
ProjectionModel
), i.e., the parameter instance lists of all
Settypes are disjunct. Each Set
of a SetType
contains a list
of ParameterAssignment
objects for each instances
and has an occurrence probability itself. Hence, the Monte-Carlo simulation
firstly selects a Set
for each SetType
randomly, and then
selects a ParameterAssignment
from the options
offered by the chosen Set
, for each ParameterInstance
that is
defined in the SetType
.
Basically, Set
and SetType
serve the purpose of avoiding
implausible combinations of input matrices for the PPPM (e.g., high fertility
of native population and immigrants, but low fertility of emigrants could be
such a combination). Each Settype manages the list of Set
instances
that are associated with it. Hence, sets need to be added/removed from the
Settype.
Created on August 7, 2006Set
,
ProjectionModel
,
ParameterAssignment
,
Serialized FormConstructor and Description |
---|
SetType()
Constructor for bean compatibility.
|
SetType(String typeName,
String typeDescription)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addInstance(ParameterInstance instance)
Adds a parameter instance for this Settype.
|
Set |
createSet(String setName,
String setDescription,
double probability)
Creates a new set for a type.
|
List<ParameterInstance> |
getDefinedParameters() |
String |
getDescription() |
int |
getID() |
String |
getName() |
int |
getNumOfSets()
Gets the number of sets for this Settype.
|
List<Set> |
getSets() |
void |
removeInstance(ParameterInstance instance)
Removes a parameter instance from this Settype.
|
boolean |
removeSet(Set set)
Removes a set from this Settype.
|
void |
setDefinedParameters(List<ParameterInstance> definedParameters) |
void |
setDescription(String description) |
void |
setID(int uniqueID) |
void |
setName(String name) |
void |
setSets(List<Set> sets) |
String |
toString() |
public SetType(String typeName, String typeDescription)
typeName
- name of the SettypetypeDescription
- description for this Settypepublic SetType()
public Set createSet(String setName, String setDescription, double probability)
setName
- name of the set to be createdsetDescription
- description of the set to be createdprobability
- probability of the set to be createdpublic boolean removeSet(Set set)
set
- the set to be removedpublic void removeInstance(ParameterInstance instance)
ParameterAssignment
objects from all
Set
objects associated with this Settype.instance
- the instance to be removedpublic void addInstance(ParameterInstance instance)
Set
objects as well.instance
- the instance to be addedpublic void setDefinedParameters(List<ParameterInstance> definedParameters)
public String getDescription()
public void setDescription(String description)
public String getName()
public void setName(String name)
public List<ParameterInstance> getDefinedParameters()
public int getNumOfSets()
public int getID()
public void setID(int uniqueID)
Copyright © 2012. All Rights Reserved.