public class GenericForteController extends AbstractSingleComponentController
IForteSocket
,
CommLayerParams
,
IPluginController
INVALID_INDEX
Constructor and Description |
---|
GenericForteController() |
Modifier and Type | Method and Description |
---|---|
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.lang.String |
getDescription()
A short description of this plugin controller.
|
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 propertyValues,
java.util.Map<java.lang.String,java.lang.Object> parameters)
Determines the GUI properties 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.
|
disconnect
getCreator, terminateSimulation
addPreSimulatableComponent, build, closeResources, exportResource, getControlSignal, getControlSignalIndex, getControlSignals, getControlSignalsToHide, getControlSignalsUsed, getCSIdx, getDocumentation, getFixedTimestep, getId, getLogs, getProp, getProperty, getPropertyIndex, getPropertyValue, getPropertyValue, getSensor, getSensor, getSensorIndex, getSensors, getSensorsToHide, getSnIdx, isEnabled, isPreSimulatableComponentAvailable, setControlSignal
public GenericForteController() throws com.velasolaris.plugin.controller.spi.PluginControllerException
com.velasolaris.plugin.controller.spi.PluginControllerException
public java.lang.String getName()
IPluginController
null
public java.lang.String getDescription()
IPluginController
getDescription
in interface IPluginController
getDescription
in class AbstractPluginController
null
if there is no descriptionpublic java.lang.String getVersion()
IPluginController
getVersion
in interface IPluginController
getVersion
in class Abstract4diacPluginController
null
if there is no versionpublic com.velasolaris.plugin.controller.spi.PluginControllerConfiguration getConfiguration(java.util.Map<java.lang.String,java.lang.Object> parameters) throws com.velasolaris.plugin.controller.spi.PluginControllerException
IPluginController
parameters
- Generic parametersnull
.com.velasolaris.plugin.controller.spi.PluginControllerException
- if there is a problem creating the plugin controller configuration.public void initialiseSimulation(java.util.Map<java.lang.String,java.lang.Object> parameters) throws com.velasolaris.plugin.controller.spi.PluginControllerException
IPluginController
initialiseSimulation
in interface IPluginController
initialiseSimulation
in class Abstract4diacPluginController
parameters
- Generic parameterscom.velasolaris.plugin.controller.spi.PluginControllerException
- if there is a problempublic java.util.List<java.lang.String> getPropertiesToHide(com.velasolaris.plugin.controller.spi.PolysunSettings propertyValues, java.util.Map<java.lang.String,java.lang.Object> parameters)
IPluginController
getPropertiesToHide
in interface IPluginController
getPropertiesToHide
in class Abstract4diacPluginController
propertyValues
- The configuration Polysun, user settings of propertiesparameters
- Generic parameterspublic int[] 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
IPluginController
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.