3.5日常学习

matlab处理数据 

自己写了关于detect_data的函数,让它帮我改了,哈哈哈

%改正前

function data_chuli(path1,savepath)
    [num]=xlsread('path1',1,'B18:F23');
    a = num;
    b=a';
    c=b(:);
    xlswrite('savepath',c)
end
%改正后

function data_chuli(path1, savepath)
    num = xlsread(path1, 1, 'B18:F23');
    a = num;
    b = a';
    c = b(:);
    xlswrite(savepath, c);
end

test成功!!!! 

将xlsx文件转换成CSV文件方法

jupyter notebook成功,pycharm失败

调试问题与解决 

solution:python : 'gbk' codec can't decode byte 0xbe in position 18: illegal multibyte sequenc_gbk' codec can't decode byte 0xa2 in position 50: -CSDN博客

未报错,解决 

问题2

等我吃饭回来再解决。吃完了,休息一下下,来解决了!

明天要上两年的数据再看看

 

又读不懂代码了

for i in range(n):
        if (load_profile[i] - threshold) < 0 :
            if ess_cap >= max_cap :
                new_profile = np.append(new_profile, [load_profile[i]])
                ess_cap = max_cap
                abs_charge = np.append(abs_charge, [ess_cap])
            elif ess_cap < max_cap :
                if (threshold - load_profile[i]) < charge_rate :
                    new_profile = np.append(new_profile, [threshold])
                    ess_cap += (threshold - load_profile[i])
                    abs_charge = np.append(abs_charge, [ess_cap])
                else :
                    new_profile = np.append(new_profile, [load_profile[i]+charge_rate])
                    ess_cap += charge_rate
                    abs_charge = np.append(abs_charge, [ess_cap])

对于循环次数范围内的每个索引i:
- if 负载曲线中第i个数据减去阈值小于0:(负载曲线 < 阈值)
    - if 当前电池容量大于等于目标电池容量:
        - 将负载数据加入np.append()新的充电曲线中
        - 将电池容量设为目标电池容量
        - 将电池容量加入np.append()绝对充电量数据中
    - esif 当前电池容量小于目标电池容量:
        - if(阈值减去负载数据)小于充电速率:
            - 将阈值加入新的充电曲线中
            - 电池容量增加 +=(阈值减去负载数据)
            - 将电池容量加入np.append()绝对充电量数据中
        - else
            - 将(负载数据加上充电速率)加入np.append()新的充电曲线中
            - 电池容量增加 +=充电速率
            - 将电池容量加入np.append()绝对充电量数据中

elif load_profile[i] >= threshold :
            diff = (load_profile[i]-threshold)
            if diff <= ess_cap-(0.1)*max_cap :
                ess_cap -= diff
                abs_charge = np.append(abs_charge, [ess_cap])
                new_profile = np.append(new_profile, [threshold])
            elif diff > ess_cap-(0.1)*max_cap :
                new_profile = np.append(new_profile, [threshold+(diff-(ess_cap-(0.1)*max_cap))])
                ess_cap = (0.1)*max_cap
                abs_charge = np.append(abs_charge, [ess_cap])
    return new_profile, abs_charge

 if 负载曲线中第i个数据大于等于阈值:(负载曲线 > 阈值)
- 计算负载数据与阈值之间的差值diff
- if diff小于等于电池剩余容量减去0.1倍目标电池容量:
    - 减去diff的容量值,更新电池剩余容量
    - 将电池剩余容量加入绝对充电量数据中
    - 将阈值加入新的充电曲线中
- 否则如果diff大于电池剩余容量减去0.1倍目标电池容量:
    - 将(阈值加上diff减去(电池剩余容量减去0.1倍目标电池容量))加入新的充电曲线中
    - 将电池剩余容量设为0.1倍目标电池容量
    - 将电池剩余容量加入绝对充电量数据中
- 返回新的充电曲线和绝对充电量数据

进行综合能源系统优化调度需要以下数据:
1. 各种能源资源的供给情况,包括电力、燃气、热能等;
2. 能源系统的负荷需求数据,即各个能源设备的负荷需求情况;


3. 各种能源设备的性能参数,包括效率、启停时间、最大/最小输出等;
4. 能源价格数据,包括电价、燃气价格等;
5. 系统约束条件,如设备的运行限制、能源供给的约束条件等;
6. 优化目标函数,即需要优化的目标,如成本最小、排放最低等。

综合能源系统优化调度需要综合考虑以上数据,并通过数学建模和优化算法来实现系统的最优调度。

  • 13
    点赞
  • 24
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值