当前位置: 首页 > news >正文

【机会约束、鲁棒优化】机会约束和鲁棒优化研究优化【ccDCOPF】研究(Matlab代码实现)

 

💥💥💞💞欢迎来到本博客❤️❤️💥💥

🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。

⛳️座右铭:行百里者,半于九十。

📋📋📋本文目录如下:🎁🎁🎁

目录

💥1 概述

📚2 运行结果

🎉3 参考文献

🌈4 Matlab代码实现


💥1 概述

随机规划的三个分支分别为期望值模型、机会约束规划和相关机会规划。机会约束规划是继期望值模型之后,由A. Charnes和 W.W. Cooper于 1959年提出的第二类随机规划[33]。CCP是考虑到所做决策在不利情况发生时可能不满足约束条件而采用的一种原则:即允许所做决策在一定程度上不满足约束条件,但该决策使约束条件成立的概率不小于某一置信水平。一般形式的机会约束可表示为:

CCP 是处理随机规划问题的经典方法之一,其主要利用概率形式约束处理约束条件中含有随机变量的优化问题,CCP 方法具有以下特点:

(1)为了有效处理含随机变量的约束问题,CCP 将传统规划模型中的硬约束变为概率形式约束,以实现考虑随机变量的大概率事件,减小低概率极端事件对最优解的影响,一定程度上提高了最优解的合理性。

(2)对于问题中的随机变量,仅在约束中以机会约束的形式进行体现,未在目标函数中予以反映,而规划问题的最优解与概率约束的置信水平直接相关,且其置信水平可根据决策者的风险偏好或实际经验进行设定。

(3)当模型中含有多个机会约束时,在优化过程中将予以同等对待,无主次顺序之分。

(4)CCP 模型的求解过程中常需利用 MCS 过程和智能算法,其求解过程较为复杂,求解效率与结果质量都受到一定影响;若通过解析法求解则需较复杂的数学推导,以上因素在一定程度上了限制了 CCP 方法在复杂问题中的应用。

📚2 运行结果

 

 

部分代码:

clear; clc; close all;

fig_size = [10,10,800,400];
beta = 10^(-2);

% casename = 'ex_case3sc'; N = 100;
casename = 'ex_case24_ieee_rts'; N = 2048;

eps_scale = 0.01:0.01:0.1;

result_sa = load([casename,'-scenario approach-results.mat']);
result_ca = load([casename,'-convex approximation-type-results-N=',num2str(N),'.mat']);
result_saa = load([casename,'-sample average approximation-sampling and discarding-results-N=',num2str(N),'.mat']);
result_rc = load([casename,'-robust counterpart-results-N=',num2str(N),'.mat']);
% result_lb = load([casename,'-obj-lower-bound.mat']);

f_eps = figure('Position', fig_size);
lgd_str = {};
plot(eps_scale,eps_scale,'g-.','LineWidth',2), hold on, lgd_str = [lgd_str,'ideal case'];
plot(nanmean(result_sa.eps_pri,2), nanmean(result_sa.eps_empirical,2),'-x','LineWidth',2), hold on, lgd_str = [lgd_str,'SA:priori'];
plot(nanmean(result_sa.eps_post,2), nanmean(result_sa.eps_empirical,2),'-*','LineWidth',2), hold on, lgd_str = [lgd_str,'SA:posteriori'];
plot(result_saa.epsilons, nanmean(result_saa.eps_empirical,2),'-o','LineWidth',2), hold on, lgd_str = [lgd_str,'SAA:s&d'];
plot(result_rc.eps, nanmean(result_rc.eps_empirical_box,2)*ones(size(result_rc.eps)),'--v','LineWidth',2), hold on, lgd_str = [lgd_str,'RC:box'];
% plot(result_rc.eps, nanmean(result_rc.eps_empirical_ball,2),':v','LineWidth',2), hold on, lgd_str = [lgd_str,'RC:ball'];
% plot(result_rc.eps, nanmean(result_rc.eps_empirical_ballbox,2),'-v','LineWidth',2), hold on, lgd_str = [lgd_str,'RC:ballbox'];
% plot(result_rc.eps, nanmean(result_rc.eps_empirical_budget,2),'-.v','LineWidth',2), hold on, lgd_str = [lgd_str,'RC:budget'];
plot(result_ca.eps, nanmean(result_ca.eps_empirical,2),'-d','LineWidth',2), hold on, lgd_str = [lgd_str,'CA:markov'];
legend(lgd_str,'Location','NorthWest')
set(gca,'yscale','log')
% xlim([0,0.9]), ylim([1e-4 10])
xlim([0,0.12]), ylim([1e-3 0.2])
xlabel('violation probability (setting)'),ylabel('violation probability (out-of-sample)')
set(gca,'FontSize',12,'fontname','times')
print(f_eps,'-depsc','-painters',[casename,'-all-methods-epsilon.eps'])
 
f_eps_err = figure('Position', fig_size);
lgd_str = {};
% plot(eps_scale,eps_scale,'g-.','LineWidth',2), hold on, lgd_str = [lgd_str,'ideal case'];
errorbar(nanmean(result_sa.eps_pri,2), nanmean(result_sa.eps_empirical,2),nanstd(result_sa.eps_empirical,[],2),'-x','LineWidth',2), hold on, lgd_str = [lgd_str,'SA:priori'];
errorbar(nanmean(result_sa.eps_post,2), nanmean(result_sa.eps_empirical,2),nanstd(result_sa.eps_empirical,[],2),'-*','LineWidth',2), hold on, lgd_str = [lgd_str,'SA:posteriori'];
errorbar(result_saa.epsilons, nanmean(result_saa.eps_empirical,2),nanstd(result_saa.eps_empirical,[],2),'-o','LineWidth',2), hold on, lgd_str = [lgd_str,'SAA:s&d'];
plot(result_rc.eps, nanmean(result_rc.eps_empirical_box,2)*ones(size(result_rc.eps)),'--v','LineWidth',2), hold on, lgd_str = [lgd_str,'RC:box'];
errorbar(result_rc.eps, nanmean(result_rc.eps_empirical_ball,2),nanstd(result_rc.eps_empirical_ball,[],2),':v','LineWidth',2), hold on, lgd_str = [lgd_str,'RC:ball'];
errorbar(result_rc.eps, nanmean(result_rc.eps_empirical_ballbox,2),nanstd(result_rc.eps_empirical_ballbox,[],2),'-v','LineWidth',2), hold on, lgd_str = [lgd_str,'RC:ballbox'];
% errorbar(result_rc.eps, nanmean(result_rc.eps_empirical_budget,2),nanstd(result_rc.eps_empirical_budget,[],2),'-.v','LineWidth',2), hold on,
errorbar(result_ca.eps, nanmean(result_ca.eps_empirical,2), nanstd(result_ca.eps_empirical,[],2),'-d','LineWidth',2), hold on, lgd_str = [lgd_str,'CA:markov'];
legend(lgd_str,'Location','NorthWest')
% xlim([0,0.12])
xlim([0,0.09])
% ylim([0,0.09])
xlabel('violation probability (setting)'),ylabel('violation probability (out-of-sample)')
set(gca,'FontSize',12,'fontname','times')
print(f_eps_err,'-depsc','-painters',[casename,'-all-methods-epsilon-errorbar.eps'])

f_obj = figure('Position', fig_size);
lgd_str = {};
% plot(result_lb.epsilons, result_lb.obj_low, ':^'), hold on,
% plot(nanmean(result_sa.eps_pri,2), nanmean(result_sa.obj,2),'-x','LineWidth',2), hold on, lgd_str = [lgd_str,'SA:priori'];
% plot(nanmean(result_sa.eps_post,2), nanmean(result_sa.obj,2),'-*','LineWidth',2), hold on, lgd_str = [lgd_str,'SA:posteriori'];
% plot(result_saa.epsilons, nanmean(result_saa.obj,2),'-o','LineWidth',2), hold on, lgd_str = [lgd_str,'SAA:s&d'];
plot(result_rc.eps, nanmean(result_rc.obj_box,2)*ones(size(result_rc.eps)),'--v','LineWidth',2), hold on, lgd_str = [lgd_str,'RC:box'];
plot(result_rc.eps, nanmean(result_rc.obj_ball,2),':v','LineWidth',2), hold on, lgd_str = [lgd_str,'RC:ball'];
plot(result_rc.eps, nanmean(result_rc.obj_ballbox,2),'-v','LineWidth',2), hold on, lgd_str = [lgd_str,'RC:ballbox'];
% plot(result_rc.eps, nanmean(result_rc.obj_budget,2),'-.v','LineWidth',2), hold on,
% plot(result_ca.eps, nanmean(result_ca.obj, 2),'-d','LineWidth',2), hold on, lgd_str = [lgd_str,'CA:markov'];
legend(lgd_str)
xlabel('violation probability \epsilon (setting)'),ylabel('objective value')
xlim([0 0.1])
set(gca,'FontSize',12,'fontname','times')
print(f_obj,'-depsc','-painters',[casename,'-all-methods-objective.eps'])
 

% f_obj_emp = figure('Position', fig_size);
% % plot(result_lb.epsilons, result_lb.obj_low,'-^'), hold on,
% [result_sa_eps_empirical,indices] = sort( nanmean(result_sa.eps_empirical,2),'ascend' );
% plot(result_sa_eps_empirical, nanmean(result_sa.obj(indices,:),2),'-v'), hold on,
% [result_saa_eps_empirical,indices] = sort( nanmean(result_saa.eps_empirical,2),'ascend' );
% plot(result_saa_eps_empirical, nanmean(result_saa.obj(indices,:),2),'-d'), hold on,
% [result_rc_eps_empirical_box,indices] = sort( nanmean(result_rc.eps_empirical_box,2),'ascend' );
% plot(result_rc_eps_empirical_box, nanmean(result_rc.obj_box(indices,:),2),'-*'), hold on,
% [result_rc_eps_empirical_ball,indices] = sort( nanmean(result_rc.eps_empirical_ball,2),'ascend' );
% plot(result_rc_eps_empirical_ball, nanmean(result_rc.obj_ball(indices,:),2),'-*'), hold on,
% [result_rc_eps_empirical_ballbox,indices] = sort( nanmean(result_rc.eps_empirical_ballbox,2),'ascend' );
% plot(result_rc_eps_empirical_ballbox, nanmean(result_rc.obj_ballbox(indices,:),2),'-x'), hold on,
% [result_rc_eps_empirical_budget,indices] = sort( nanmean(result_rc.eps_empirical_budget,2),'ascend' );
% plot(result_rc_eps_empirical_budget, nanmean(result_rc.obj_budget(indices,:),2),'-x'), hold on,
% [result_ca_eps_empirical,indices] = sort( nanmean(result_ca.eps_empirical,2),'ascend' );
% plot(result_ca_eps_empirical, nanmean(result_ca.obj,2),'-d','LineWidth',2), hold on,
% % legend('lower bound','SA','SAA:s&d','RC:box','RC:ball','RC:ballbox','RC:budget')
% legend('SA','SAA:s&d','RC:box','RC:ball','RC:ballbox','RC:budget','CA:markov')
% set(gca,'xscale','log')
% xlim([0 0.06])

🎉3 参考文献

部分理论来源于网络,如有侵权请联系删除。

[1]付波,邓竞成,康毅恒.基于机会约束的园区综合能源系统优化调度[J].湖北工业大学学报,2023,38(01):11-14+32.

[2]耿晓路. 分布鲁棒机会约束优化问题的研究[D].湘潭大学,2018.

[3]王扬. 基于机会约束目标规划的含风电电力系统优化调度研究[D].华北电力大学(北京),2017.

🌈4 Matlab代码实现

相关文章:

【机会约束、鲁棒优化】机会约束和鲁棒优化研究优化【ccDCOPF】研究(Matlab代码实现)

💥💥💞💞欢迎来到本博客❤️❤️💥💥 🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。 ⛳️座右铭&a…...

4月想跳槽的同学,没有更好的选择,可以去美团

在美团干了半年,说一下自己的感受,美团是一家福利中等,工资待遇中上,高层管理团队强大,加班强度一般,技术不错,办公环境一般,工作氛围中上,部门差距之间工作体验差距巨大…...

从输入url到页面展现(一)从浏览器解析url开始

前端面试有一道很考验人的问题,那就是:请你说一下从用户从输入url到页面展现的过程是怎样的?在接下来的一段时间呢,狗哥会从这一问题出发,开始剖析这个过程,希望可以让更多的小伙伴掌握到这个过程&#xff…...

购物 · 礼物

标题 前言必学场景词汇及用法书店花店玩具店讨价还价情境常用单词书店花店玩具店前言 加油 必学场景词汇及用法 书店 1.book store / book shop 书店 I browsed through the book store, but I didn’t find the book I was looking for. 我把书店里的书浏览了一番,但是没…...

可视化图表API格式要求有哪些?Sugar BI详细代码示例(2)

Sugar BI中的每个图表可以对应一个数据 API,用户浏览报表时,选定一定的过滤条件,点击「查询」按钮将会通过 API 拉取相应的数据;前面说过,为了确保用户数据的安全性,Sugar BI上的所有数据请求都在Sugar BI的…...

153. 寻找旋转排序数组中的最小值

已知一个长度为 n 的数组,预先按照升序排列,经由 1 到 n 次 旋转 后,得到输入数组。例如,原数组 nums [0,1,2,4,5,6,7] 在变化后可能得到: 若旋转 4 次,则可以得到 [4,5,6,7,0,1,2] 若旋转 7 次&#xff0…...

Linux 文件描述符

Linux 文件描述符 Linux 中一切皆文件,比如 C 源文件、视频文件、Shell脚本、可执行文件等,就连键盘、显示器、鼠标等硬件设备也都是文件。 一个 Linux 进程可以打开成百上千个文件,为了表示和区分已经打开的文件,Linux 会给每个…...

第17章_反射机制

第17章_反射机制 讲师:尚硅谷-宋红康(江湖人称:康师傅) 官网:http://www.atguigu.com 本章专题与脉络 1. 反射(Reflection)的概念 1.1 反射的出现背景 Java程序中,所有的对象都有两种类型:编…...

使用VBA小程序提高资产清查效率

资产清查是一件相当烦人的工作,去年使用LayUIPHPMS SQL Server 2014写了一个资产清查的程序,可惜写完了,LayUI已经停止更新了,就没有再完善下去,数据也没有更新,等于就废了。 今年又要进行资产清查&#xf…...

JavaSE学习进阶day07_02 异常

第三章 异常 3.1 异常概念 异常,就是不正常的意思。在生活中:医生说,你的身体某个部位有异常,该部位和正常相比有点不同,该部位的功能将受影响.在程序中的意思就是: 异常 :指的是程序在执行过程中,出现的非正常的情况&#xff0…...

操作系统学习笔记

文章目录 操作系统虚拟内存锁缓存机制CPU性能指标进程、线程文件管理系统 操作系统 操作系统是控制应用程序的执行,并充当应用程序和计算机硬件之间的接口。在计算机系统中,处于最外层的是(应用软件) 。 面向用户的就是外层的&am…...

【Spring Boot】SpringBoot设计了哪些可拓展的机制?

文章目录 前言SpringBoot核心源码拓展Initializer拓展监听器ApplicationListenerBeanFactory的后置处理器 & Bean的后置处理器AOP其他的拓展点 前言 当我们引入注册中心的依赖,比如nacos的时候,当我们启动springboot,这个服务就会根据配置…...

《程序员面试金典(第6版)》面试题 10.10. 数字流的秩

题目描述 假设你正在读取一串整数。每隔一段时间,你希望能找出数字 x 的秩(小于或等于 x 的值的个数)。请实现数据结构和算法来支持这些操作,也就是说: 实现 track(int x) 方法,每读入一个数字都会调用该方法; 实现 g…...

智能洗地机好用吗?值得入手的洗地机推荐

洗地机是一款高效的地面清洁设备,不仅可以很好清理地面不同形态的干湿垃圾,还减少了人工和水资源的浪费,是我们日常生活中必不可少的清洁工具。作为以一位评测博主,很多朋友咨询我在选购洗地机时应该注意哪些要点,有哪…...

Spring Security实战(一)——基于内存和数据库模型的认证与授权

目录 简介 一、初识Spring Security(入门案例) (1)新建project (2)选择依赖 (3)编写一个 HelloController (4)启动项目,访问localhost:8080…...

轻松掌握FFmpeg编程:从架构到实践

轻松掌握FFmpeg编程:从架构到实践 (Master FFmpeg Programming with Ease: From Architecture to Practice 引言 (Introduction)FFmpeg简介与应用场景 (Brief Introduction and Application Scenarios of FFmpeg)为什么选择FFmpeg进行音视频处理 (Why Choose FFmpeg…...

桌面应用程序开发攻略(初步了解)

什么是桌面应用程序? 桌面应用开发是指为桌面计算机或其他类似设备(如服务器)开发软件应用程序的过程。桌面应用通常是独立于浏览器运行的,并且可以在操作系统的桌面或应用程序菜单中找到。桌面应用可以使用各种编程语言开发&…...

【李老师云计算】HBase+Zookeeper部署及Maven访问(HBase集群实验)

索引 前言1. Zookeeper1.1 主机下载Zookeeper安装包1.2 主机解压Zookeeper1.3 ★解决解压后文件缺失1.4 主机配置Zookeeper文件1.4.1 配置zoo_sample.cfg文件1.4.2 配置/data/myid文件 1.5 主机传输Zookeeper文件到从机1.6 从机修改Zookeeper文件1.6.1 修改zoo.cfg文件1.6.2 修…...

第11章_常用类和基础API

第11章_常用类和基础API 讲师:尚硅谷-宋红康(江湖人称:康师傅) 官网:http://www.atguigu.com 本章专题与脉络 1. 字符串相关类之不可变字符序列:String 1.1 String的特性 java.lang.String 类代表字符串…...

Java语言数据类型与c语言数据类型的不同

目录 一、c语言数据类型 1.基本类型: 2.枚举类型: 3.空类型: 4.派生类型: 二、C语言编程需要注意的64位和32机器的区别 三、 不同之处 一、c语言数据类型 首先,先来整体介绍一下C语言的数据类型分类。 1.基…...

Mybatis逆向工程,动态创建实体类、条件扩展类、Mapper接口、Mapper.xml映射文件

今天呢,博主的学习进度也是步入了Java Mybatis 框架,目前正在逐步杨帆旗航。 那么接下来就给大家出一期有关 Mybatis 逆向工程的教学,希望能对大家有所帮助,也特别欢迎大家指点不足之处,小生很乐意接受正确的建议&…...

渲染学进阶内容——模型

最近在写模组的时候发现渲染器里面离不开模型的定义,在渲染的第二篇文章中简单的讲解了一下关于模型部分的内容,其实不管是方块还是方块实体,都离不开模型的内容 🧱 一、CubeListBuilder 功能解析 CubeListBuilder 是 Minecraft Java 版模型系统的核心构建器,用于动态创…...

对WWDC 2025 Keynote 内容的预测

借助我们以往对苹果公司发展路径的深入研究经验,以及大语言模型的分析能力,我们系统梳理了多年来苹果 WWDC 主题演讲的规律。在 WWDC 2025 即将揭幕之际,我们让 ChatGPT 对今年的 Keynote 内容进行了一个初步预测,聊作存档。等到明…...

《通信之道——从微积分到 5G》读书总结

第1章 绪 论 1.1 这是一本什么样的书 通信技术,说到底就是数学。 那些最基础、最本质的部分。 1.2 什么是通信 通信 发送方 接收方 承载信息的信号 解调出其中承载的信息 信息在发送方那里被加工成信号(调制) 把信息从信号中抽取出来&am…...

SpringBoot+uniapp 的 Champion 俱乐部微信小程序设计与实现,论文初版实现

摘要 本论文旨在设计并实现基于 SpringBoot 和 uniapp 的 Champion 俱乐部微信小程序,以满足俱乐部线上活动推广、会员管理、社交互动等需求。通过 SpringBoot 搭建后端服务,提供稳定高效的数据处理与业务逻辑支持;利用 uniapp 实现跨平台前…...

反射获取方法和属性

Java反射获取方法 在Java中,反射(Reflection)是一种强大的机制,允许程序在运行时访问和操作类的内部属性和方法。通过反射,可以动态地创建对象、调用方法、改变属性值,这在很多Java框架中如Spring和Hiberna…...

c#开发AI模型对话

AI模型 前面已经介绍了一般AI模型本地部署,直接调用现成的模型数据。这里主要讲述讲接口集成到我们自己的程序中使用方式。 微软提供了ML.NET来开发和使用AI模型,但是目前国内可能使用不多,至少实践例子很少看见。开发训练模型就不介绍了&am…...

Rapidio门铃消息FIFO溢出机制

关于RapidIO门铃消息FIFO的溢出机制及其与中断抖动的关系,以下是深入解析: 门铃FIFO溢出的本质 在RapidIO系统中,门铃消息FIFO是硬件控制器内部的缓冲区,用于临时存储接收到的门铃消息(Doorbell Message)。…...

【SpringBoot自动化部署】

SpringBoot自动化部署方法 使用Jenkins进行持续集成与部署 Jenkins是最常用的自动化部署工具之一,能够实现代码拉取、构建、测试和部署的全流程自动化。 配置Jenkins任务时,需要添加Git仓库地址和凭证,设置构建触发器(如GitHub…...

协议转换利器,profinet转ethercat网关的两大派系,各有千秋

随着工业以太网的发展,其高效、便捷、协议开放、易于冗余等诸多优点,被越来越多的工业现场所采用。西门子SIMATIC S7-1200/1500系列PLC集成有Profinet接口,具有实时性、开放性,使用TCP/IP和IT标准,符合基于工业以太网的…...