XPUSP - Home

br.usp.ime.xpusp.paxyroj
Class PaxyrojNative

java.lang.Object
  |
  +--br.usp.ime.xpusp.paxyroj.PaxyrojNative

public class PaxyrojNative
extends java.lang.Object

This class runs the C++ paxyroj algorithm

Version:
1.0
Author:
Christian Willy Asmussen

Field Summary
(package private)  double crossOverProbability
           
(package private)  java.lang.String database
           
(package private)  int dumpSolutionFrequency
           
(package private)  java.lang.String host
           
(package private)  java.lang.String logFilename
           
(package private)  double mutationProbability
           
(package private)  int numberOfGenerations
           
(package private)  java.lang.String password
           
(package private)  int populationSize
           
(package private)  long randomSeed
           
(package private)  int solutionId
           
(package private)  java.lang.String user
           
 
Constructor Summary
PaxyrojNative()
          Regular constructor
 
Method Summary
 int execute()
           
 double getCrossOverProbability()
          Gets the value of crossOverProbability
 java.lang.String getDatabase()
          Gets the value of database
 int getDumpSolutionFrequency()
          Gets the value of dumpSolutionFrequency
 java.lang.String getHost()
          Gets the value of host
 java.lang.String getLogFilename()
          Gets the value of logFilename
 double getMutationProbability()
          Gets the value of mutationProbability
 int getNumberOfGenerations()
          Gets the value of numberOfGenerations
 java.lang.String getPassword()
          Gets the value of password
 int getPopulationSize()
          Gets the value of populationSize
 long getRandomSeed()
          Gets the value of randomSeed
 int getSolutionId()
          Gets the value of solutionId
 java.lang.String getUser()
          Gets the value of user
static void main(java.lang.String[] args)
          This main method is equivalent to ./gogofirst
private  int run(java.lang.String[] args)
          This method calls the run method on the dinamically linked library.
 void setCrossOverProbability(double argCrossOverProbability)
          Sets the value of crossOverProbability
 void setDatabase(java.lang.String argDatabase)
          Sets the value of database
 void setDumpSolutionFrequency(int argDumpSolutionFrequency)
          Sets the value of dumpSolutionFrequency
 void setHost(java.lang.String argHost)
          Sets the value of host
 void setLogFilename(java.lang.String argLogFilename)
          Sets the value of logFilename
 void setMutationProbability(double argMutationProbability)
          Sets the value of mutationProbability
 void setNumberOfGenerations(int argNumberOfGenerations)
          Sets the value of numberOfGenerations
 void setPassword(java.lang.String argPassword)
          Sets the value of password
 void setPopulationSize(int argPopulationSize)
          Sets the value of populationSize
 void setRandomSeed(long argRandomSeed)
          Sets the value of randomSeed
 void setSolutionId(int argSolutionId)
          Sets the value of solutionId
 void setUrl(java.lang.String url)
          Sets host and db based on the url on the form: jdbc:mysql://127.0.0.1/xpusp_paxyroj
 void setUser(java.lang.String argUser)
          Sets the value of user
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

randomSeed

long randomSeed

populationSize

int populationSize

numberOfGenerations

int numberOfGenerations

mutationProbability

double mutationProbability

crossOverProbability

double crossOverProbability

host

java.lang.String host

user

java.lang.String user

password

java.lang.String password

database

java.lang.String database

dumpSolutionFrequency

int dumpSolutionFrequency

solutionId

int solutionId

logFilename

java.lang.String logFilename
Constructor Detail

PaxyrojNative

public PaxyrojNative()
Regular constructor
Method Detail

run

private int run(java.lang.String[] args)
This method calls the run method on the dinamically linked library. This is like calling ./gogofirs with args

getRandomSeed

public long getRandomSeed()
Gets the value of randomSeed
Returns:
the value of randomSeed

setRandomSeed

public void setRandomSeed(long argRandomSeed)
Sets the value of randomSeed
Parameters:
argRandomSeed - Value to assign to this.randomSeed

getPopulationSize

public int getPopulationSize()
Gets the value of populationSize
Returns:
the value of populationSize

setPopulationSize

public void setPopulationSize(int argPopulationSize)
Sets the value of populationSize
Parameters:
argPopulationSize - Value to assign to this.populationSize

getNumberOfGenerations

public int getNumberOfGenerations()
Gets the value of numberOfGenerations
Returns:
the value of numberOfGenerations

setNumberOfGenerations

public void setNumberOfGenerations(int argNumberOfGenerations)
Sets the value of numberOfGenerations
Parameters:
argNumberOfGenerations - Value to assign to this.numberOfGenerations

getMutationProbability

public double getMutationProbability()
Gets the value of mutationProbability
Returns:
the value of mutationProbability

setMutationProbability

public void setMutationProbability(double argMutationProbability)
Sets the value of mutationProbability
Parameters:
argMutationProbability - Value to assign to this.mutationProbability

getCrossOverProbability

public double getCrossOverProbability()
Gets the value of crossOverProbability
Returns:
the value of crossOverProbability

setCrossOverProbability

public void setCrossOverProbability(double argCrossOverProbability)
Sets the value of crossOverProbability
Parameters:
argCrossOverProbability - Value to assign to this.crossOverProbability

getDatabase

public java.lang.String getDatabase()
Gets the value of database
Returns:
the value of database

setDatabase

public void setDatabase(java.lang.String argDatabase)
Sets the value of database
Parameters:
argDatabase - Value to assign to this.database

getDumpSolutionFrequency

public int getDumpSolutionFrequency()
Gets the value of dumpSolutionFrequency
Returns:
the value of dumpSolutionFrequency

setDumpSolutionFrequency

public void setDumpSolutionFrequency(int argDumpSolutionFrequency)
Sets the value of dumpSolutionFrequency
Parameters:
argDumpSolutionFrequency - Value to assign to this.dumpSolutionFrequency

getSolutionId

public int getSolutionId()
Gets the value of solutionId
Returns:
the value of solutionId

setSolutionId

public void setSolutionId(int argSolutionId)
Sets the value of solutionId
Parameters:
argSolutionId - Value to assign to this.solutionId

getHost

public java.lang.String getHost()
Gets the value of host
Returns:
the value of host

setHost

public void setHost(java.lang.String argHost)
Sets the value of host
Parameters:
argHost - Value to assign to this.host

getUser

public java.lang.String getUser()
Gets the value of user
Returns:
the value of user

setUser

public void setUser(java.lang.String argUser)
Sets the value of user
Parameters:
argUser - Value to assign to this.user

getPassword

public java.lang.String getPassword()
Gets the value of password
Returns:
the value of password

setPassword

public void setPassword(java.lang.String argPassword)
Sets the value of password
Parameters:
argPassword - Value to assign to this.password

getLogFilename

public java.lang.String getLogFilename()
Gets the value of logFilename
Returns:
the value of logFilename

setLogFilename

public void setLogFilename(java.lang.String argLogFilename)
Sets the value of logFilename
Parameters:
argLogFilename - Value to assign to this.logFilename

execute

public int execute()

setUrl

public void setUrl(java.lang.String url)
Sets host and db based on the url on the form: jdbc:mysql://127.0.0.1/xpusp_paxyroj

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
This main method is equivalent to ./gogofirst

XPUSP - Home