se.sics.tasim.is
Class SimulationInfo

java.lang.Object
  extended by se.sics.tasim.is.SimulationInfo
All Implemented Interfaces:
Transportable

public class SimulationInfo
extends java.lang.Object
implements Transportable


Field Summary
static java.lang.String RESERVED
           
 
Constructor Summary
SimulationInfo()
           
SimulationInfo(int id, java.lang.String type, java.lang.String params, int simulationLength)
           
 
Method Summary
 boolean addParticipant(int agentID, int role)
          Adds the specified agent with the specified role.
 void copyParticipants(SimulationInfo info)
           
 long getEndTime()
           
 int getFlags()
           
 int getID()
           
 java.lang.String getParameter(java.lang.String name)
           
 int getParameter(java.lang.String name, int defaultValue)
           
 java.lang.String getParams()
           
 int getParticipantCount()
           
 int getParticipantID(int index)
           
 int getParticipantRole(int index)
           
 int getSimulationID()
           
 int getSimulationLength()
          Returns the simulation length in milliseconds
 long getStartTime()
           
 java.lang.String getTransportName()
          Returns the transport name used for externalization.
 java.lang.String getType()
           
 boolean hasSimulationID()
           
 int indexOfParticipant(int agentID)
           
 boolean isBuiltinParticipant(int index)
           
 boolean isEmpty()
           
 boolean isFull()
           
 boolean isParticipant(int agentID)
           
 boolean isReservation()
           
 void read(TransportReader reader)
          Reads the state for this transportable from the specified reader.
 void setFlags(int flags)
           
 void setFull()
           
 void setSimulationID(int simulationID)
           
 void setStartTime(long startTime)
           
 java.lang.String toString()
           
 void write(TransportWriter writer)
          Writes the state for this transportable to the specified writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESERVED

public static final java.lang.String RESERVED
See Also:
Constant Field Values
Constructor Detail

SimulationInfo

public SimulationInfo(int id,
                      java.lang.String type,
                      java.lang.String params,
                      int simulationLength)

SimulationInfo

public SimulationInfo()
Method Detail

getID

public int getID()

isReservation

public boolean isReservation()

getType

public java.lang.String getType()

getParams

public java.lang.String getParams()

getParameter

public java.lang.String getParameter(java.lang.String name)

getParameter

public int getParameter(java.lang.String name,
                        int defaultValue)

hasSimulationID

public boolean hasSimulationID()

getSimulationID

public int getSimulationID()

setSimulationID

public void setSimulationID(int simulationID)

getStartTime

public long getStartTime()

setStartTime

public void setStartTime(long startTime)

getEndTime

public long getEndTime()

getSimulationLength

public int getSimulationLength()
Returns the simulation length in milliseconds


isEmpty

public boolean isEmpty()

isFull

public boolean isFull()

setFull

public void setFull()

getFlags

public int getFlags()

setFlags

public void setFlags(int flags)

getParticipantCount

public int getParticipantCount()

getParticipantID

public int getParticipantID(int index)

isBuiltinParticipant

public boolean isBuiltinParticipant(int index)

getParticipantRole

public int getParticipantRole(int index)

indexOfParticipant

public int indexOfParticipant(int agentID)

isParticipant

public boolean isParticipant(int agentID)

addParticipant

public boolean addParticipant(int agentID,
                              int role)
Adds the specified agent with the specified role.

Parameters:
agentID - the id of the participating agent to add
role - the role of the agent (as specified by the simulation manager)

copyParticipants

public void copyParticipants(SimulationInfo info)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getTransportName

public java.lang.String getTransportName()
Description copied from interface: Transportable
Returns the transport name used for externalization.

Specified by:
getTransportName in interface Transportable

read

public void read(TransportReader reader)
          throws java.text.ParseException
Description copied from interface: Transportable
Reads the state for this transportable from the specified reader.

Specified by:
read in interface Transportable
Parameters:
reader - the reader to read data from
Throws:
java.text.ParseException - if a parse error occurs

write

public void write(TransportWriter writer)
Description copied from interface: Transportable
Writes the state for this transportable to the specified writer.

Specified by:
write in interface Transportable
Parameters:
writer - the writer to write data to


Copyright © 2007-2009 Association for Trading Agent Research. All Rights Reserved.