- 5
- 0
- 约3.46万字
- 约 33页
- 2017-05-27 发布于江西
- 举报
用GA解VRP
【程序的算法单元delphi写的】unit uEA;interfaceusesuUtilsEA, uIEA, uITSP, Classes, GaPara, windows, SysUtils, fEA_TSP;typeTIndividual = class(TInterfacedObject, IIndividual)private// The internally stored fitness valuefFitness: TFloat;fWeConstrain: integer;fBackConstrain: integer;fTimeConstrain: integer;procedure SetFitness(const Value: TFloat);function GetFitness: TFloat;function GetWeConstrain: integer;procedure SetWeConstrain(const Value: integer);procedure SetBackConstrain(const Value: integer);function GetBackConstrain: integer;function GetTimeConstrain: integer;procedure SetTimeConstrain(const Value: integer);publicproperty Fitness : TFloat read GetFitness write SetFitness;property WeConstrain :integer read GetWeConstrain write SetWeConstrain;property BackConstrain :integer read GetBackConstrain write SetBackConstrain;property TimeConstrain :integer read GetTimeConstrain write SetTimeConstrain;end;TTSPIndividual = class(TIndividual, ITSPIndividual)private// The route we travelfRouteArray : ArrayInt;fWeConstrain: integer;fBackConstrain: integer;fTimeConstrain: integer;function GetRouteArray(I: Integer): Integer;procedure SetRouteArray(I: Integer; const Value: Integer);procedure SetSteps(const Value: Integer);function GetSteps: Integer;function GetWeConstrain: integer;procedure SetWeConstrain(const Value: integer);procedure SetBackConstrain(const Value: integer);procedure SetTimeConstrain(const Value: integer);function GetBackConstrain: integer;function GetTimeConstrain: integer;public// Constructor, called with initial route sizeconstructor Create(Size : TInt); reintroduce;destructor Destroy; override;property RouteArray[I : Integer] : Integer read GetRouteArray write SetRouteArray;// The number of steps on the routeproperty Steps : Integer read GetSteps write SetSteps;property Fitness : TFloat read GetFitness write SetFitness;property WeConstrain :integer read GetWeConstrain write SetWeConstrain;property BackConstr
您可能关注的文档
- 现场配电柜及照明配电箱技术协议.doc
- 现场质量管控与零缺陷管理实战训练培训大纲.doc
- 现实的或潜在的环境问题协调人类与环境的关系保障经济社会的持续.ppt
- 现场配电柜及照明配电箱采购合同.doc
- 现有配送管理系统浅析及相关优化措施.doc
- 珍本达德堂脉决金针(DOC 14页).doc
- 珍爱生命课件(PPT 21页).ppt
- 珍珠课件(PPT 22页).ppt
- 珍禽养殖公司300万只火鸡养殖加工扩建项目可行性研究报告-完整版.doc
- 珠江三角洲课件(PPT 55页).ppt
- 2025-2026学年天津市和平区高三(上)期末数学试卷(含解析).pdf
- 2025-2026学年云南省楚雄州高三(上)期末数学试卷(含答案).pdf
- 2025-2026学年甘肃省天水市张家川实验中学高三(上)期末数学试卷(含答案).docx
- 2025-2026学年福建省厦门市松柏中学高二(上)期末数学试卷(含答案).docx
- 2025-2026学年广西钦州市高一(上)期末物理试卷(含答案).docx
- 2025-2026学年河北省邯郸市临漳县九年级(上)期末化学试卷(含答案).docx
- 2025-2026学年河北省石家庄二十三中七年级(上)期末历史试卷(含答案).docx
- 2025-2026学年海南省五指山市九年级(上)期末化学试卷(含答案).docx
- 2025-2026学年河北省唐山市玉田县九年级(上)期末化学试卷(含答案).docx
- 2025-2026学年河北省邢台市市区九年级(上)期末化学试卷(含答案).docx
原创力文档

文档评论(0)