There are two simulators available now. The PVESimulator and TDD Consumption simulator (battery is WIP). Both are used in the demo.
The simulators are called when the Summedvalue of entity is requested. It is here. This function creates empty result blocks and combines them with simulated blocks if any simulator is available. The call of simulators is here. It can load some parameters/options for simulator or some input DataProfiles or IBlocks lists. This function can be called for draw graph of day simulation of production or consumption also.
GetConsumptionOfEntity function has new parameter now. It allow the simulators during calculation. For example here it is off. It is last bool parameter of this function. In this phase of calculation the blocks are already created, recalculated (based on cover of consumption by PVE) and added to entities. Oposite, at start of calculation there was no blocks in entities so simulators flag was on to create new blocks by simulators during calculating summedvalues of entity.
The simulation of entity blocks are used in the demo calculation in energy demo app.
This merge brings ISimulator interface to provide simulator of consumption or production of blocks inside of IEntity.
Each IEntity has dictionary of the simulators. Simulator can be loaded through handler or directly through IEntity object.
There are two simulators available now. The PVESimulator and TDD Consumption simulator (battery is WIP). Both are used in the demo.
The simulators are called when the Summedvalue of entity is requested. It is here. This function creates empty result blocks and combines them with simulated blocks if any simulator is available. The call of simulators is here. It can load some parameters/options for simulator or some input DataProfiles or IBlocks lists. This function can be called for draw graph of day simulation of production or consumption also.
GetConsumptionOfEntity function has new parameter now. It allow the simulators during calculation. For example here it is off. It is last bool parameter of this function. In this phase of calculation the blocks are already created, recalculated (based on cover of consumption by PVE) and added to entities. Oposite, at start of calculation there was no blocks in entities so simulators flag was on to create new blocks by simulators during calculating summedvalues of entity.
The simulation of entity blocks are used in the demo calculation in energy demo app.