没有合适的资源?快使用搜索试试~ 我知道了~
Simplified swarm optimization algorithm with local search.txt
需积分: 10 0 下载量 30 浏览量
2020-09-15
21:55:48
上传
评论
收藏 13KB TXT 举报
温馨提示
试读
16页
This algorithm was proposed to solve the parallel machine scheduling problem with position-dependent deteriorating jobs and DeJong's learning effects in an uncertain manufacturing system.
资源推荐
资源详情
资源评论
#define _CRT_SECURE_NO_WARNINGS
#include<cstdio>
#include<cmath>
#include<iostream>
#include<ctime>
#include<cstdlib>
#include<fstream>
#include<windows.h>
#define n 500//the number of jobs
#define m 20//the number of machines
#define iteration 100//the iteration of each genration
#define time_limit 3.0*m*n/1000.0
int gen;
int rep;
double p_accept;
double c_w = 0.25;
double c_p = 0.35;
double c_g = 0.40;
double C_w = c_w;
double C_p = c_w+c_p;
double C_g = c_w + c_p + c_g;
#define N 20//the number of particles
double percent = 0.1;
#define mutated_particle (int)(N*percent)//关键(小规模取5,大规模取1)
#include<cstdio>
#include<cmath>
#include<iostream>
#include<ctime>
#include<cstdlib>
#include<fstream>
#include<windows.h>
#define n 500//the number of jobs
#define m 20//the number of machines
#define iteration 100//the iteration of each genration
#define time_limit 3.0*m*n/1000.0
int gen;
int rep;
double p_accept;
double c_w = 0.25;
double c_p = 0.35;
double c_g = 0.40;
double C_w = c_w;
double C_p = c_w+c_p;
double C_g = c_w + c_p + c_g;
#define N 20//the number of particles
double percent = 0.1;
#define mutated_particle (int)(N*percent)//关键(小规模取5,大规模取1)
int iteration_for_local_search = 200;//(小规模取100,大规模取200)
double r_1 = 0.20;
double r_2 = 1-r_1;
double particle[N + 1][n];//the last array is used for storing the best particle
double copy_particle[N + 1][n];
double local_best_particle[N][n];
double fitness_value[N + 1];
double local_best_fitness_value[N];
double Cmax[N];
double makespan[iteration];
double min_makespan;
double ave_makespan;
int job_list[n];
double store[2];
int index[2];
int index_of_global_best_particle;
int generation_of_finding_global_best_particle;
struct machine
{
double velocity;//velocities of machines
double fuzzy_makespan[3];//triangular fuzzy makespan of the machine
double makespan;//Crisp makespan of the machine
double learning_effect;//the learning effect of the machine
int job_amount;//the amount of jobs on the machine
};
struct machine mach[m];
struct job
double r_1 = 0.20;
double r_2 = 1-r_1;
double particle[N + 1][n];//the last array is used for storing the best particle
double copy_particle[N + 1][n];
double local_best_particle[N][n];
double fitness_value[N + 1];
double local_best_fitness_value[N];
double Cmax[N];
double makespan[iteration];
double min_makespan;
double ave_makespan;
int job_list[n];
double store[2];
int index[2];
int index_of_global_best_particle;
int generation_of_finding_global_best_particle;
struct machine
{
double velocity;//velocities of machines
double fuzzy_makespan[3];//triangular fuzzy makespan of the machine
double makespan;//Crisp makespan of the machine
double learning_effect;//the learning effect of the machine
int job_amount;//the amount of jobs on the machine
};
struct machine mach[m];
struct job
剩余15页未读,继续阅读
资源评论
JianfuChen
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功