VEFramework.VEDriversLite.EntitiesBlocks 0.4.3

dotnet add package VEFramework.VEDriversLite.EntitiesBlocks --version 0.4.3
NuGet\Install-Package VEFramework.VEDriversLite.EntitiesBlocks -Version 0.4.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="VEFramework.VEDriversLite.EntitiesBlocks" Version="0.4.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add VEFramework.VEDriversLite.EntitiesBlocks --version 0.4.3
#r "nuget: VEFramework.VEDriversLite.EntitiesBlocks, 0.4.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install VEFramework.VEDriversLite.EntitiesBlocks as a Cake Addin
#addin nuget:?package=VEFramework.VEDriversLite.EntitiesBlocks&version=0.4.3

// Install VEFramework.VEDriversLite.EntitiesBlocks as a Cake Tool
#tool nuget:?package=VEFramework.VEDriversLite.EntitiesBlocks&version=0.4.3

VEDriversLite.EntitiesBlocks

Knihovna VEDriversLite.EntitiesBlocks obsahuje obecné jádro pro práci s časově ohraničenými bloky vyjadřujícími určitou hodnotu. Ačkoli je primárně zaměřena na výpočty distribuce energií, je její základní model obecný a může být využit v různých oblastech, jako je plánování cashflow, zaznamenávání časů na projektu, distribuce vzduchu a další.

Základní struktura knihovny


classDiagram
    IEntity <|-- IConsumer
    IEntity <|-- ISource
    IEntity <-- CommonEntity

    class IEntityHandler {
        +List IEntitities
    }
    IEntityHandler <-- CommonEntityHandler
    class CommonEntityHandler {
    }
    class IBlock {
    }
    IBlock <-- CommonBlock 
    class CommonBlock{
    }

    class IEntity {
      +List Children
      +List Simulators 
      +List Blocks
    }
    class CommonEntity {
    }
    class IConsumer {
      + Type
    }
    IConsumer <-- CommonConsumer
    CommonEntity <-- CommonConsumer
    class CommonConsumer {
    }
    CommonConsumer <-- Device
    class Device {
    }
    CommonConsumer <-- DeviceGroup
    class DeviceGroup {
    }
    CommonConsumer <-- GroupNetwork
    class GroupNetwork {
    }

    class ISource {
      + Type
    }
    ISource <-- CommonSource
    CommonEntity <-- CommonSource
    class CommonSource {
    }
    CommonSource <-- PVESource
    class PVESource {
    }
    CommonSource <-- BatteryStorage
    class BatteryStorage {
    }
    CommonSource <-- PowerGridSupplier
    class PowerGridSupplier {
    }

    class ISimulator {
    }
    ISimulator <-- CommonSimulator
    class CommonSimulator {
    }
    CommonSimulator <-- ConsumerTDDSimulator
    class ConsumerTDDSimulator {
    }
    CommonSimulator <-- PVPanelsGroupsHandler
    class PVPanelsGroupsHandler {
    }
    CommonSimulator <-- Bat

Instalace

Pro instalaci knihovny pomocí NuGet:


Install-Package VEDriversLite.EntitiesBlocks

Hello World


using VEDriversLite.EntitiesBlocks.Blocks;
using VEDriversLite.EntitiesBlocks.Consumers;
using VEDriversLite.EntitiesBlocks.Entities;
using VEDriversLite.EntitiesBlocks.Handlers;

var eGrid = new BaseEntitiesHandler();

var network = new GroupNetwork() { Type = EntityType.Consumer, Name = "house", ParentId = "parentUniqueID" };
var res = eGrid.AddEntity(network, "house", "parentUniqueID");
if (res.Item1)
{
    double[] acRun = new double[24]
                {
                0.2, 0.2, 0.2, 0.2, 0.2, 0.3, 0.3, 0.4, 0.4, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.4, 0.4, 0.3, 0.3, 0.2, 0.2, 0.2, 0.2
                    //  00,  01,  02,  03,  04,  05, 06,  07,  08,  09,  10,  11,  12,  13,  14,  15,  16,  17,  18,  19,  20,  21,  22,  23 
                };

    _ = network.AddSimulator(new DeviceSimulator(acRun, 1));


    var bilance = eGrid.GetConsumptionOfEntity(network.Id,
                                                       BlockTimeframe.Hour,
                                                       new DateTime(2023,09,24),
                                                       new DateTime(2023,09,25),
                                                       true,
                                                       true,
                                                       new List<BlockDirection>() { BlockDirection.Created, BlockDirection.Consumed },
                                                       new List<BlockType>() { BlockType.Simulated });

    await Console.Out.WriteLineAsync($"---------------------------------------:");
    await Console.Out.WriteLineAsync($"Calculated Data:");
    var total = 0.0;
    foreach (var block in bilance)
    {
        await Console.Out.WriteLineAsync($"\t{block.StartTime.ToString("yyyy_MM_dd-hh:mm")} - {block.EndTime.ToString("yyyy_MM_dd-hh:mm")}, Amount: {Math.Round(block.Amount, 2)} kWh.");
        total += block.Amount;
    }
    await Console.Out.WriteLineAsync($"Total Bilance: {total} kWh");
    await Console.Out.WriteLineAsync("--------------------END------------------:");

}

Simulátory

Knihovna obsahuje různé simulátory, včetně simulátoru PVE, který dokáže simulovat pozice slunce a vypočítat výkon z umístěných panelů pod určitým úhlem a azimutem. Dále je možné přidat simulaci uložiště i spotřebičů různým způsobem. Článek věnovaný simulátorům je zde.

Více informací

Pro podrobnější informace o knihovně a jejím využití navštivte naši wiki.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on VEFramework.VEDriversLite.EntitiesBlocks:

Package Downloads
VEFramework.VEBlazor.EntitiesBlocks

Blazor Component library for .NET drivers for calculation of the entities and its time based blocks with specfic amount.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.4.3 134 9/28/2023
0.4.2 129 9/24/2023
0.4.1 132 8/16/2023
0.4.0 126 8/16/2023

- SunMoon calc now returns time based on timezone known from lat/lon
 - Added loading of simulators from config