A simple case for PSCAD-Fortran RL program
A project of power system needs to be simulated in PSCAD, and it utilizes some advanced Refincement Learning algorithms to control the simulation. Since PSCAD does not provide a API that can some advanced languages like Python can directly use, so try to write RL algorithm in Fortran.
PSCAD can create a self-defined component, in which a like-Fortran code can be written to call a Fortran subroutine. The key is how to transfer the data between those softwares.
A typic second order system, refer to PSCAD_DDPG.pscx The main RL algorithm, refer to ddpg.f90
The multiple programing is based on PSCAD 4.6.3, Intel Fortran compiler, VS 2019.
Almost run through all the procedures, however, for the training of actor network in DDPG algorithm, do not have a idea of how to update it since we do not have a auto-differentiation tool in this Fortran-based NN framework.
(Put this aside)
Credits: The neral network structure: Neural Fortran https://github.com/modern-fortran/neural-fortran