public interface IPluginController
PluginControllerConfiguration
Modifier and Type | Field and Description |
---|---|
static int |
INVALID_INDEX |
Modifier and Type | Method and Description |
---|---|
void |
addPreSimulatableComponent(java.lang.String key,
com.velasolaris.plugin.controller.spi.IPreSimulatable component)
Adds an IPreSimulatable component.
|
void |
build(com.velasolaris.plugin.controller.spi.PolysunSettings polysunSettings,
java.util.Map<java.lang.String,java.lang.Object> parameters)
Method to pass Polysun properties to this plugin controller.
|
void |
closeResources()
Closes resources and cleans up.
|
int[] |
control(int simulationTime,
boolean status,
float[] sensors,
float[] controlSignals,
float[] logValues,
boolean preRun,
java.util.Map<java.lang.String,java.lang.Object> parameters)
Does the control work.
|
com.velasolaris.plugin.controller.spi.PluginControllerConfiguration |
getConfiguration(java.util.Map<java.lang.String,java.lang.Object> parameters)
Configuration of this plugin controllers.
|
java.util.List<java.lang.String> |
getControlSignalsToHide(com.velasolaris.plugin.controller.spi.PolysunSettings polysunSettings,
java.util.Map<java.lang.String,java.lang.Object> parameters)
Determines the controlSignals which must be hidden in the current configuration.
|
java.lang.String |
getCreator()
The creator of this plugin controller.
|
java.lang.String |
getDescription()
A short description of this plugin controller.
|
java.lang.String |
getDocumentation()
Documentation of this plugin controller.
|
int |
getFixedTimestep(java.util.Map<java.lang.String,java.lang.Object> parameters)
Fixed timestep.
|
java.lang.String |
getName()
The human readable name of the plugin controller.
|
java.util.List<java.lang.String> |
getPropertiesToHide(com.velasolaris.plugin.controller.spi.PolysunSettings polysunSettings,
java.util.Map<java.lang.String,java.lang.Object> parameters)
Determines the GUI properties which must be hidden in the current configuration.
|
java.util.List<java.lang.String> |
getSensorsToHide(com.velasolaris.plugin.controller.spi.PolysunSettings polysunSettings,
java.util.Map<java.lang.String,java.lang.Object> parameters)
Determines the sensors which must be hidden in the current configuration.
|
java.lang.String |
getVersion()
The version of this plugin controller.
|
void |
initialiseSimulation(java.util.Map<java.lang.String,java.lang.Object> parameters)
This method is called once before the simulation starts.
|
boolean |
isEnabled(java.util.Map<java.lang.String,java.lang.Object> parameters)
Is this plugin controller enabled?
|
boolean |
isPreSimulatableComponentAvailable(java.lang.String key)
Checks the availability of a pre-simulatable component.
|
void |
terminateSimulation(java.util.Map<java.lang.String,java.lang.Object> parameters)
This method is called once after the simulation.
|
static final int INVALID_INDEX
java.lang.String getName()
null
java.lang.String getCreator()
null
if there is creator.java.lang.String getVersion()
null
if there is no versionjava.lang.String getDescription()
null
if there is no descriptionjava.lang.String getDocumentation()
null
if there is no descriptionboolean isEnabled(java.util.Map<java.lang.String,java.lang.Object> parameters)
parameters
- Generic parameterstrue
if enabled, otherwise false
com.velasolaris.plugin.controller.spi.PluginControllerConfiguration getConfiguration(java.util.Map<java.lang.String,java.lang.Object> parameters) throws com.velasolaris.plugin.controller.spi.PluginControllerException
parameters
- Generic parametersnull
.com.velasolaris.plugin.controller.spi.PluginControllerException
- if there is a problem creating the plugin controller configuration.void build(com.velasolaris.plugin.controller.spi.PolysunSettings polysunSettings, java.util.Map<java.lang.String,java.lang.Object> parameters) throws com.velasolaris.plugin.controller.spi.PluginControllerException
polysunSettings
- The properties and settings of Polysunparameters
- Generic parameterscom.velasolaris.plugin.controller.spi.PluginControllerException
- if there is a problem creating the plugin controller configuration.java.util.List<java.lang.String> getPropertiesToHide(com.velasolaris.plugin.controller.spi.PolysunSettings polysunSettings, java.util.Map<java.lang.String,java.lang.Object> parameters)
polysunSettings
- The configuration Polysun, user settings of propertiesparameters
- Generic parametersjava.util.List<java.lang.String> getSensorsToHide(com.velasolaris.plugin.controller.spi.PolysunSettings polysunSettings, java.util.Map<java.lang.String,java.lang.Object> parameters)
polysunSettings
- The configuration Polysun, user settings of propertiesparameters
- Generic parametersjava.util.List<java.lang.String> getControlSignalsToHide(com.velasolaris.plugin.controller.spi.PolysunSettings polysunSettings, java.util.Map<java.lang.String,java.lang.Object> parameters)
polysunSettings
- The configuration Polysun, user settings of propertiesparameters
- Generic parametersint getFixedTimestep(java.util.Map<java.lang.String,java.lang.Object> parameters)
parameters
- General parametersvoid initialiseSimulation(java.util.Map<java.lang.String,java.lang.Object> parameters) throws com.velasolaris.plugin.controller.spi.PluginControllerException
parameters
- Generic parameterscom.velasolaris.plugin.controller.spi.PluginControllerException
- if there is a problemint[] control(int simulationTime, boolean status, float[] sensors, float[] controlSignals, float[] logValues, boolean preRun, java.util.Map<java.lang.String,java.lang.Object> parameters) throws com.velasolaris.plugin.controller.spi.PluginControllerException
simulationTime
- The simulation time in [s] beginning from the 1. January 00:00 (no leap year).status
- The status of this controller according to user settings,
true
means enabled,
false
disabled.
The status originates from the timer setting of the controller dialog. The user can enable
or disable the controller for certain hours, days or month.
This value should be respected by the controller implementation, otherwise it
could lead to an unexpected user experience.sensors
- The values of the sensors configured by the user (Input parameter).controlSignals
- The control signals set by this plugin controller (Output parameter).logValues
- The values to log in Polysun, e.g intermediate results. This value can be ignored.
These values are shown in the Simulation Analysis or in the Log and Parameterizing output.preRun
- Is this the real simulation or a pre run phase? This value can be ignored.parameters
- Generic parametersnull
if no additional timesteps are required.
These timesteps can be used for time based controlling strategies.com.velasolaris.plugin.controller.spi.PluginControllerException
- if there is a problem. The simulation will be aborted.void terminateSimulation(java.util.Map<java.lang.String,java.lang.Object> parameters)
parameters
- Generic parametersvoid closeResources()
void addPreSimulatableComponent(java.lang.String key, com.velasolaris.plugin.controller.spi.IPreSimulatable component)
AbstractPluginController
,
IPreSimulatable
boolean isPreSimulatableComponentAvailable(java.lang.String key)
initialiseSimulation(Map)
method is called.
Thus, this method will only return true during the simulation.true
if the component is available, false
otherwise.IPreSimulatable