资源简介
这是将CRO与PSO结合的算法思想代码,解决单目标问题

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.IO;
namespace CRO_CONSOLE_LAM
{
public class Container
{
/** * The problem that this container is evaluating.*/
private Problem problem;
/** * The current function evaluation number of this container. */
private int FE;
/** * The initial population size in the container. */
private int iniPopSize;
/** * The energy buffer of this container. This variable is set with a value
* and is updated during the course of searching. */
private double energyBuffer;
/** * The initial kinetic energy assigned to new molecules.*/
private double iniKE;
/** * The collision rate between molecules in the container.*/
private double collRate;
/** * The energy loss rate in an on-wall ineffective collision.*/
private double lossRate;
/** * The threshold for decomposition to happen.*/
private int decThres;
/** * The threshold for synthesis to happen. */
private double synThres;
/** * The perturbation strength or “Step Size“ of the neighborhood function.*/
private double stepSize;
/** * The data point values of this container. */
//ArrayList population = new ArrayList();
ArrayList population = new ArrayList();
/** * The current global minimum of this container. This variable is updated
* * during the course of searching.*/
public static double globalMin;
public static double[] bestGlobalMols = new double[30];// in PSO
/**
* This function is the class constructor.
*
* @param problem The problem that this container is going to handle.
*/
public Container(Problem problem)
{
this.problem = problem;
globalMin = 1E100;
}
/**
* This function initialize the population of the container. It shall be
* called only after the problem object has initialized the parameter of the
* container and shall be called only once.
*/
public void initPopulation() {
FE = iniPopSize;
for (int i = 0; i < iniPopSize; i++)
{
population.Add(new Molecule(problem this));
Molecule m = (Molecule) population[i];
update(m);
}
for (int i = 0; i < iniPopSize; i++)
{
Molecule m = (Molecule) population[i];
m.setKE(iniKE);
}
}
/**
* This function implements the update feature of RCCRO. Whenever a new
* molecular structure is generated this function is called to check
* whether there is a better molecule generated compared with the
* best-so-far molecule.
*
* @param newMolecule The newly generated molecule.
*/
private void update(Molecule newMolecule) {
if (newMolecule.getPE() < globalMin)
{ // Update t
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-05-23 15:01 CRO_CONSOLE_LAM\
目录 0 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\
文件 2605 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\Benchmark.cs
文件 555 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\F01.cs
文件 602 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\F02.cs
文件 674 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\F03.cs
文件 592 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\F04.cs
文件 638 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\F05.cs
文件 550 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\F06.cs
文件 604 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\F07.cs
文件 588 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\F08.cs
文件 597 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\F09.cs
文件 769 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\F10.cs
文件 690 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\F11.cs
文件 1208 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\F12.cs
文件 1147 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\F13.cs
文件 981 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\F14.cs
文件 974 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\F15.cs
文件 590 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\F16.cs
文件 593 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\F17.cs
文件 774 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\F18.cs
文件 1111 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\F19.cs
文件 1332 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\F20.cs
文件 1012 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\F21.cs
文件 1044 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\F22.cs
文件 1046 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\F23.cs
文件 371 2014-05-23 15:01 CRO_CONSOLE_LAM\BM\ob
文件 3585 2014-05-23 15:01 CRO_CONSOLE_LAM\CRO_PSO.csproj
文件 8580 2014-05-23 15:01 CRO_CONSOLE_LAM\Container.cs
文件 6658 2014-05-23 15:01 CRO_CONSOLE_LAM\Molecule.cs
文件 4566 2014-05-23 15:01 CRO_CONSOLE_LAM\Problem.cs
............此处省略22个文件信息
相关资源
- The direction of synaptic plasticity mediated
- Micron颗粒详解
- jcrop v0.9.12
- PLC简易程序大合集
- Microsoft基本类库 (MFC)(C 库)
- Macromedia Fireworks V8.0 简体中文版
- 爱普生(EPSON)L3151 3153 3156 3157 3158不
-
Macromedia Flash MX Actionsc
ript for Fun an - Oxford Industries 采用 Microsoft.NET 平台实
- IBM CAW for Microsoft Cluster Server 简介
- Symantec AntiVirus for Microsoft SharePoint产品
- 闪迪 cruzer micro Skin CZ4量产工具
- IL-13基因microRNA靶序列单核苷酸多态性
-
Hollow fibre ba
sed Liquid-liquid-liquid mic - SafeNetMicroDog微狗加密狗驱动
- Microservice patterns
- EPSON打印机程序设计指南(ESC/POS指令
- Microsoft Visio 2013 Professional 64位简体中
- Microsoft Project 2016
- epson 2020黑白激光打印机驱动 win7/win
- 含Microsoft.Office.Interop.Owc11
- The Existence and Stability of Nontrivial St
- DS4000存储系统上Microsoft Exchange 2003的存
- cropper.js h5裁剪上传图片 代码齐整
- STM32F103VCT6TR - High-density performance lin
- Microsoft Visual Studio 2017 Installer Project
- 通过 Microsoft Services for UNIX 将 UNIX 应用
- Microsoft Windows Services for UNIX 3.5 版中的
- Gold-film coating assisted femtosecond laser f
- Genome doubling and chromosome elimination wit
评论
共有 条评论