berth
Class Berth

java.lang.Object
  extended byaos.jack.jak.scheduler.Executee
      extended byaos.jack.jak.agent.Agent
          extended byberth.Berth
All Implemented Interfaces:
aos.dci.Addressable, aos.jack.jak.rvt.ContextProvider, aos.jack.jak.trace.Documented, aos.jack.jak.event.EventRecipient, aos.jack.jak.core.Generator, aos.jack.jak.rvt.MonitoredInterface, aos.jack.jak.agent.NameSpace

public class Berth
extends aos.jack.jak.agent.Agent

Berth-agent entity A Berth-agent is instanciated with static variables for capacity and size. A berht-agent has several get- and set methods to take care of the variables

See Also:
RequestHandling, ReceiveShipResponsibility, ShipRemover, InitiationOfLiftingArm, LiftingArmInitiation

Field Summary
 java.lang.String agentName
           
 java.util.ArrayList bidList
           
 RequestHandling cap
           
 ReceiveShipResponsibility cap1
           
 ShipRemover cap3
           
 InitiationOfLiftingArm cap4
           
 double draft
           
 int id
           
 int length
           
 java.util.ArrayList liftingArmList
           
 CostCalculator myCostCalculator
           
 java.util.ArrayList shipList
           
 int width
           
 
Fields inherited from class aos.jack.jak.agent.Agent
BEING_CREATED, blockedMonitor, changing_focus, detail_trace, FINISHED, FINISHING, HANDLED_EVENT, IGNORED_EVENT, INITIALIZING, NOBS, oboSNrMw, OBS_ALL, OBS_EVENT, OBS_MESSAGE, OBS_RUN, OBS_TASK, ociprWpm, ocSNrdSN, odLcvOCn, oDMLcsss, oDrWRssu, ods0CnoS, oDzMDWni, oDzWOPvO, oLDdizRu, omOlDrrM, onDrdini, ooc0lLSx, opOCpdSo, ouNdIPss, ovdSxOCl, ovmCnoLI, oxdSxRNm, oxpdcvnc, POSTED_EVENT, RUNNING, SENT_EVENT, state, thread_pool, timer, TO_BE_CREATED, WRITEABLE
 
Fields inherited from class aos.jack.jak.scheduler.Executee
obSoImmm, oiWpdc0C, omCnoIbo
 
Constructor Summary
Berth(int id, java.lang.String name, java.util.ArrayList liftingArmList, int length, int width, double draft)
          The constructor instanciate a Berth-agent.
 
Method Summary
 void __bindNames()
           
 void __init1()
           
 void __init2()
           
 void addBid(Bid bid)
          A bid is added to the berth's bidList
 void addShip(int index, Ship ship)
          A ship is added to the berth's shiplist.
 boolean bidIsSet()
          This method checks if wether the bidlist is empty
 void deleteShips(java.util.ArrayList shipToMoove)
          This method delete ships from the Berth's shipList
 int findTotLACapacity(java.lang.String product)
          Each liftingarm has it's own capacity.
 java.lang.String getAgentName()
          This method returns the name of the berth
 java.lang.Class getAgentType()
           
 int getBerthId()
          This method returns the berth ID
 int getBerthLength()
          This method returns the berth's length
 java.util.ArrayList getBid()
          This method returns the Berth's bidList
 java.lang.String getDocumentation()
           
 java.util.ArrayList getLiftingArmList()
          This method returns the berth's liftingarm list
 boolean hasProduct(java.lang.String product)
          This method checks if the Berth has a product
 void init_desc()
           
 boolean remove(Ship ship)
          Only one ship is removed from the shipList
 void setEnabled(boolean t)
           
 
Methods inherited from class aos.jack.jak.agent.Agent
addAgentConstructionListener, addBlocked, addEvent, addEvent, addGlobal, addKnownCapability, addNamedObject, addPlan, addShared, addTask, blockForTrace, bug, changeFocus, createEventStructure, createMessageManager, createTask, createTaskManager, createWaitForManager, describeState, discardReplies, dump, dump, dumpPlans, dumpToString, findEvent, findEvent, findEventFlags, findGlobal, findLocalAgent, findShared, finish, finishedTask, genCursor, genFSM, genObject, getAgent, getBasename, getContext, getCurrentAgent, getCurrentTask, getGlobal, getId, getIF, getKnownEvents, getKnownPlans, getMonitor, getName, getNamedObject, getNamedObject, getNamedObjectFlags, getObservable, getObservable, getReply, getTaskManager, inAgent, initialize, isBlocked, isEnabled, isIdle, name, newAgentDesc, nEvents, nMessages, nTasks, nTodo, ocxRNdSu, odoDMDMw, oducwvR0, oLLSNrWO, omrrdSNd, oOzMLilS, opOCnoIb, oRDWpmbN, orncvpmP, ouDdSuil, ouDMwvOP, ouininc0, ovdcwwvp, oxlDMwLS, postEvent, postEventAndWait, putGlobal, receive, receiveMessageEvent, removeAgentConstructionListener, removeBlocked, removeTask, removeTraceMethod, replied, reply, run, send, send, setNamedCreator, setNamedObject, setTraceMethod, startAgent, stop, testCondition, toString, trace, traceFinished, traceStarted, warning
 
Methods inherited from class aos.jack.jak.scheduler.Executee
oNPvOlIm, owsNbNbo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

shipList

public java.util.ArrayList shipList

bidList

public java.util.ArrayList bidList

liftingArmList

public java.util.ArrayList liftingArmList

agentName

public java.lang.String agentName

id

public int id

length

public int length

width

public int width

draft

public double draft

myCostCalculator

public CostCalculator myCostCalculator

cap

public RequestHandling cap

cap1

public ReceiveShipResponsibility cap1

cap3

public ShipRemover cap3

cap4

public InitiationOfLiftingArm cap4
Constructor Detail

Berth

public Berth(int id,
             java.lang.String name,
             java.util.ArrayList liftingArmList,
             int length,
             int width,
             double draft)
The constructor instanciate a Berth-agent.

Method Detail

getLiftingArmList

public java.util.ArrayList getLiftingArmList()
This method returns the berth's liftingarm list

Returns:
ArrayList liftingArmList

getAgentName

public java.lang.String getAgentName()
This method returns the name of the berth

Returns:
String agentName

getBerthId

public int getBerthId()
This method returns the berth ID

Returns:
int id

addShip

public void addShip(int index,
                    Ship ship)
A ship is added to the berth's shiplist. The list contains String-objects


getBerthLength

public int getBerthLength()
This method returns the berth's length

Returns:
int length

addBid

public void addBid(Bid bid)
A bid is added to the berth's bidList


getBid

public java.util.ArrayList getBid()
This method returns the Berth's bidList

Returns:
bidList

bidIsSet

public boolean bidIsSet()
This method checks if wether the bidlist is empty

Returns:
boolean true or false

hasProduct

public boolean hasProduct(java.lang.String product)
This method checks if the Berth has a product

Returns:
boolean true or false

deleteShips

public void deleteShips(java.util.ArrayList shipToMoove)
This method delete ships from the Berth's shipList


remove

public boolean remove(Ship ship)
Only one ship is removed from the shipList

Returns:
boolean true or false

findTotLACapacity

public int findTotLACapacity(java.lang.String product)
Each liftingarm has it's own capacity. This method finds the total capacity a berth can offer for a special kind of product.

Returns:
int totalCapacity

getDocumentation

public java.lang.String getDocumentation()

getAgentType

public java.lang.Class getAgentType()

__init1

public void __init1()

__init2

public void __init2()

init_desc

public void init_desc()

__bindNames

public void __bindNames()

setEnabled

public void setEnabled(boolean t)