A method of modelling a layout of a photovoltaic, PV, system by energy output evaluation of the PV system and of using the modelling, characterised in that the modelling comprises querying a simulation application program interface, API, with PV system configuration parameters as arguments; generating a shade loss time series based on the system configuration parameters, wherein the shade loss time series is generated based on a trained machine learning opto-electrical shade model, wherein training the machine learning opto-electrical shade model includes: receiving a range of values for an irradiance ratio at a diode equivalent circuit model, wherein the irradiance ratio corresponds to a diffuse sunlight irradiance to plane of array direct sunlight irradiance ratio; receiving a shade ratio for each sub-circuit in a solar module of the PV system, wherein ray tracing techniques are applied to a three-dimensional, 3D, site geometry to calculate cell string level shade ratios for one or more cell strings of each sub-circuit; and generating a training dataset comprising an electrical response determined at least in part by the diode equivalent circuit model based on all possible combinations of the range of values for the irradiance ratio and each cell string level shade ratio; simulating energy output for the PV system based on the shade loss time series; outputting energy aggregations based on the simulation; and wherein using the modelling comprises the post commissioning optimisation of the PV system by reconfiguring the layout of the PV system using unmanned aerial vehicle, UAV, mapping, wherein infrared optical image data gathered from UAVs are used in combination with the modelling to fit the modelling to field data in a case where the detailed layouts of arrays of the PV system are not known beforehand, thereby optimising the layouts of cell strings of the arrays. querying a simulation application program interface, API, with PV system configuration parameters as arguments; generating a shade loss time series based on the system configuration parameters, wherein the shade loss time series is generated based on a trained machine learning opto-electrical shade model, wherein training the machine learning opto-electrical shade model includes: receiving a range of values for an irradiance ratio at a diode equivalent circuit model, wherein the irradiance ratio corresponds to a diffuse sunlight irradiance to plane of array direct sunlight irradiance ratio; receiving a shade ratio for each sub-circuit in a solar module of the PV system, wherein ray tracing techniques are applied to a three-dimensional, 3D, site geometry to calculate cell string level shade ratios for one or more cell strings of each sub-circuit; and generating a training dataset comprising an electrical response determined at least in part by the diode equivalent circuit model based on all possible combinations of the range of values for the irradiance ratio and each cell string level shade ratio; receiving a range of values for an irradiance ratio at a diode equivalent circuit model, wherein the irradiance ratio corresponds to a diffuse sunlight irradiance to plane of array direct sunlight irradiance ratio; receiving a shade ratio for each sub-circuit in a solar module of the PV system, wherein ray tracing techniques are applied to a three-dimensional, 3D, site geometry to calculate cell string level shade ratios for one or more cell strings of each sub-circuit; and generating a training dataset comprising an electrical response determined at least in part by the diode equivalent circuit model based on all possible combinations of the range of values for the irradiance ratio and each cell string level shade ratio; simulating energy output for the PV system based on the shade loss time series; outputting energy aggregations based on the simulation; and wherein using the modelling comprises the post commissioning optimisation of the PV system by reconfiguring the layout of the PV system using unmanned aerial vehicle, UAV, mapping, wherein infrared optical image data gathered from UAVs are used in combination with the modelling to fit the modelling to field data in a case where the detailed layouts of arrays of the PV system are not known beforehand, thereby optimising the layouts of cell strings of the arrays.