Interfaces#
The hycon.interfaces module contains a library of interfaces for connecting
Hycon with various simulation platforms and other repositories. Each controller
run will require an interface, which is an instantiated object of a class
in this library. All interface classes should inherit from InterfaceBase,
which can be found n interface_base.py, and should implement three methods:
get_measurements(): Receive measurements from simulation assets and organize into a dictionary that the calling controller can utilize. Optionally, receives a large dictionary (for example, the Herculesmain_dict), from which useable measurements can be extracted/repackaged for easy use in the controller.check_controls(): Check that the keys incontrols_dictare viable for the receiving plant.send_controls(): Send controls to the simulation assets. Controls are created as specific keyword arguments, which match those controls generated by the calling controller. Optionally, receives a large dictionary (for example, the Herculesmain_dict), which can be written to and returned with controls as needed.
These methods will all be called in the step() method of ControllerBase.
Available interfaces#
HerculesInterface#
For direct python communication with the latest version of Hercules. This should be instantiated
in a runscript that is running Hercules; used to generate a controller from the Hycon controllers submodule; and that controller should be passed to the
HerculesModel after instantiation via HerculesModel.assign_controller(). The main purpose for this interface is for sending power reference signals to various types of hybrid plant components modeled in Hercules (and receiving state measurements from the components as well as external signals like electricity price).
Interfaces in development#
ROSCO_ZMQInterface#
For sending and receiving communications from one or more ROSCO instances (which are likely connected to OpenFAST and FAST.Farm). Uses ZeroMQ to pass messages between workers.
Deprecated interfaces#
HerculesADInterface#
For direct python communication with Hercules v1. This should be instantiated
in a runscript that is running Hercules; used to generate a controller from
the Hycon controllers submodule; and that controller should be passed to the
Hercules Emulator upon its instantiation. Support transmitting yaw angles
and power setpoints to wind turbines.
HerculesHybridADInterface#
For direct python communication with Hercules v1, when simulating a hybrid wind/solar/battery plant. Also handles Hercules’ hydrogen modules. Supports sending power reference signals to each wind turbine in a wind farm, as well as a bulk power signal to the solar farm and a bulk power signal to the battery.