LoopEngine = class LoopEngine(OrderEngine) |
|
LoopEngine(walkers, errdis, copy=None, seed=4213, verbose=0)
The LoopEngine tries to unloop a crossing loop.
Only for 2 dimensional TS problems.
Input order :
0 1 2 3
15 14 5 4
7 6 13 12
8 9 10 11
The loop crosses between (5,6) and (13,14). By switching the positions
of 6 and 13, and reversing the loop in between, a better solution is
reached (triangle inequality)
output order:
0 1 2 3
15 14 5 4
12 13 6 7
11 10 9 8
This is NOT a random engine as it only steps in the uphill direction.
It belongs to the class of generalized travelling salesman problems
where the parameters of the problem is an ordered list.
The walker is kept when the logLikelihood > lowLhood
Author Do Kester. |
|
- Method resolution order:
- LoopEngine
- OrderEngine
- Engine
- builtins.object
Constructor:
- LoopEngine( walkers, errdis, copy=None, seed=4213, verbose=0)
- Constructor.
Parameters
----------
walkers : SampleList
walkers to be diffused
errdis : ErrorDistribution
error distribution to be used
copy : LoopEngine
to be copied
seed : int
for random number generator
Methods defined here:
- copy()
- Return copy of this.
- executeOnce( kw, lowLhood, dims=[0, 1])
- Execute the LoopEngine one time.
Parameters
----------
kw : int
walker to diffuse
lowLhood : float
lower limit in logLikelihood
dims : list of 2 ints
dimensions to process over
Methods inherited from OrderEngine:
Methods inherited from Engine:
- checkBest( problem, allpars, logL, fitIndex=None )
- domain2Unit( problem, dval, kpar=None )
- makeIndex( np, val )
- printReport()
- reportBest()
- reportCall()
- reportFailed()
- reportReject()
- reportSuccess()
- setWalker( kw, problem, allpars, logL, fitIndex=None )
- successRate()
- unit2Domain( problem, uval, kpar=None )
|
|