mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
实现策略配置功能
This commit is contained in:
@@ -2,27 +2,35 @@
|
||||
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
#include "common/Fields.h"
|
||||
|
||||
class Device;
|
||||
|
||||
class Station
|
||||
{
|
||||
public:
|
||||
Station(int id);
|
||||
Station();
|
||||
|
||||
void setFields(Fields& fields);
|
||||
|
||||
void addDevice(int deviceId, std::shared_ptr<Device> device);
|
||||
std::shared_ptr<Device> getDevice(int deviceId);
|
||||
|
||||
void getDeviceByType(int typeId, std::vector<std::shared_ptr<Device>>& res);
|
||||
int getDeviceNumByGroup(std::string name);
|
||||
void getDeviceByGroup(std::string name, std::vector<std::shared_ptr<Device>>& res);
|
||||
|
||||
void setWorkMode(int modeId);
|
||||
void setPolicy(int policyId);
|
||||
|
||||
|
||||
|
||||
public:
|
||||
int id {};
|
||||
std::string name;
|
||||
|
||||
int workModeId; // 运行模式
|
||||
int runPolicyId; // 运行策略
|
||||
int workModeId {}; // 运行模式
|
||||
int runPolicyId {}; // 运行策略
|
||||
|
||||
// 储能容量
|
||||
double energyCapacity {};
|
||||
@@ -77,5 +85,7 @@ public:
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// === 设备信息 ===
|
||||
std::unordered_map<int, std::shared_ptr<Device>> mapDevice_;
|
||||
std::unordered_map<int, std::shared_ptr<Device>> mapDevice;
|
||||
|
||||
std::map<std::string, int> mapDeviceGroupNum;
|
||||
};
|
||||
Reference in New Issue
Block a user