DSIMA
 All Classes Namespaces Files Functions Variables
implementation.server.isinterface Namespace Reference

Functions

def compute
 
def simulateInstance
 Simulate an instance. More...
 
def computationThread
 Computation thread of the instance generator. More...
 
def terminateProcesses
 
def interact
 Interact with the user and with the instance simulator module. More...
 
def isComputing
 Send a message with the computing status. More...
 

Variables

int MAX_ITERATIONS = 10
 Maximum number of iterations of a simulation. More...
 
float CONVERGENCE_TOLERANCE = 0.005
 Numerical tolerance on the convergence. More...
 
int MAX_THREADS = 8
 Maximum threads. More...
 
tuple jobs = queue.Queue()
 Jobs to perform. More...
 
tuple computingLock = threading.Lock()
 Computing status. More...
 
tuple availableThreads = queue.Queue()
 List of available threads where each element is a number. More...
 
list errors = []
 Errors list where each error is a dictionary. More...
 
tuple printLock = threading.Lock()
 Lock to print. More...
 
tuple errorsLock = threading.Lock()
 Lock to add an error to the errors list. More...
 
dictionary processList = {}
 Running processes. More...
 
string simulatorPath = './simulator'
 Simulator path. More...
 
int progression = 0
 

Function Documentation

def implementation.server.isinterface.computationThread (   job)

Computation thread of the instance generator.

Parameters
jobJob to be done.
def implementation.server.isinterface.compute ( )
def implementation.server.isinterface.interact (   client,
  message 
)

Interact with the user and with the instance simulator module.

Parameters
clientClient we are interacting with.
messageClient's message.
def implementation.server.isinterface.isComputing (   client,
  message 
)

Send a message with the computing status.

def implementation.server.isinterface.simulateInstance (   threadId,
  instanceDirectory,
  hash,
  d 
)

Simulate an instance.

Parameters
threadIdId of the thread using this function.
instanceDirectoryDirectory containing the instances to simulate (hash included).
hashHash of the instance.
dDay to simulate.
def implementation.server.isinterface.terminateProcesses ( )

Variable Documentation

tuple availableThreads = queue.Queue()

List of available threads where each element is a number.

tuple computingLock = threading.Lock()

Computing status.

float CONVERGENCE_TOLERANCE = 0.005

Numerical tolerance on the convergence.

list errors = []

Errors list where each error is a dictionary.

tuple errorsLock = threading.Lock()

Lock to add an error to the errors list.

tuple jobs = queue.Queue()

Jobs to perform.

int MAX_ITERATIONS = 10

Maximum number of iterations of a simulation.

int MAX_THREADS = 8

Maximum threads.

tuple printLock = threading.Lock()

Lock to print.

dictionary processList = {}

Running processes.

The key is the thread id and the value is the process.

int progression = 0
string simulatorPath = './simulator'

Simulator path.