GetDevicePower

本文提供了一个 MSDN 文档的引用示例链接,并附带了原文的转载链接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

车间生产有一台用电设备 他每次运行24-32小时,开机后后台每十分钟记录一次功率变化,因为一天24小时电价是波动的,现在想要根据一次运行期间记录的功率数据和一天24小时内每小时的电价数据,开发一款自动计算设备最佳开机时间的软件 其中运行时间不是固定的 需要传入参数 提供C#代码其中电价和功率存储在数据中 使用sqlsugar获取 ///<summary> ///区间电价表 ///</summary> [SugarTable("ElectricityPrices")] public partial class ElectricityPrices { public ElectricityPrices() { } /// <summary> /// Description: /// DefaultValue: /// Nullable:False /// <summary> /// [Browsable(false)] [DisplayName("")] [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] public int ID { get; set; } /// <summary> /// Description:起始时间 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("起始时间")] public DateTime StartTime { get; set; } /// <summary> /// Description:结束时间 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("结束时间")] public DateTime EndTime { get; set; } /// <summary> /// Description:价格 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("价格")] public decimal? Price { get; set; } }///<summary> ///电炉功率记录表 ///</summary> [SugarTable("PowerData")] public partial class PowerData { public PowerData() { } /// <summary> /// Description: /// DefaultValue: /// Nullable:False /// <summary> /// [Browsable(false)] [DisplayName("")] [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] public int ID { get; set; } /// <summary> /// Description:炉号 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("炉号")] public string Lh { get; set; } /// <summary> /// Description:时间 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("时间")] public DateTime Time { get; set; } /// <summary> /// Description:功率 /// DefaultValue: /// Nullable:True /// <summary> /// [Browsable(false)] [DisplayName("功率")] public int? Power { get; set; } }
最新发布
06-14
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值