Class ParallelAlns<TInput, TSolution>
Parallel adaptive large neighborhood search based on
http://orbit.dtu.dk/fedora/objects/orbit:56703/datastreams/file_4129408/content
Inheritance
System.Object
ParallelAlns<TInput, TSolution>
Namespace:Palns
Assembly:Palns.dll
Syntax
public class ParallelAlns<TInput, TSolution> : ISolve<TInput, TSolution> where TSolution : ISolution<TSolution>
Constructors
| Improve this Doc View SourceParallelAlns(Func<TInput, TSolution>, List<Func<TSolution, Task<TSolution>>>, List<Func<TSolution, Task<TSolution>>>, Double, Double, Random, Double, Double, Double, Double, Double, Double, Nullable<Int32>, Func<Boolean>, Action<TSolution>)
Declaration
public ParallelAlns(Func<TInput, TSolution> constructionHeuristic, List<Func<TSolution, Task<TSolution>>> destroyOperators, List<Func<TSolution, Task<TSolution>>> repairOperators, double temperature, double alpha, Random randomizer, double newGlobalBestWeight, double betterSolutionWeight, double acceptedSolution, double rejectedSolution, double decay, double initialWeight = 1, int ? numberOfThreads = null, Func<bool> abort = null, Action<TSolution> progressUpdate = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<TInput, TSolution> | constructionHeuristic | |
System.Collections.Generic.List<System.Func<TSolution, System.Threading.Tasks.Task<TSolution>>> | destroyOperators | |
System.Collections.Generic.List<System.Func<TSolution, System.Threading.Tasks.Task<TSolution>>> | repairOperators | |
System.Double | temperature | |
System.Double | alpha | |
System.Random | randomizer | |
System.Double | newGlobalBestWeight | |
System.Double | betterSolutionWeight | |
System.Double | acceptedSolution | |
System.Double | rejectedSolution | |
System.Double | decay | |
System.Double | initialWeight | |
System.Nullable<System.Int32> | numberOfThreads | |
System.Func<System.Boolean> | abort | |
System.Action<TSolution> | progressUpdate |
Properties
| Improve this Doc View SourceBestSolution
Holds the current best solution
Declaration
public TSolution BestSolution { get; }
Returns
Type | Description |
---|---|
TSolution |
MethodWeightLog
Gets a text describing the repair and destroy methods' weights.
Declaration
public string MethodWeightLog { get; }
Returns
Type | Description |
---|---|
System.String |
ProcessorCores
The number of physical processors
Declaration
public int ProcessorCores { get; }
Returns
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceSolve(TInput)
Solves the given input and produces a solution
Declaration
public TSolution Solve(TInput input)
Parameters
Type | Name | Description |
---|---|---|
TInput | input | The problem to solve |
Returns
Type | Description |
---|---|
TSolution | A solution to the input |
SolveUsingTplDataflow(TInput)
Declaration
public TSolution SolveUsingTplDataflow(TInput input)
Parameters
Type | Name | Description |
---|---|---|
TInput | input |
Returns
Type | Description |
---|---|
TSolution |