public abstract class AbstractSensorController extends AbstractSingleComponentController
INVALID_INDEX
Constructor and Description |
---|
AbstractSensorController() |
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.
|
disconnect
getCreator, getPropertiesToHide, getVersion, initialiseSimulation, terminateSimulation
addPreSimulatableComponent, build, closeResources, exportResource, getControlSignal, getControlSignalIndex, getControlSignals, getControlSignalsToHide, getControlSignalsUsed, getCSIdx, getDescription, getDocumentation, getFixedTimestep, getId, getLogs, getProp, getProperty, getPropertyIndex, getPropertyValue, getPropertyValue, getSensor, getSensor, getSensorIndex, getSensors, getSensorsToHide, getSnIdx, isEnabled, isPreSimulatableComponentAvailable, setControlSignal
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
public AbstractSensorController() throws com.velasolaris.plugin.controller.spi.PluginControllerException
com.velasolaris.plugin.controller.spi.PluginControllerException
public 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 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.