Information Technology Reference
In-Depth Information
Each two values in the solution are taken pairwise and exchanged as
Temp = Solution[[i]]; Solution[[i]] = Solution[[j]]; Solution[[j]] = Temp, where Temp is
the intermediary placeholder. Another syntax for this process can be given as
{
Solution[[i]] , Solution[[j]]
}
=
{
Solution[[j]] , Solution[[i]]
}
. Each value indexed by i and
j are exchanged.
The new fitness of the solution is calculated. If the new fitness is better than the old
value, then the new solution is admitted into the population and the starting position is
again set to Label [ st art ] given as If[NewCostVal < CostVal , Goto[start]]. This process
iterates till the index i iterates to the end of the solution
{
i , Job
1
}
taking into account
all the resets done by the finding of new solutions.
The outline of the entire code is given in Fig 7.33 and the data flow diagram is given
in Fig 7.34.
1 . Input : D , G max , NP 4 , F (0 , 1+) , CR [0 , 1] , initial bounds : x ( lo ) , x ( hi ) .
2 . Initialize : DoPopulation [ NP , S pecimen ]
3 . While
G < G max
Create TRVIndex by command :
TRVIndex = MapIndexed [ SelectOther [#2[[1]]]& , Population ]
Selection of three vectors by TRVIndex
TRV = Population [[#1]]& / @ TRVIndex
Create noisy vectors
Noisy = F (#1[[1 , 2]] #1[[2 , 2]]) + #1[[3 , 2]]& / @ TRV
Create trial vectors :
Trial = Flatten [ Table [ If [ Cr < Random [] , Po p [[ i , 2 , j ]] , #1[[ i , j ]]] ,
{ i , NP },{ j , Dim } ]& / @ { Noisy }, 1]
Check for boundary :
BoundaryChecking = Flatten [ MapIndexed [ CheckInterval [#1 , #2]
& , #1] , 1]& / @( Trial )
i NP
Cost value
IndividualsCostValue = {
CostF unction [#1] , #1
}
& / @( BoundaryChecking )
DSH conversion :
Repair / @ DSH
New population :
NewPopulation = MapT hread [ If [#1[[1]] < #2[[1]] , #1 , #2]& ,
{ Population , ( IndividualsCostValue ) } ]
G = G + 1
Fig. 7.33. DE outline
7.4.1
DE Flow Shop Scheduling
This section describes the application of Flow Shop scheduling as given in Fig 7.35. In
this function, the obtained solution is simply passed into the CostFunction function.
The first variable, JTime accumulates the processing time of all the jobs in the first
machine given as: JTime = Accumulate[#]&[Prob[[1 , #]]& / @Solution];.
The second variable, LMach , computes the job times on all the subsequent machines
iteratively. Since the maximum of the processing times is taken between the jobs:
Search WWH ::




Custom Search