MATLAB之数学建模:深圳市生活垃圾处理社会总成本分析
MATLAB之数学建模:深圳市生活垃圾处理社会总成本分析
注:MATLAB版本--2016a,作图分析部分见《MATLAB之折线图、柱状图、饼图以及常用绘图技巧》
一.现状模式下的模型
%第一题:建立总成本分析模型/年:按现状分析
% 总成本=直接成本 +经济技术成本 + 社会成本
function dataPro = Total_Cost_Analysis(year)
%垃圾每年预测表:2017-2030
table = [ 6.4450e+06 6.8317e+06 7.2416e+06 7.6761e+06 7.9832e+06 8.3025e+06 8.6346e+06 8.9800e+06 9.3392e+06 9.6193e+06 9.9079e+06 1.0205e+07 1.0511e+07 1.0827e+07]; %垃圾总量每年数值(2017-2030)
rubbish_quantity = table(year-2016);
%将时间分期处理:2017-2020,2021-2025,2026-2030
switch year
case { 2017,2018,2019,2020} %近期
rubbish_num_burn=215*10^4;
rubbish_num_landfill = rubbish_quantity-rubbish_num_burn;
class_cost = 0;
handle_cost = rubbish_num_landfill*60+ rubbish_num_burn*100;
transport_cost = 0.5*rubbish_num_landfill*60+0.5*rubbish_num_landfill*70+...
0.5*rubbish_num_burn*60+0.5*rubbish_num_burn*70 ;
social_cost =132*rubbish_quantity;
technology_cost=1300*10^4; % 湿处理分期:10^8,0.7*10^8,0.4*10^8
subsidy = 100*rubbish_quantity; %前期 100,中期50,后期取消,成本计算取负
profit = (10^(-4))*rubbish_quantity/102.49*10^8 ;
case {2021,2022,2023,2024,2025} %中期
rubbish_num_burn =215*10^4;
rubbish_num_landfill = rubbish_quantity-rubbish_num_burn;
class_cost = 0;
handle_cost = rubbish_num_landfill*60+ rubbish_num_burn*150;
transport_cost = rubbish_quantity*100;
social_cost =2*132*rubbish_quantity;
technology_cost=1300*10^4; % 湿处理分期:10^8,0.7*10^8,0.4*10^8
subsidy = 50*rubbish_quantity; %前期 100,中期50,后期取消,成本计算取负
profit = (10^(-4))*rubbish_quantity*(1/104.15+1/100.1+1/317.46)*10^8 +rubbish_quantity/1.54*10^4; %不同时间 定值
case {2026,2027,2028,2029,2030} %远期
rubbish_num_burn =215*10^4;
rubbish_num_landfill = rubbish_quantity-rubbish_num_burn;
class_cost = 0;
handle_cost = rubbish_num_landfill*60+ rubbish_num_burn*180;
transport_cost = rubbish_quantity*100;
social_cost =2*132*rubbish_quantity;
technology_cost=1300*10^4; % 湿处理分期:10^8,0.7*10^8,0.4*10^8
subsidy = 0*rubbish_quantity; %前期 100,中期50,后期取消,成本计算取负
profit = (10^(-4))*rubbish_quantity*(1/104.15+1/50.05+1/222.22)*10^8 +rubbish_quantity/1.54*10^4 ; %不同时间 定值
otherwise
msgbox('亲,请重新输入年份:');
end
%设施投资:
equipment_cost = 1.56*10^8;
%输出,分析:dataPro为数据集合
profit =profit *0.15;
direct_cost = class_cost + transport_cost + equipment_cost + handle_cost;
total_cost = direct_cost+technology_cost +social_cost+subsidy-profit ;
%dataPro(11): 分类,收运,设施,处理,技术,社会,补贴,收益,直接,总,均
dataPro = [ class_cost,transport_cost,equipment_cost,handle_cost, ...
technology_cost,social_cost,subsidy,profit,direct_cost,total_cost,total_cost/rubbish_quantity];
end
二. 模式一
%模式一:总成本=直接成本 +经济技术成本 + 社会成本
function dataPro = Total_Cost_Analysis_model1(year)
%垃圾每年预测表:2017-2030
table = [ 6.4450e+06 6.8317e+06 7.2416e+06 7.6761e+06 7.9832e+06 8.3025e+06 8.6346e+06 8.9800e+06 9.3392e+06 9.6193e+06 9.9079e+06 1.0205e+07 1.0511e+07 1.0827e+07]; %垃圾总量每年数值(2017-2030)
rubbish_quantity = table(year-2016);
%将时间分期处理:2014-2020,2021-2025,2026-2030
switch year
case {2016,2017,2018,2019,2020}
rubbish_num_burn=215*10^4; %近期
rubbish_num_landfill = rubbish_quantity-rubbish_num_burn;
transport_cost = 0.5*rubbish_quantity*60+0.5*rubbish_quantity*70;
handle_cost = rubbish_num_landfill*60+rubbish_num_burn*100;
social_cost = 132*rubbish_quantity;
technology_cost=1300*10^4; % 湿处理分期:10^8,0.7*10^8,0.4*10^8
subsidy = 100*rubbish_quantity; %前期 100,中期50,后期取消,成本计算取负
profit = (10^(-4))*rubbish_quantity/102.49*10^8 ; %不同时间 定值
case {2021,2022,2023,2024,2025}
transport_cost = rubbish_quantity*100;
handle_cost = rubbish_quantity*150;
social_cost =8*132*rubbish_quantity;
technology_cost=1300*10^4; % 湿处理分期:10^8,0.7*10^8,0.4*10^8
subsidy = 50*rubbish_quantity; %前期 100,中期50,后期取消,成本计算取负
profit = (10^(-4))* rubbish_quantity*(1/52.1+1/100.1 )*10^8 +rubbish_quantity/0.77*10^4;
case {2026,2027,2028,2029,2030}
transport_cost = rubbish_quantity*100;
handle_cost = rubbish_quantity*180;
social_cost =8*132*rubbish_quantity;
technology_cost=1300*10^4; % 湿处理分期:10^8,0.7*10^8,0.4*10^8
subsidy = 0*rubbish_quantity; %前期 100,中期50,后期取消,成本计算取负
profit = (10^(-4))*rubbish_quantity*(1/52.07+1/50.05 )*10^8 +rubbish_quantity/0.77*10^4;
otherwise
msgbox('亲,请重新输入年份:');
end
%分类费用
class_cost = 0;
%设施投资:
equipment_cost = 0 ;
%输出,分析
profit =profit *0.15;
direct_cost = class_cost + transport_cost + equipment_cost + handle_cost;
total_cost = direct_cost+technology_cost +social_cost+subsidy-profit ;
%dataPro(11): 分类,收运,设施,处理,技术,社会,补贴,收益,直接,总,均
dataPro = [ class_cost,transport_cost,equipment_cost,handle_cost, ...
technology_cost,social_cost,subsidy,profit,direct_cost,total_cost,total_cost/rubbish_quantity];
end
三. 模式二
%模式二:源头分类收集+湿垃圾生物处理+干垃圾焚烧+中心城区干垃圾转运
function dataPro = Total_Cost_Analysis_model2(year)
%垃圾每年预测表:2017-2030
table = [ 6.4450e+06 6.8317e+06 7.2416e+06 7.6761e+06 7.9832e+06 8.3025e+06 8.6346e+06 8.9800e+06 9.3392e+06 9.6193e+06 9.9079e+06 1.0205e+07 1.0511e+07 1.0827e+07]; %垃圾总量每年数值(2017-2030)
rubbish_quantity = table(year-2016);
switch year
case {2016,2017,2018,2019,2020}
rubbish_num_burn=215*10^4; %近期
rubbish_num_landfill = rubbish_quantity-rubbish_num_burn;
class_cost = 0;
transport_cost = 0.5*rubbish_quantity*60+0.5*rubbish_quantity*70;
handle_cost = rubbish_num_landfill*60+rubbish_num_burn*100;
social_cost =132*rubbish_quantity;
technology_cost=1300*10^4+10^8; % 湿处理分期:10^8,0.7*10^8,0.4*10^8
subsidy = 100*rubbish_quantity; %前期 100,中期50,后期取消,成本计算取负
profit = (10^(-4))*rubbish_quantity/102.49*10^8 ; %不同时间 定值
case {2021,2022,2023,2024,2025}
class_cost = 10.6*10^8;
transport_cost = 0.4*rubbish_quantity*60+0.6*rubbish_quantity*100;
handle_cost = rubbish_quantity*150;
social_cost =1.2*132*rubbish_quantity; % (year-2017)
technology_cost=1300*10^4+0.7*10^8; % 湿处理分期:10^8,0.7*10^8,0.4*10^8
subsidy = 50*rubbish_quantity; %前期 100,中期50,后期取消,成本计算取负
profit = (10^(-4))*rubbish_quantity*(1/72.31+1/396.83+1/100.1)*10^8 +rubbish_quantity/1.28*10^4 ; %不同时间 定值
case {2026,2027,2028,2029,2030}
class_cost = 10.6*10^8;
transport_cost = 0.5*rubbish_quantity*60+0.5*rubbish_quantity*100;
handle_cost = 0.5*rubbish_quantity*180+ 0.5*rubbish_quantity*200;
social_cost =1.2*132*rubbish_quantity; % (year-2017)
technology_cost=1300*10^4+0.4*10^8; % 湿处理分期:10^8,0.7*10^8,0.4*10^8
subsidy = 0*rubbish_quantity; %前期 100,中期50,后期取消,成本计算取负
profit = (10^(-4))* rubbish_quantity*(1/77.98+1/277.78+1/50.05)*10^8 +rubbish_quantity/1.28*10^4;
otherwise
msgbox('亲,请重新输入年份:');
end
%设施投资:
equipment_cost = 0;
%输出,分析
profit =profit *0.15;
direct_cost = class_cost + transport_cost + equipment_cost + handle_cost;
total_cost = direct_cost+technology_cost +social_cost+subsidy-profit ;
%dataPro(11): 分类,收运,设施,处理,技术,社会,补贴,收益,直接,总,均
dataPro = [ class_cost,transport_cost,equipment_cost,handle_cost, ...
technology_cost,social_cost,subsidy,profit,direct_cost,total_cost,total_cost/rubbish_quantity];
end
四. 模式三
%模式三:混合收集+末端分类+湿垃圾生物处理+干垃圾焚烧+中心城区干垃圾转运
function dataPro = Total_Cost_Analysis_model3(year)
%垃圾每年预测表:2017-2030
table = [ 6.4450e+06 6.8317e+06 7.2416e+06 7.6761e+06 7.9832e+06 8.3025e+06 8.6346e+06 8.9800e+06 9.3392e+06 9.6193e+06 9.9079e+06 1.0205e+07 1.0511e+07 1.0827e+07]; %垃圾总量每年数值(2017-2030)
rubbish_quantity = table(year-2016);
switch year
case {2016,2017,2018,2019,2020}
rubbish_num_burn=215*10^4; %近期
rubbish_num_landfill = rubbish_quantity-rubbish_num_burn;
transport_cost = 0.5*rubbish_quantity *60+0.5*rubbish_quantity *70 ;
handle_cost = rubbish_num_landfill*60+rubbish_num_burn*100;
social_cost =132*rubbish_quantity;
technology_cost=1300*10^4+10^8; % 湿处理分期:10^8,0.7*10^8,0.4*10^8
subsidy = 100*rubbish_quantity; %前期 100,中期50,后期取消,成本计算取负
profit = (10^(-4))*rubbish_quantity/102.49*10^8 ; %不同时间 定值
case {2021,2022,2023,2024,2025}
handle_cost = 0.5*rubbish_quantity*150+ 0.5*rubbish_quantity*200;
transport_cost = 0.4*rubbish_quantity*60+0.6*rubbish_quantity*100;
social_cost =132*rubbish_quantity;
technology_cost=1300*10^4+0.7*10^8; % 湿处理分期:10^8,0.7*10^8,0.4*10^8
subsidy = 50*rubbish_quantity; %前期 100,中期50,后期取消,成本计算取负
profit = (10^(-4))*rubbish_quantity*(1/86.87+1/317.46+1/100.1)*10^8 +rubbish_quantity/1.54*10^4; %不同时间 定值
case {2026,2027,2028,2029,2030}
handle_cost = 0.5*rubbish_quantity*180+ 0.5*rubbish_quantity*200;
transport_cost = 0.4*rubbish_quantity*60+0.6*rubbish_quantity*100;
social_cost =132*rubbish_quantity;
technology_cost=1300*10^4+0.4*10^8; % 湿处理分期:10^8,0.7*10^8,0.4*10^8
subsidy = 0*rubbish_quantity; %前期 100,中期50,后期取消,成本计算取负
profit = (10^(-4))*rubbish_quantity*(1/86.80+1/222.22+1/50.05)*10^8 +rubbish_quantity/1.54*10^4; %不同时间 定值
otherwise
msgbox('亲,请重新输入年份:');
end
%设施投资:
equipment_cost = 0;
%分类
class_cost = 0;
%输出,分析
profit =profit *0.15;
direct_cost = class_cost + transport_cost + equipment_cost + handle_cost;
total_cost = direct_cost+technology_cost +social_cost+subsidy-profit ;
%dataPro(11): 分类,收运,设施,处理,技术,社会,补贴,收益,直接,总,均
dataPro = [ class_cost,transport_cost,equipment_cost,handle_cost, ...
technology_cost,social_cost,subsidy,profit,direct_cost,total_cost,total_cost/rubbish_quantity];
end
五. 垃圾总量预测
%垃圾总量预测
rubbish_table = zeros(1,14);
rubbish_table(1,1) = 541.14*10^4; %2014年垃圾产量541.14万吨
for year = 2015:2020
rubbish_table(1,year-2013) = rubbish_table (1,year-2014)*(1+0.06);
end
for year = 2021:2025
rubbish_table(1,year-2013) = rubbish_table (1,year-2014)*(1+0.04);
end
for year = 2026:2030
rubbish_table(1,year-2013) = rubbish_table (1,year-2014)*(1+0.03);
end
六.各模式数据汇总
% 总成本=直接成本 +经济技术成本 + 社会成本
%数据收集data_model(从2017-2030年:现状,模式一,模式二,模式三)
clear;close;clc;
data_model0 = zeros(14, 11);
data_model1 = zeros(14, 11);
data_model2 = zeros(14, 11);
data_model3 = zeros(14, 11);
for year = 2017 : 2030
dataPro0 = Total_Cost_Analysis(year ); %现状
dataPro1 = Total_Cost_Analysis_model1(year );
dataPro2 = Total_Cost_Analysis_model2(year );
dataPro3 = Total_Cost_Analysis_model3(year );
for i = 1:11
data_model0(year-2016,i) = dataPro0(i);
data_model1(year-2016,i) = dataPro1(i);
data_model2(year-2016,i) = dataPro2(i);
data_model3(year-2016,i) = dataPro3(i);
end
end
七.最优模式评选
%优选模式计算:分类0.3,设施0.5,收运1.5,处理1,技术1,社会1.7,收益-2
%原理较复杂,优选模式以远期成本最优,并且设定不同成本的比重,所得结果为每吨垃圾的成本
%
table = [9.6193e+06 9.9079e+06 1.0205e+07 1.0511e+07 1.0827e+07]; %垃圾总量每年数值(远期2025-2030)
rubbish_quantity = sum(table,2);
x=0.3*sum(data_model0(10:14,1))+0.5*sum(data_model0(10:14,3))+1.5*sum(data_model0(10:14,2))+...
1*sum(data_model0(10:14,4))+1*sum(data_model0(10:14,5))+1.7*sum(data_model0(10:14,6))+...
2*sum(data_model0(10:14,8));
table0 =x/rubbish_quantity %现状模式 /rubbish_quantity
x=0.3*sum(data_model1(10:14,1))+0.5*sum(data_model1(10:14,3))+1.5*sum(data_model1(10:14,2))+...
1*sum(data_model1(10:14,4))+1*sum(data_model1(10:14,5))+1.7*sum(data_model1(10:14,6))+...
2*sum(data_model1(10:14,8));
table1 = x/rubbish_quantity %模式一
x=0.3*sum(data_model2(10:14,1))+0.5*sum(data_model2(10:14,3))+1.5*sum(data_model2(10:14,2))+...
1*sum(data_model2(10:14,4))+1*sum(data_model2(10:14,5))+1.7*sum(data_model2(10:14,6))+...
2*sum(data_model2(10:14,8));
table2 = x/rubbish_quantity %模式二
x=0.3*sum(data_model3(10:14,1))+0.5*sum(data_model3(10:14,3))+1.5*sum(data_model3(10:14,2))+...
1*sum(data_model3(10:14,4))+1*sum(data_model3(10:14,5))+1.7*sum(data_model3(10:14,6))+...
2*sum(data_model3(10:14,8));
table3 = x/rubbish_quantity %模式三
MATLAB之数学建模:深圳市生活垃圾处理社会总成本分析的更多相关文章
- Matlab与数学建模
一.学习目标. (1)了解Matlab与数学建模竞赛的关系. (2)掌握Matlab数学建模的第一个小实例—评估股票价值与风险. (3)掌握Matlab数学建模的回归算法. 二.实例演练. 1.谈谈你 ...
- 卓金武《MATLAB在数学建模中的应用》 第2版
内容介绍 本书的作者都具有实际的数学建模参赛经历和竞赛指导经验.书中内容完全是根据数学建模竞赛的需要而编排的,涵盖了绝大部分数学建模问题的matlab求解方法.本书内容分上下两篇.上篇介绍数学建模中常 ...
- “GANs”与“ODEs”:数学建模的终结?
在本文中,我想将经典数学建模和机器学习之间建立联系,它们以完全不同的方式模拟身边的对象和过程.虽然数学家基于他们的专业知识和对世界的理解来创建模型,而机器学习算法以某种隐蔽的不完全理解的方式描述世界, ...
- python 版 mldivide matlab 反除(左除)《数学建模算法与程序》Python笔记
今天在阅读数学建模的时候看到了差分那章 其中有一个用matlab求线性的代码,这里我贴出来 这里我送上 Python代码 In [39]: import numpy as np ...: from s ...
- 在数学建模中学MATLAB
为期三周的数学建模国赛培训昨天正式结束了,还是有一定的收获的,尤其是在MATLAB的使用上. 1. 一些MATLAB的基础性东西: 元胞数组的使用:http://blog.csdn.net/z1137 ...
- 数学建模--matlab基础知识
虽然python也能做数据分析,不过参加数学建模,咱还是用专业的 1. Matlab-入门篇:Hello world! 程序员入门第一式: disp(‘hello world!’) 2. 基本运算 先 ...
- 余胜威《MATLAB数学建模经典案例实战》2015年版
内容介绍 本书全面.系统地讲解了数学建模的知识.书中结合历年全国大学生数学建模竞赛试题,采用案例与算法程序相结合的方法,循序渐进,逐步引导读者深入挖掘实际问题背后的数学问题及求解方法.在本书案例的分析 ...
- Matlab 多个版本的安装包下载、安装和激活教程 + 多套数学建模视频教程
目录 1. 关键词 1.1. 说明 2. 下载地址 2.1. OneDrive高速云盘 2.1.1. 多版本的安装包 2.1.2. 多套数学建模的视频教程 2.2. 百度云 3. 安装教程 1. 关键 ...
- 数学建模学习笔记 | matlab基本命令及用法
前言 数学建模对matlab水平的要求 了解matlab的基本用法,如常用命令.脚本结构.矩阵的基本操作.绘图等: 熟悉matlab的程序结构,能创建和引用函数: 熟悉常见模型的求解算法和套路: 自主 ...
随机推荐
- OpenCV 鼠标手动绘制掩码图像
OpenCV 鼠标手动绘制掩码图像 完整的代码: #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui ...
- R: data.frame 生成、操作数组。重命名、增、删、改
################################################### 问题:生成.操作数据框 18.4.27 怎么生成数据框 data.frame.,,及其相关操 ...
- 8、泛型程序设计与c++标准模板库4.标准c++库中的算法
标准c++算法是通过迭代器和模板来实现的,其实算法本身就是一种函数模板. 算法从迭代器那里获得一个元素,而迭代器则知道一个元素在容器中的什么位置.迭代器查找元素的位置并将这些信息提供给算法以便算法能够 ...
- 微信小程序自学第二课:app及页面的生命周期、使用setData绑定数据
一.App声明周期 1.App() app.js中的App() 函数用来注册一个小程序.接受一个 object 参数,其指定小程序的生命周期函数等. 示例代码: App({ onLaunch: fun ...
- Android 设计模式情景分析——观察者模式
观察者模式是一种使用频率非常高的模式,有时也被称作发布/订阅模式,属于行为型模式,它最常用的是 GUI 系统.订阅——发布系统,它一个重要作用就是解耦,使得它们之间的依赖性更小.观察者模式定义了对象间 ...
- .net动态代理-EMIT,AOP实现
动态代理实现原理: 通过动态基础目标类,重写目标虚方法,.net中实现手段-il Emit.Proxy项目源码,https://github.com/1448376744/Emit.Proxy 以下是 ...
- 探索ElasticSearch(一)
1. 什么是ElasticSearch: ElasticSearch是基于lucene采用java语言开发的一个服务产品,旨在方便全文检索.分担web服务及数据库服务压力.可以理解为文件系列类型 ...
- Java面向对象的三大特性 多态
多态 对象的多种形态 继承是实现多态的基础 1,引用多态 父类的引用可以指向本类的对象 父类的引用可以指向子类的对象 2,方法多态 创建本类对象时,调用的方法为本类方法 创建子 ...
- elasticsearch 聚合查询
1. 按照 tags 字段 进行分组 GET /ecommerce/product/_search{ "size": 0, "aggs": { &quo ...
- python-django框架中使用七牛云
1:注册七牛云账号 https://www.qiniu.com/ js文件 链接:https://pan.baidu.com/s/1BW1svHqEsXrrTNtRobKkpg 提取码:ixta 2 ...