org.dbe.eve.util
Class PopulationHelper

java.lang.Object
  extended by org.dbe.eve.util.PopulationHelper

public class PopulationHelper
extends java.lang.Object

Author:
Claudius

Method Summary
(package private)  SimplePopulation createInitialPopulation(int size, ServicePool pool, java.lang.String fileName)
          Helper Method to create a Population of Solutions.
(package private)  EvEService createRndEvEService(java.lang.String smid)
           
(package private)  ServicePool createServicePool(int size, java.lang.String fileName)
          Helper Method for creating and persisting (.xml file) a service pool.
static PopulationHelper getInstance()
           
 ServicePool getPoolFromFile(java.lang.String fileName)
          Create / Read a service pool from a file
 SimplePopulation getPopulationFromFile(java.lang.String filename)
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static PopulationHelper getInstance()

main

public static void main(java.lang.String[] args)
Parameters:
args -

getPopulationFromFile

public SimplePopulation getPopulationFromFile(java.lang.String filename)

getPoolFromFile

public ServicePool getPoolFromFile(java.lang.String fileName)
                            throws java.io.IOException
Create / Read a service pool from a file

Parameters:
fileName - Filename of the file including extension
Throws:
java.io.IOException

createRndEvEService

EvEService createRndEvEService(java.lang.String smid)
Parameters:
smid - ServiceManifest ID
Returns:
EvEService Helper method to create an EvE Service with random characteristics

createServicePool

ServicePool createServicePool(int size,
                              java.lang.String fileName)
Helper Method for creating and persisting (.xml file) a service pool.

Parameters:
size - Number of Services to be created in this pool
fileName - Filename to store the pool (doesnot store if null)
Returns:
the Pool

createInitialPopulation

SimplePopulation createInitialPopulation(int size,
                                         ServicePool pool,
                                         java.lang.String fileName)
Helper Method to create a Population of Solutions. Needed to randomly create an initial population if there is no other available.

Parameters:
size - Number of solutions to create
pool - Pool, which is used to create the solutions from
fileName - where the pool is persisted to, does not store if null
Returns:
SimplePopulation the created population