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

news2024/10/5 16:19:49

 

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

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

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

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

目录

💥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代码实现

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/426232.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【数据挖掘与商务智能决策】第十章 支持向量机

1. 线性可分SVM import numpy as np import pandas as pd import matplotlib.pyplot as plt%matplotlib inline1.1 生成模拟数据 # 导入sklearn模拟二分类数据生成模块 from sklearn.datasets import make_blobs # 生成模拟二分类数据集 X, y make_blobs(n_samples150, n_f…

SIP协议之RTP负载类型(payload type)

一、RTP负载类型介绍​ 在SIP 音视频通话中,媒体数据是由RTP包携带的, RTP包中的PT字段标识了负载媒体数据的类型。如下图: 注: PT表示负载类型(Payload Type), 7 bits,即所传输的多媒体的类型 ​  不同的媒体编码…

Kafka消费者组和分区再均衡

应用程序使用KafkaConsumer向Kafka订阅主题,并从订阅的Topic上接收消息。 要想知道如何从Kafka读取消息,需要先了解消费者和消费者组的概念。 1、消费者和消费者组 原因:假设我们有一个应用程序需要从一个Kafka Topic中读取消息并验证&…

14Exceptional Control Flow Exceptions and Process(异常控制流,异常和进程)

异常控制流 异常控制流出现的地方: 异常控制流(Exceptional Control Flow,ECF)是程序执行过程中由于某些特殊事件或条件而导致的控制流的改变。异常控制流通常出现在以下几种情况: 硬件异常和中断:硬件异…

14天手撸交互式问答数字人直播教程-课程计划

一、课程计划 二、时间安排 第01天:交互式问答数字人发展现状 从一个真实案例开始,介绍当前主流的交互式数字人平台,需求和应用场景,引入交互式数字人的交互流程和关键技术。后续整个直播系列的内容安排。 第02天:音…

Nvidia Orin刷机保姆级教程

文章目录前言一、刷机准备二、刷机实战1.刷机文件下载2.Orin进入刷机模式2.1拔掉Orin上所有线缆2.2插上type-c线缆2.3长按Force Recovery按钮2.4通电2.5松开2号按钮进入刷机模式2.6确认是否进入刷机模式3.命令行刷机3.1安装jetpack总结前言 使用Orin有段时间了,现在…

代码随想录_二叉树_leetcode236

leetcode 236. 二叉树的最近公共祖先 236. 二叉树的最近公共祖先 给定一个二叉树, 找到该树中两个指定节点的最近公共祖先。 百度百科中最近公共祖先的定义为:“对于有根树 T 的两个节点 p、q,最近公共祖先表示为一个节点 x,满足 x 是 p、…

Windows主机信息搜集

注意:一切内容仅用于信息技术分享,切勿用于其他用途,一切后果与作者无关。 前言: 通过命令执行使用cs拿到了内网的一台主机,接下来我们进行内网的信息搜集。 1、内网环境分析 内网渗透: 在拿到webshell的…

机器学习——最大最小归一化

问:写出最小最大归一化公式,并对以下数据集进行最小最大归一化。x{6.3,9.2,-0.8,0.2,3.6}答: x_{min}-0.8 x_{max}9.2 将每个数据点应用最小最大归一化公式: $x_1{6.3-(-0.8)}/{9.2-(-0.8)}0.71 $x_2{9.2-(-0.8)}/{9.2-(-0.8)}1.0 $x_3…

PasteSpider之部署实际案例一则

本帖主要是介绍使用PasteSpider部署一个项目的过程,不一定会把所有问题都概括在内,但是至少是一个项目部署的完整流程和说明! 我们以PasteCode的网站作为一个项目为例子,绑定的域名为https://www.pastecode.cn/,项目包含了api端和…

ldap 组织结构如何转成多叉树?

工作中,ldap 服务器的对接,可以能会涉及到同步组织结构,认证,认证后处理等等,最近认证还不是我想写的刚需,继续来看看对于组织结构的想法 例如同步 AD 域的组织结构,或者是 ldap 协议的其他产品…

「计算机控制系统」2. 采样与数据保持

计算机控制系统中的信号 理想采样过程的数学描述 信号的恢复与重构 文章目录计算机控制系统中的信号基础知识A/D中的信号D/A中的信号理想采样过程的数学描述采样过程的描述理想采样信号的描述Shannon采样定理信号的恢复与重构Shannon重构法信号保持重构法计算机控制系统中的信号…

Java属性文件编码:处理非西欧语言字符的指南

Java属性文件是一种轻量级的配置文件格式,用于在Java应用程序中存储键值对数据。在Java中,Properties类提供了一种方便的方式来读取和写入属性文件。 在Java中,属性文件通常使用ISO-8859-1字符集编码。这意味着如果您希望在属性文件中使用非…

中科图新BIM+GIS数字化设计施工管理解决方案

一、引言: 公路项目对施工质量和风险控制要求高,但涉及专业、队伍、机械等众多因素,导致施工质量与安全控制困难。必须提前应对并做好过程中的管控,信息化系统可支持记录和管理数据。 二、中科图新BIMGIS智慧施工管理平台 中科图…

docker容器的相关环境及创建镜像1

一、容器管理工具介绍 LXC 2008 是第一套完整的容器管理解决方案 不需要任何补丁直接运行在linux内核之上管理容器。创建容器慢,不方便移植 Docker 是在LXC基础上发展起来的。拥有一套容器管理生态系统 生态系统包含︰容器镜像、注册表、RESTFUL API及命令行操作界…

Python算法设计 - McCarthy 91

目录一、什么是 McCarthy 91二、有什么用?三、Python算法实现四、作者Info一、什么是 McCarthy 91 McCarthy 91 是一个递归的函数表达式如下 函数的意思是当输入一个大于 100 的数字 n 时返回 n-10,而当输入一个小于等于101的数字 n 时递归的对 n 进行…

QT之widget窗口标题与项目构建目标位置修改

文章目录widget窗口标题修改方法一,直接通过UI界面修改方法二,通过代码修改结果展示,选择其中一种方法即可构建项目生成文件目标位置修改1. 首先选择——>项目,如图所示:2.打开后选择构建设置——>编辑构建位置&…

【VScode】手把手教你如何搭建C/C++开发环境

目录 1.VScode是什么 2.VScode的下载和安装 安装中文插件 3.VScode配置C/C开发环境 3.1 下载MinGW-w64 编译器套件 3.2 配置MinGW-w64 3.3 安装C/C插件 4.在VScode上编写C语言代码并编译成功 4.1打开文件夹 4.2 新建C语言文件,编写C语言代码 4.3设置C/…

vue3项目中使用pinia

vuex 4pinia 小菠萝 vuex和之前vue2使用一致 1.import { createStore } from vuex 引入文件不同vue3组件setup写法vuex提供了hook //组件中操作store import { useStore } from vuex //提交mutations 进行修改 store.commit(increment), //dispatch 触发action 同步或者异步提交…

【C】Process Control

系列连载 【python / C / C】 参考 《C语言程序设计(第四版)谭浩强》【C语言】C语言视频教程《郝斌 C 语言自学教程》 文章目录1 什么是流程控制2 流程控制的分类2.1 顺序执行2.2 选择执行2.3 循环执行2.3.1 for2.3.2 while2.3.3 do...while2.3.4 swi…