public abstract class OptionModelControllerBase extends java.util.Observable implements EomController
OptionModelController
and covers the methods for handling
TechnicalSystem
's file and the access to diverse help classes
as the classes SelectionModel
, GlobalInfo
, ObjectFactory
,
OntologyHelper
, AbstractOptionModelCalculation
and the
class AbstractEvaluationStrategy
.Constructor and Description |
---|
OptionModelControllerBase()
Instantiates a new option model controller.
|
Modifier and Type | Method and Description |
---|---|
void |
adjustEnergyFlowMeasuredToMilliseconds(EnergyFlowMeasured efm,
long milliseconds)
Adjust energy flow measured to the specified milliseconds.
|
void |
adjustGoodFlowMeasuredToMilliseconds(GoodFlowMeasured gfm,
long milliseconds)
Adjust good flow measured to the specified milliseconds.
|
EnergyAmount |
copyEnergyAmount(EnergyAmount energyAmount)
Copies the specified energy amount into a new instance.
|
EnergyFlowInWatt |
copyEnergyFlowInWatt(EnergyFlowInWatt energyFlowInWatt)
Copies the specified
EnergyFlowInWatt into a new instance. |
GoodFlow |
copyGoodFlow(GoodFlow goodFlow)
Copies the specified
GoodFlow into a new instance. |
AbstractEvaluationStrategy |
createEvaluationStrategy()
Creates and returns a new instance of the configured evaluation strategy.
|
AbstractEvaluationStrategy |
createEvaluationStrategy(java.lang.String evaluationStrategyClassName)
Creates and returns a new instance of the configured evaluation strategy.
|
AbstractOptionModelCalculation |
createOptionModelCalculation()
Returns the a new instance of an option model calculation.
|
State |
createState(TechnicalInterfaceConfiguration tic)
Creates a new
State in compliance to the given TechnicalInterfaceConfiguration . |
AbstractStaticModel |
createStaticModel(SystemVariableDefinitionStaticModel sysVarDefStaticModel)
Creates and returns the
AbstractStaticModel instance that is defined with the specified SystemVariableDefinitionStaticModel . |
TechnicalInterface |
createTechnicalInterface(TechnicalInterfaceConfiguration tic)
Creates a new
EnergyInterface in compliance to the given TechnicalInterfaceConfiguration . |
TechnicalInterfaceConfiguration |
createTechnicalInterfaceConfiguration()
Creates a new TechnicalInterfaceConfiguration.
|
AbstractStaticModel |
getAbstractStaticModel(SystemVariableDefinitionStaticModel sysVarDefStaticModel)
Returns the abstract static model, if specified, and will remind the instance for a further access.
|
jade.core.Agent |
getControllingAgent()
Returns the controlling agent of this option model controller..
|
java.lang.Object |
getControllingEntity()
Returns the controlling entity of this option model controller.
|
CostModel |
getCostModel()
Returns the
CostModel for the current TechnicalSystem . |
java.io.File |
getCurrentFile()
Has to return the file object that is currently open in the controller.
|
java.lang.String |
getDomain(java.lang.String configID,
java.lang.String interfaceID)
Returns the domain (String) for the specified ID's of
TechnicalInterfaceConfiguration and TechnicalInterface . |
java.lang.String |
getDomain(TechnicalInterfaceConfiguration tic,
java.lang.String interfaceID)
Returns the domain (String) for the specified
TechnicalInterfaceConfiguration
and the TechnicalInterface named by the interfaceID. |
Duration |
getDuration(AbstractOptionModelCalculation.DurationType durationType,
AbstractDuration abstractDuration,
TechnicalSystemStateEvaluation tsse)
Returns the actual
Duration from the specified AbstractDuration in the context of
the current system state, specified by the TechnicalSystemStateEvaluation . |
Duration |
getDurationAsIntegerDuration(Duration duration,
TimeUnit highestTimeUnitToStartAt)
Returns the specified duration with the maximum TimUnit in order
to have the number value of the Duration as an integer.
|
EnergyCarrier |
getEnergyCarrier(java.lang.String configID,
java.lang.String interfaceID)
Returns the
EnergyCarrier for the specified ID's of
TechnicalInterfaceConfiguration and EnergyInterface . |
EnergyCarrier |
getEnergyCarrier(TechnicalInterfaceConfiguration tic,
java.lang.String interfaceID)
Returns the
EnergyCarrier for the specified TechnicalInterfaceConfiguration
and the EnergyInterface named by the interfaceID. |
EnergyFlowInWatt |
getEnergyFlowInWattAverage(EnergyFlowMeasured efm)
Returns the average
EnergyFlowInWatt . |
EnergyFlowInWatt |
getEnergyFlowInWattForEnergyFlowMeasuredAtRelativeTime(EnergyFlowMeasured efm,
long relativePointInTime)
Returns the
EnergyFlowInWatt for the specified EnergyFlowMeasured at the time relative to the EnergyFlowMeasured. |
AbstractEvaluationCalculation |
getEvaluationCalculation(java.lang.String evalCalcClass)
Returns the specified instance of an
AbstractEvaluationCalculation . |
EvaluationClass |
getEvaluationClassByClassName(java.lang.String className)
Returns the
EvaluationClass from the current EvaluationSettings
that corresponds to the specified class name. |
EvaluationClass |
getEvaluationClassByStrategyID(java.lang.String strategyID)
Returns the
EvaluationClass from the current EvaluationSettings
that corresponds to the specified strategy ID. |
EvaluationProcess |
getEvaluationProcess()
Returns or initiates the
EvaluationProcess . |
EvaluationSettings |
getEvaluationSettings()
Returns the
EvaluationSettings for the current TechnicalSystem . |
AbstractEvaluationStrategy |
getEvaluationStrategy()
Returns the actual configured instance of an
AbstractEvaluationStrategy . |
AbstractEvaluationStrategy |
getEvaluationStrategyRT()
Returns the instance of an extended
AbstractEvaluationStrategy in case that the strategy is a real time strategy. |
AbstractFlow |
getFlow(State state,
java.lang.String interfaceID)
Returns the flow for the specified interface.
|
GlobalInfo |
getGlobalInfo()
Returns the global info instance.
|
GoodFlow |
getGoodFlowAverage(GoodFlowMeasured gfm,
java.lang.String domainUnit)
Returns the average
GoodFlow . |
GoodFlow |
getGoodFlowForGoodFlowMeasuredAtRelativeTime(GoodFlowMeasured efm,
long relativePointInTime)
Returns the
GoodFlow for the specified GoodFlowMeasured at the time relative to the GoodFlowMeasured. |
GroupController |
getGroupController()
Returns the GroupController, if used in a context of a group of
TechnicalSystem 's. |
java.util.Vector<StateToStateTransition> |
getIncomingStateTransitions(State state)
Returns the incoming StateTransitions for a specified State including the self-reference of a State.
|
java.util.Vector<StateToStateTransition> |
getIncomingStateTransitions(State state,
boolean includeSelfReferences)
Returns the incoming StateTransitions for a specified State.
|
int |
getIndexOfFlow(State state,
java.lang.String interfaceID)
Gets the index of the specified flow.
|
int |
getIndexOfInputMeasurement(java.lang.String variableID)
Gets the index of the
AbstractInputMeasurement for the specified input measurement. |
int |
getIndexOfState(TechnicalInterfaceConfiguration tic,
java.lang.String stateID)
Returns the index of a State according to the specified TechnicalInterfaceConfiguration and the stateID.
|
int |
getIndexOfStateTransition(State state,
java.lang.String nextStateID)
Returns the index of the specified state transition of a state.
|
int |
getIndexOfTechnicalInterface(TechnicalInterfaceConfiguration tic,
java.lang.String interfaceID)
Returns the index of a
TechnicalInterface according to the specified TechnicalInterfaceConfiguration and the interfaceID. |
int |
getIndexOfTechnicalInterfaceConfiguration(java.lang.String configID)
Returns the index of a TechnicalInterfaceConfiguration according to the specified configID.
|
AbstractInputMeasurement |
getInputMeasurement(java.lang.String variableID)
Returns the specified input measurement if available.
|
java.util.List<AbstractInputMeasurement> |
getInputMeasurements()
Returns the list of
AbstractInputMeasurement for the Evaluation. |
java.util.Vector<java.lang.String> |
getNewStateTransitionOpportunities(TechnicalInterfaceConfiguration tic,
State currentState)
Returns all remaining States-IDs that can be used for new StateTransitions.
|
ObjectFactory |
getObjectFactory()
Returns the object factory for the option model.
|
AbstractOptionModelCalculation |
getOptionModelCalculation()
Returns the actual configured instance of an
AbstractOptionModelCalculation . |
java.util.Vector<StateToStateTransition> |
getOutgoingStateTransitions(State state)
Returns the outgoing StateTransitions for a specified State including the self-reference of a State.
|
java.util.Vector<StateToStateTransition> |
getOutgoingStateTransitions(State state,
boolean includeSelfReferences)
Returns the outgoing StateTransitions for a specified State.
|
SelectionModel |
getSelectionModel()
Returns the current selection model.
|
State |
getState(TechnicalInterfaceConfiguration tic,
java.lang.String stateID)
Gets the specified state form a
TechnicalInterfaceConfiguration . |
Duration |
getStateDuration(State state)
Returns (and maybe creates and sets also) the duration of a given state.
|
long |
getStateDurationFromTechnicalSystemState(TechnicalSystemState tss)
Derives the state duration (in milliseconds) from a technical system state (with the current option model controller).
|
java.lang.Long |
getStateDurationMax(java.lang.String configID)
Returns the maximum state duration of the specified
TechnicalInterfaceConfiguration . |
java.lang.Long |
getStateDurationMax(TechnicalInterfaceConfiguration tic)
Returns the maximum state duration of the specified
TechnicalInterfaceConfiguration . |
static TimeUnit |
getStateFormatTimeUnit(State state)
Returns (and maybe creates and sets also) the format time unit from the specified state.
|
StateTransition |
getStateTransition(State state,
java.lang.String nextStateID)
Gets the specified state transition.
|
java.io.Serializable |
getStaticModelInstance(SystemVariableDefinitionStaticModel sysVarDefStaticModel)
Returns the serializable, static model instance.
|
java.util.Vector<TechnicalInterface> |
getStorageInterfaces(TechnicalInterfaceConfiguration tic)
Returns all
EnergyStorageInterface 's or GoodStorageInterface 's that are defined by the specified TechnicalInterfaceConfiguration . |
TechnicalInterface |
getTechnicalInterface(java.lang.String configID,
java.lang.String interfaceID)
Returns the
TechnicalInterface for the specified ID's of the current
TechnicalInterfaceConfiguration and the EnergyInterface . |
TechnicalInterface |
getTechnicalInterface(TechnicalInterfaceConfiguration tic,
java.lang.String interfaceID)
Gets the specified
TechnicalInterface form a TechnicalInterfaceConfiguration . |
TechnicalInterfaceConfiguration |
getTechnicalInterfaceConfiguration(State state)
Returns the appropriate TechnicalInterfaceConfiguration for a specified State.
|
TechnicalInterfaceConfiguration |
getTechnicalInterfaceConfiguration(java.lang.String configID)
Gets the technical interface configuration by the specified configID.
|
java.util.Vector<TechnicalInterface> |
getTechnicalInterfacesByDomain(TechnicalInterfaceConfiguration tic,
java.lang.String domain)
Returns a Vector of
TechnicalInterface s that have the same domain. |
java.util.Vector<TechnicalInterface> |
getTechnicalInterfacesByDomainAndDomainModel(TechnicalInterfaceConfiguration tic,
java.lang.String domain,
AbstractDomainModel domainModel)
Returns a Vector of
TechnicalInterface s that have the same domain and the same domain model. |
java.util.Vector<EnergyInterface> |
getTechnicalInterfacesByEnergyCarrier(TechnicalInterfaceConfiguration tic,
EnergyCarrier energyCarrier)
Returns a Vector of
EnergyInterface s that have the same EnergyCarrier . |
TechnicalSystem |
getTechnicalSystem()
Gets the current
TechnicalSystem . |
TechnicalSystem |
getTechnicalSystemCopy()
Returns a copied instance of the current
TechnicalSystem . |
boolean |
hasConfigurationErrors()
Checks if the
TechnicalSystem has configuration errors. |
boolean |
hasTechnicalSystemChanged()
Checks if the TechnicalSystem has changed.
|
boolean |
isClosable(java.awt.Component parentComponent)
Checks and return if the current controller and its open file is closable.
|
void |
loadTechnicalSystem(java.io.File fileToLoad,
java.awt.Component parentComponent)
Loads a TechnicalSystem file to this OptionModelController.
|
void |
loadTechnicalSystemFromBundle(java.lang.String bundleName,
java.lang.String fileReference,
java.awt.Component parentComponent)
Loads a TechnicalSystem from a bundle to this OptionModelController.
|
AbstractFlow |
removeFlow(State state,
AbstractFlow abstractFlow)
Removes the specified flow.
|
AbstractFlow |
removeFlow(State state,
java.lang.String interfaceID)
Removes the specified flow.
|
State |
removeState(TechnicalInterfaceConfiguration tic,
State state)
Removes the specified state.
|
State |
removeState(TechnicalInterfaceConfiguration tic,
java.lang.String stateID)
Removes the specified state from the TechnicalInterfaceConfiguration.
|
StateTransition |
removeStateTransition(State state,
StateTransition stateTransition)
Removes a state transition.
|
StateTransition |
removeStateTransition(State state,
java.lang.String nextStateID)
Removes the state transition.
|
TechnicalInterface |
removeTechnicalInterface(TechnicalInterfaceConfiguration tic,
java.lang.String interfaceID)
Removes the specified
TechnicalInterface from the TechnicalInterfaceConfiguration. |
TechnicalInterface |
removeTechnicalInterface(TechnicalInterfaceConfiguration tic,
TechnicalInterface technicalInterface)
Removes the specified
TechnicalInterface from the TechnicalInterfaceConfiguration. |
TechnicalInterfaceConfiguration |
removeTechnicalInterfaceConfiguration(java.lang.String configID)
Removes the specified technical interface configuration.
|
TechnicalInterfaceConfiguration |
removeTechnicalInterfaceConfiguration(TechnicalInterfaceConfiguration tic)
Removes the given TechnicalInterfaceConfiguration form the list of configurations.
|
boolean |
renameState(TechnicalInterfaceConfiguration tic,
java.lang.String oldStateID,
java.lang.String newStateID)
Renames a state at all points of the current TechnnicalSystem..
|
boolean |
renameTechnicalInterface(TechnicalInterfaceConfiguration tic,
java.lang.String oldInterfaceID,
java.lang.String newInterfaceID,
boolean instanceWasAlreadyRenamed)
Renames a TechnicalInterface at all points of the current TechnnicalSystem.
|
boolean |
renameTechnicalInterfaceConfiguration(java.lang.String oldConfigID,
java.lang.String newConfigID)
Renames a TechnicalInterfaceConfiguration at all points of the current TechnnicalSystem.
|
void |
resetEvaluationCalculations()
Resets the reminded
AbstractEvaluationCalculation . |
void |
resetEvaluationProcess()
Resets the current
EvaluationProcess . |
void |
resetEvaluationProcess(boolean completeReset)
Reset evaluation process.
|
void |
resetEvaluationStrategy()
Resets the current
AbstractEvaluationStrategy |
void |
resetOptionModel()
Resets the option model.
|
void |
resetOptionModelCalculation()
Resets the option model calculation.
|
void |
resetSelectionModel()
Resets the current SelectionModel to null.
|
void |
resetStaticModelHash()
Resets the static model hash that is a reminder for
AbstractStaticModel instances. |
boolean |
saveechnicalSystemAs(java.awt.Container parentComponent)
Save the current
TechnicalSystem with an user interaction for choosing a file location. |
boolean |
saveTechnicalSystem(java.awt.Component parentComponent)
Saves the current TechnicalSystem to the file specified in
getCurrentFile() . |
void |
setChangedAndNotifyObservers(java.lang.Object notification)
Sets the current state to changed and notifies all observers in one step.
|
void |
setConfigurationErrors(boolean configurationErrors)
Sets that the current
TechnicalSystem has configuration errors or not. |
void |
setControllingAgent(jade.core.Agent controllingAgent)
Sets the controlling agent of this option model controller.
|
void |
setControllingEntity(java.lang.Object controllingEntity)
Sets the controlling entity of this option model controller.
|
void |
setCostModel(CostModel newCostModel)
Sets a new CostModel to the current
TechnicalSystem . |
void |
setCurrentFile(java.io.File currentFile)
Sets the current file.
|
void |
setGroupController(GroupController groupController)
Sets the current
GroupController instance. |
void |
setInitialSelection()
Sets the initial selection.
|
void |
setInputMeasurement(AbstractInputMeasurement aim)
Replaces or adds the specified input measurement.
|
boolean |
setStateDuration(java.awt.Frame owner,
State state,
Duration newStateDuration,
boolean adjustFormat)
Sets the state duration.
|
boolean |
setStateDuration(java.awt.Frame owner,
State state,
Duration newStateDuration,
boolean adjustFormat,
EnergyFlowMeasured currentEnergyFlowMeasured)
Sets the state duration.
|
boolean |
setStateDuration(java.awt.Frame owner,
State state,
Duration newStateDuration,
boolean adjustFormat,
GoodFlowMeasured currentGoodFlowMeasured)
Sets the state duration.
|
void |
setStaticModelInstance(SystemVariableDefinitionStaticModel sysVarDefStaticModel,
java.io.Serializable newStaticModelValue)
Sets the specified serializable, static model instance to a
SystemVariableDefinitionStaticModel . |
void |
setTechnicalSystem(TechnicalSystem technicalSystem)
Sets the technical system.
|
void |
setTechnicalSystemReminder()
Sets the technical system reminder in order to recognise changes in the model later on.
|
EnergyAmount |
subtractEnergyAmount(EnergyAmount ea2SubbtractFrom,
EnergyAmount eaSubtract)
Subtracts the
EnergyAmount instances. |
EnergyAmount |
sumUpEnergyAmounts(EnergyAmount ea2AddTo,
EnergyAmount eaAddition)
Sums up the two specified
EnergyAmount 's. |
EnergyFlowInWatt |
sumUpEnergyFlowInWatt(EnergyFlowInWatt ef2AddTo,
EnergyFlowInWatt efAddition)
Sums up the two specified
EnergyFlowInWatt . |
GoodFlow |
sumUpGoodFlow(GoodFlow gf2AddTo,
GoodFlow gfAddition)
Sums up the two specified
GoodFlow . |
java.lang.String |
toString() |
public OptionModelControllerBase()
public GroupController getGroupController()
TechnicalSystem
's.public void setGroupController(GroupController groupController)
GroupController
instance. This is only used
in the context of an aggregation of several TechnicalSystem
's.groupController
- the new group controllerpublic void setChangedAndNotifyObservers(java.lang.Object notification)
EomController
setChangedAndNotifyObservers
in interface EomController
notification
- the new changed and notify observerspublic java.lang.String toString()
toString
in class java.lang.Object
public GlobalInfo getGlobalInfo()
public ObjectFactory getObjectFactory()
public SelectionModel getSelectionModel()
public void resetSelectionModel()
public void setInitialSelection()
public EvaluationProcess getEvaluationProcess()
EvaluationProcess
.public void resetEvaluationProcess()
EvaluationProcess
.public void resetEvaluationProcess(boolean completeReset)
completeReset
- the complete resetpublic void setControllingEntity(java.lang.Object controllingEntity)
controllingEntity
- the new controlling entitypublic java.lang.Object getControllingEntity()
public void setControllingAgent(jade.core.Agent controllingAgent)
controllingAgent
- the new controlling agentpublic jade.core.Agent getControllingAgent()
public void loadTechnicalSystemFromBundle(java.lang.String bundleName, java.lang.String fileReference, java.awt.Component parentComponent)
bundleName
- the symbolic bundle namefileReference
- the file reference within the bundleparentComponent
- the parent component (may be null
)public void loadTechnicalSystem(java.io.File fileToLoad, java.awt.Component parentComponent)
fileToLoad
- the file to loadparentComponent
- the parent component (may be null
)public boolean saveTechnicalSystem(java.awt.Component parentComponent)
getCurrentFile()
.parentComponent
- the parent component (may be null
)getCurrentFile()
,
setCurrentFile(File)
public boolean saveechnicalSystemAs(java.awt.Container parentComponent)
TechnicalSystem
with an user interaction for choosing a file location.parentComponent
- the parent component (may be null
)public void resetOptionModel()
public void setTechnicalSystemReminder()
public boolean hasTechnicalSystemChanged()
public boolean isClosable(java.awt.Component parentComponent)
EomController
isClosable
in interface EomController
parentComponent
- the parent component that has the current focus (for user requests)public boolean hasConfigurationErrors()
TechnicalSystem
has configuration errors.public void setConfigurationErrors(boolean configurationErrors)
TechnicalSystem
has configuration errors or not.configurationErrors
- the new value configuration errorspublic void setTechnicalSystem(TechnicalSystem technicalSystem)
technicalSystem
- the new technical systempublic TechnicalSystem getTechnicalSystem()
TechnicalSystem
.TechnicalSystem
public TechnicalSystem getTechnicalSystemCopy()
TechnicalSystem
.TechnicalSystem
copypublic void setCurrentFile(java.io.File currentFile)
currentFile
- the new current filepublic java.io.File getCurrentFile()
EomController
getCurrentFile
in interface EomController
public EvaluationSettings getEvaluationSettings()
EvaluationSettings
for the current TechnicalSystem
.public EvaluationClass getEvaluationClassByClassName(java.lang.String className)
EvaluationClass
from the current EvaluationSettings
that corresponds to the specified class name.className
- the class namepublic EvaluationClass getEvaluationClassByStrategyID(java.lang.String strategyID)
EvaluationClass
from the current EvaluationSettings
that corresponds to the specified strategy ID.strategyID
- the strategy idpublic void setCostModel(CostModel newCostModel)
TechnicalSystem
.newCostModel
- the new cost modelpublic CostModel getCostModel()
CostModel
for the current TechnicalSystem
.public java.util.List<AbstractInputMeasurement> getInputMeasurements()
AbstractInputMeasurement
for the Evaluation.public void setInputMeasurement(AbstractInputMeasurement aim)
aim
- the new input measurementpublic AbstractInputMeasurement getInputMeasurement(java.lang.String variableID)
variableID
- the variable IDpublic int getIndexOfInputMeasurement(java.lang.String variableID)
AbstractInputMeasurement
for the specified input measurement.variableID
- the variable IDpublic AbstractStaticModel createStaticModel(SystemVariableDefinitionStaticModel sysVarDefStaticModel)
AbstractStaticModel
instance that is defined with the specified SystemVariableDefinitionStaticModel
.sysVarDefStaticModel
- the SystemVariableDefinitionStaticModel to usepublic void resetStaticModelHash()
AbstractStaticModel
instances.public AbstractStaticModel getAbstractStaticModel(SystemVariableDefinitionStaticModel sysVarDefStaticModel)
sysVarDefStaticModel
- the actual SystemVariableDefinitionStaticModel
public java.io.Serializable getStaticModelInstance(SystemVariableDefinitionStaticModel sysVarDefStaticModel)
sysVarDefStaticModel
- the SystemVariableDefinitionStaticModel
public void setStaticModelInstance(SystemVariableDefinitionStaticModel sysVarDefStaticModel, java.io.Serializable newStaticModelValue)
SystemVariableDefinitionStaticModel
.sysVarDefStaticModel
- the SystemVariableDefinitionStaticModel
newStaticModelValue
- the new static model value as general Objectpublic AbstractOptionModelCalculation createOptionModelCalculation()
public AbstractOptionModelCalculation getOptionModelCalculation()
AbstractOptionModelCalculation
.public void resetOptionModelCalculation()
public AbstractEvaluationStrategy getEvaluationStrategy()
AbstractEvaluationStrategy
.public void resetEvaluationStrategy()
AbstractEvaluationStrategy
public AbstractEvaluationStrategy createEvaluationStrategy()
AbstractEvaluationCalculation
public AbstractEvaluationStrategy createEvaluationStrategy(java.lang.String evaluationStrategyClassName)
evaluationStrategyClassName
- the class name of the evaluation strategyAbstractEvaluationCalculation
public AbstractEvaluationStrategy getEvaluationStrategyRT()
AbstractEvaluationStrategy
in case that the strategy is a real time strategy.TechnicalSystem
's the class AbstractEvaluationStrategyRT
had to be extended, while
for TechnicalSystemGroup
's, or aggregations respectively, an AbstractGroupEvaluationStrategyRT
had to be
extended. Further, those classes should be configured as default evaluation class for the system (group).public AbstractEvaluationCalculation getEvaluationCalculation(java.lang.String evalCalcClass)
AbstractEvaluationCalculation
.evalCalcClass
- the string reference to the extended AbstractEvaluationCalculation
public void resetEvaluationCalculations()
AbstractEvaluationCalculation
.public TechnicalInterfaceConfiguration createTechnicalInterfaceConfiguration()
public int getIndexOfTechnicalInterfaceConfiguration(java.lang.String configID)
configID
- the configuration idpublic TechnicalInterfaceConfiguration getTechnicalInterfaceConfiguration(java.lang.String configID)
configID
- the configuration-idpublic TechnicalInterfaceConfiguration getTechnicalInterfaceConfiguration(State state)
state
- the Statepublic TechnicalInterfaceConfiguration removeTechnicalInterfaceConfiguration(java.lang.String configID)
configID
- the configuration-idpublic TechnicalInterfaceConfiguration removeTechnicalInterfaceConfiguration(TechnicalInterfaceConfiguration tic)
tic
- the TechnicalInterfaceConfigurationpublic boolean renameTechnicalInterfaceConfiguration(java.lang.String oldConfigID, java.lang.String newConfigID)
oldConfigID
- the old config idnewConfigID
- the new config idpublic TechnicalInterface createTechnicalInterface(TechnicalInterfaceConfiguration tic)
EnergyInterface
in compliance to the given TechnicalInterfaceConfiguration
.tic
- the TechnicalInterfaceConfigurationpublic int getIndexOfTechnicalInterface(TechnicalInterfaceConfiguration tic, java.lang.String interfaceID)
TechnicalInterface
according to the specified TechnicalInterfaceConfiguration and the interfaceID.tic
- the TechnicalInterfaceConfigurationinterfaceID
- the interface idpublic TechnicalInterface getTechnicalInterface(TechnicalInterfaceConfiguration tic, java.lang.String interfaceID)
TechnicalInterface
form a TechnicalInterfaceConfiguration
.tic
- the TechnicalInterfaceConfigurationinterfaceID
- the interface-idpublic TechnicalInterface getTechnicalInterface(java.lang.String configID, java.lang.String interfaceID)
TechnicalInterface
for the specified ID's of the current
TechnicalInterfaceConfiguration
and the EnergyInterface
.configID
- the configID of the TechnicalInterfaceConfiguration
interfaceID
- the interfaceID of the EnergyInterface
public TechnicalInterface removeTechnicalInterface(TechnicalInterfaceConfiguration tic, java.lang.String interfaceID)
TechnicalInterface
from the TechnicalInterfaceConfiguration.tic
- the TechnicalInterfaceConfigurationinterfaceID
- the state idpublic TechnicalInterface removeTechnicalInterface(TechnicalInterfaceConfiguration tic, TechnicalInterface technicalInterface)
TechnicalInterface
from the TechnicalInterfaceConfiguration.tic
- the TechnicalInterfaceConfigurationtechnicalInterface
- the technical interfacepublic boolean renameTechnicalInterface(TechnicalInterfaceConfiguration tic, java.lang.String oldInterfaceID, java.lang.String newInterfaceID, boolean instanceWasAlreadyRenamed)
tic
- the TechnicalInterfaceConfigurationoldInterfaceID
- the old interface idnewInterfaceID
- the new interface idinstanceWasAlreadyRenamed
- true, if the instance of the TechnnicalSystem was already renamedpublic java.util.Vector<TechnicalInterface> getTechnicalInterfacesByDomain(TechnicalInterfaceConfiguration tic, java.lang.String domain)
TechnicalInterface
s that have the same domain.tic
- the TechnicalInterfaceConfiguration
domain
- the domain to search forpublic java.util.Vector<EnergyInterface> getTechnicalInterfacesByEnergyCarrier(TechnicalInterfaceConfiguration tic, EnergyCarrier energyCarrier)
EnergyInterface
s that have the same EnergyCarrier
.tic
- the TechnicalInterfaceConfiguration
energyCarrier
- the EnergyCarrier
public java.util.Vector<TechnicalInterface> getTechnicalInterfacesByDomainAndDomainModel(TechnicalInterfaceConfiguration tic, java.lang.String domain, AbstractDomainModel domainModel)
TechnicalInterface
s that have the same domain and the same domain model.tic
- the TechnicalInterfaceConfiguration
domain
- the domain to search fordomainModel
- the domain modelpublic java.lang.String getDomain(TechnicalInterfaceConfiguration tic, java.lang.String interfaceID)
TechnicalInterfaceConfiguration
and the TechnicalInterface
named by the interfaceID.tic
- the TechnicalInterfaceConfiguration
interfaceID
- the interfaceID of the EnergyInterface
public java.lang.String getDomain(java.lang.String configID, java.lang.String interfaceID)
TechnicalInterfaceConfiguration
and TechnicalInterface
.configID
- the configID of the TechnicalInterfaceConfiguration
interfaceID
- the interfaceID of the EnergyInterface
public EnergyCarrier getEnergyCarrier(TechnicalInterfaceConfiguration tic, java.lang.String interfaceID)
EnergyCarrier
for the specified TechnicalInterfaceConfiguration
and the EnergyInterface
named by the interfaceID.tic
- the TechnicalInterfaceConfiguration
interfaceID
- the interfaceID of the EnergyInterface
public EnergyCarrier getEnergyCarrier(java.lang.String configID, java.lang.String interfaceID)
EnergyCarrier
for the specified ID's of
TechnicalInterfaceConfiguration
and EnergyInterface
.configID
- the configID of the TechnicalInterfaceConfiguration
interfaceID
- the interfaceID of the EnergyInterface
public java.util.Vector<TechnicalInterface> getStorageInterfaces(TechnicalInterfaceConfiguration tic)
EnergyStorageInterface
's or GoodStorageInterface
's that are defined by the specified TechnicalInterfaceConfiguration
.tic
- the TechnicalInterfaceConfiguration
EnergyStorageInterface
's or GoodStorageInterface
'spublic State createState(TechnicalInterfaceConfiguration tic)
State
in compliance to the given TechnicalInterfaceConfiguration
.tic
- the TechnicalInterfaceConfigurationpublic int getIndexOfState(TechnicalInterfaceConfiguration tic, java.lang.String stateID)
tic
- the TechnicalInterfaceConfigurationstateID
- the state idpublic State getState(TechnicalInterfaceConfiguration tic, java.lang.String stateID)
TechnicalInterfaceConfiguration
.tic
- the TechnicalInterfaceConfigurationstateID
- the state-idpublic State removeState(TechnicalInterfaceConfiguration tic, java.lang.String stateID)
tic
- the TechnicalInterfaceConfigurationstateID
- the state idpublic State removeState(TechnicalInterfaceConfiguration tic, State state)
tic
- the TechnicalInterfaceConfigurationstate
- the Statepublic boolean renameState(TechnicalInterfaceConfiguration tic, java.lang.String oldStateID, java.lang.String newStateID)
tic
- the TechnicalInterfaceConfigurationoldStateID
- the old state idnewStateID
- the new state idpublic java.util.Vector<StateToStateTransition> getIncomingStateTransitions(State state)
state
- the StategetIncomingStateTransitions(State, boolean)
public java.util.Vector<StateToStateTransition> getIncomingStateTransitions(State state, boolean includeSelfReferences)
state
- the StateincludeSelfReferences
- set true, if you want to include the self-reference of a Statepublic java.util.Vector<StateToStateTransition> getOutgoingStateTransitions(State state)
state
- the StategetIncomingStateTransitions(State, boolean)
public java.util.Vector<StateToStateTransition> getOutgoingStateTransitions(State state, boolean includeSelfReferences)
state
- the StateincludeSelfReferences
- set true, if you want to include the self-reference of a Statepublic Duration getDuration(AbstractOptionModelCalculation.DurationType durationType, AbstractDuration abstractDuration, TechnicalSystemStateEvaluation tsse)
Duration
from the specified AbstractDuration
in the context of
the current system state, specified by the TechnicalSystemStateEvaluation
. The system state
may be null in case of a request for the type AbstractOptionModelCalculation.DurationType.StateDuration
durationType
- the AbstractOptionModelCalculation.DurationType
abstractDuration
- the actual AbstractDuration
tsse
- the TechnicalSystemStateEvaluation
Duration
public java.util.Vector<java.lang.String> getNewStateTransitionOpportunities(TechnicalInterfaceConfiguration tic, State currentState)
tic
- the TechnicalInterfaceConfigurationcurrentState
- the current Statepublic int getIndexOfStateTransition(State state, java.lang.String nextStateID)
state
- the statenextStateID
- the next state idpublic StateTransition getStateTransition(State state, java.lang.String nextStateID)
state
- the statenextStateID
- the next state idpublic StateTransition removeStateTransition(State state, java.lang.String nextStateID)
state
- the statenextStateID
- the next state idpublic StateTransition removeStateTransition(State state, StateTransition stateTransition)
state
- the statestateTransition
- the state transitionpublic int getIndexOfFlow(State state, java.lang.String interfaceID)
state
- the stateinterfaceID
- the interface idpublic AbstractFlow getFlow(State state, java.lang.String interfaceID)
state
- the stateinterfaceID
- the interface idpublic AbstractFlow removeFlow(State state, java.lang.String interfaceID)
state
- the stateinterfaceID
- the interface idpublic AbstractFlow removeFlow(State state, AbstractFlow abstractFlow)
state
- the stateabstractFlow
- the energy flowpublic EnergyFlowInWatt copyEnergyFlowInWatt(EnergyFlowInWatt energyFlowInWatt)
EnergyFlowInWatt
into a new instance.energyFlowInWatt
- the energy flow in wattpublic GoodFlow copyGoodFlow(GoodFlow goodFlow)
GoodFlow
into a new instance.goodFlow
- the good flow to copypublic EnergyFlowInWatt sumUpEnergyFlowInWatt(EnergyFlowInWatt ef2AddTo, EnergyFlowInWatt efAddition)
EnergyFlowInWatt
. For this, the specified EnergyUnitFactorPrefixSI
of the second argument will be adjusted to the same values of the first argument.ef2AddTo
- the EnergyFlowInWatt
where the addition value has to be added toefAddition
- the EnergyFlowInWatt which has to be addedEnergyFlowInWatt
public EnergyAmount copyEnergyAmount(EnergyAmount energyAmount)
energyAmount
- the energy amountpublic EnergyAmount sumUpEnergyAmounts(EnergyAmount ea2AddTo, EnergyAmount eaAddition)
EnergyAmount
's. For this, the specified EnergyUnitFactorPrefixSI
and the TimeUnit
of the second argument will be adjusted to the same values of the first argument.ea2AddTo
- the EnergyAmount where the addition value has to be added toeaAddition
- the EnergyAmount which has to be addedEnergyAmount
public EnergyAmount subtractEnergyAmount(EnergyAmount ea2SubbtractFrom, EnergyAmount eaSubtract)
EnergyAmount
instances.ea2SubbtractFrom
- the EnergyAmount to subtract fromeaSubtract
- the EnergyAmount that has to be subtractedpublic void adjustEnergyFlowMeasuredToMilliseconds(EnergyFlowMeasured efm, long milliseconds)
efm
- the EnergyFlowMeasuredmilliseconds
- the millisecondspublic void adjustGoodFlowMeasuredToMilliseconds(GoodFlowMeasured gfm, long milliseconds)
gfm
- the GoodFlowMeasuredmilliseconds
- the millisecondspublic EnergyFlowInWatt getEnergyFlowInWattForEnergyFlowMeasuredAtRelativeTime(EnergyFlowMeasured efm, long relativePointInTime)
EnergyFlowInWatt
for the specified EnergyFlowMeasured
at the time relative to the EnergyFlowMeasured.efm
- the EnergyFlowMeasured
relativePointInTime
- the relative point in timeEnergyFlowInWatt
for energy flow measured at relative timepublic GoodFlow getGoodFlowForGoodFlowMeasuredAtRelativeTime(GoodFlowMeasured efm, long relativePointInTime)
GoodFlow
for the specified GoodFlowMeasured
at the time relative to the GoodFlowMeasured.efm
- the GoodFlowMeasured
relativePointInTime
- the relative point in timeGoodFlow
for energy flow measured at relative timepublic EnergyFlowInWatt getEnergyFlowInWattAverage(EnergyFlowMeasured efm)
EnergyFlowInWatt
.efm
- the EnergyFlowMeasured
public GoodFlow getGoodFlowAverage(GoodFlowMeasured gfm, java.lang.String domainUnit)
GoodFlow
.gfm
- the GoodFlowMeasured
public boolean setStateDuration(java.awt.Frame owner, State state, Duration newStateDuration, boolean adjustFormat)
TimeUnit
of the
newStateDuration will change the appearance of the duration by using State.setFormatTimeUnit(TimeUnit)
.owner
- the owner frame, where messages are to be displayed. Can be set to null, too.state
- the statenewStateDuration
- the new state durationadjustFormat
- the adjust format. If true, the format of the duration will be adjusted according to the TimeUnit
of newStateDurationpublic boolean setStateDuration(java.awt.Frame owner, State state, Duration newStateDuration, boolean adjustFormat, GoodFlowMeasured currentGoodFlowMeasured)
TimeUnit
of the
newStateDuration will change the appearance of the duration by using State.setFormatTimeUnit(TimeUnit)
.owner
- the owner frame, where messages are to be displayed. Can be set to null, too.state
- the statenewStateDuration
- the new state durationadjustFormat
- the adjust format. If true, the format of the duration will be adjusted according to the TimeUnit
of newStateDurationcurrentGoodFlowMeasured
- the current GoodFlowMeasured
, if this applies. Can be nullpublic boolean setStateDuration(java.awt.Frame owner, State state, Duration newStateDuration, boolean adjustFormat, EnergyFlowMeasured currentEnergyFlowMeasured)
TimeUnit
of the
newStateDuration will change the appearance of the duration by using State.setFormatTimeUnit(TimeUnit)
.owner
- the owner frame, where messages are to be displayed. Can be set to null, too.state
- the statenewStateDuration
- the new state durationadjustFormat
- the adjust format. If true, the format of the duration will be adjusted according to the TimeUnit
of newStateDurationcurrentEnergyFlowMeasured
- the current EnergyFlowMeasured
, if this applies. Can be nullpublic Duration getStateDuration(State state)
state
- the statepublic static TimeUnit getStateFormatTimeUnit(State state)
state
- the statepublic Duration getDurationAsIntegerDuration(Duration duration, TimeUnit highestTimeUnitToStartAt)
duration
- the durationhighestTimeUnitToStartAt
- the highest time unit to start atpublic java.lang.Long getStateDurationMax(java.lang.String configID)
TechnicalInterfaceConfiguration
.configID
- the configID of the TechnicalInterfaceConfigurationpublic java.lang.Long getStateDurationMax(TechnicalInterfaceConfiguration tic)
TechnicalInterfaceConfiguration
.tic
- the TechnicalInterfaceConfigurationpublic long getStateDurationFromTechnicalSystemState(TechnicalSystemState tss)
tss
- the technical system state