org.gscg.gameactors
Class GameDistributorInteractive

java.lang.Object
  extended bynl.tudelft.simulation.actor.Actor
      extended bynl.tudelft.simulation.supplychain.actor.SupplyChainActor
          extended bynl.tudelft.simulation.supplychain.actor.Trader
              extended bynl.tudelft.simulation.supplychain.reference.Retailer
                  extended byorg.gscg.gameactors.GameDistributor
                      extended byorg.gscg.gameactors.GameDistributorInteractive
All Implemented Interfaces:
nl.tudelft.simulation.actor.ActorInterface, AnnounceInterface, java.util.EventListener, nl.tudelft.simulation.event.EventListenerInterface, GameActorInteractiveInterface, GameActorInterface, GameInteractiveActorRoleInterface, nl.tudelft.simulation.content.HandlerInterface, nl.tudelft.simulation.dsol.animation.LocatableInterface, java.io.Serializable

public class GameDistributorInteractive
extends GameDistributor
implements GameActorInteractiveInterface, AnnounceInterface

The GameDistributorInteractive extends a GameDistributor from the supplychain-game project and provides additional interactive functionalities.
Copyright (c) 2003-2005 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl . The source code and binary code of this software is proprietary information of Delft University of Technology.

Since:
1.0.0
Version:
$Revision: 1.2 $ $Date: 2005/08/09 15:43:40 $
Author:
Alexander Verbraeck
See Also:
Serialized Form

Field Summary
static nl.tudelft.simulation.event.EventType ORDER_CONFIRMATION_SENT_BY_CLIENT_EVENT
          a client has confirmed an order
static nl.tudelft.simulation.event.EventType PAY_BILL_EVENT
          a client has selected a bill to pay
static nl.tudelft.simulation.event.EventType QUOTE_SENT_BY_CLIENT_EVENT
          a client has selected an rfq and sent a quote
static nl.tudelft.simulation.event.EventType RFQ_DELETED_BY_CLIENT_EVENT
          a client has deleted an rfq
static nl.tudelft.simulation.event.EventType RFQ_SENT_BY_CLIENT_EVENT
          a client has sent an RFQ which forms the basis for a quote
static nl.tudelft.simulation.event.EventType SELECTED_QUOTE_EVENT
          a client has selected a quote which forms the basis for an order
 
Fields inherited from class org.gscg.gameactors.GameDistributor
builder, customerStatistics, globalSupplyChainData, humanControlled, interactiveQuoteHandler, latLonDistanceCalculator, manufacturer, warmingUp
 
Fields inherited from class nl.tudelft.simulation.supplychain.actor.Trader
stock
 
Fields inherited from class nl.tudelft.simulation.supplychain.actor.SupplyChainActor
bankAccount
 
Fields inherited from class nl.tudelft.simulation.actor.Actor
contentHandlers, location, locationDescription, name, receivingDevices, sendingDevices, simulator
 
Constructor Summary
GameDistributorInteractive(GameGlobalData globalSupplyChainData, java.lang.String name, nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface simulator, javax.vecmath.Point3d position, nl.tudelft.simulation.supplychain.roles.Role[] roles, nl.tudelft.simulation.supplychain.banking.Bank bank, double initialBankAccount, nl.tudelft.simulation.supplychain.product.Product[] product, java.lang.Double[] amount, nl.tudelft.simulation.supplychain.actor.Trader[] manufacturer)
          constructs a new GameDistributorInteractive
GameDistributorInteractive(GameGlobalData globalSupplyChainData, java.lang.String name, nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface simulator, javax.vecmath.Point3d position, nl.tudelft.simulation.supplychain.roles.Role[] roles, nl.tudelft.simulation.supplychain.banking.Bank bank, nl.tudelft.simulation.supplychain.product.Product[] product, java.lang.Double[] amount, nl.tudelft.simulation.supplychain.actor.Trader[] manufacturer)
          constructs a new GameDistributorInteractive
GameDistributorInteractive(java.lang.String name, nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface simulator, javax.vecmath.Point3d position, nl.tudelft.simulation.supplychain.banking.Bank bank)
          constructs a new GameDistributorInteractive; used when dragging and dropping an actor
 
Method Summary
 void addComputerControlledContentHandlers()
          adds computer-controlled interactive content handlers
protected  void addDevices()
           
 void addInteractiveContentHandlers()
          adds interactive content handlers
 void announce(nl.tudelft.simulation.event.EventType eventType, boolean announce)
          Method announce.
static java.util.Set getChangedDistributors()
           
 SingleUserInteractionLayerInterface getSingleUserInteractionLayer()
          Method getSingleUserInteractionLayer.
 boolean handleContent(java.io.Serializable content)
           
protected  void init()
          initializes the content handlers
 void notify(nl.tudelft.simulation.event.EventInterface event)
           
 void pay(nl.tudelft.simulation.supplychain.content.Bill bill)
          pays the bill
 void sendContent(nl.tudelft.simulation.supplychain.content.Content content, double administrativeDelay)
           
 void setSingleUserInteractionLayer(SingleUserInteractionLayerInterface singleUserInteractionLayer)
           
 
Methods inherited from class org.gscg.gameactors.GameDistributor
calculateDistance, fireAllContentData, fireAllNumberData, getAnimation, getBounds, getGameContentStore, getInitialRFQData, getName, getProductNameToSuppliers, getSmallMapLocation, isHumanControlled, removeAllContentHandlers, setInteractiveQuoteHandler, setSmallMapLocation
 
Methods inherited from class nl.tudelft.simulation.supplychain.reference.Retailer
checkStock
 
Methods inherited from class nl.tudelft.simulation.supplychain.actor.Trader
getProductsOnStock, getStock, setInitialStock
 
Methods inherited from class nl.tudelft.simulation.supplychain.actor.SupplyChainActor
addFixedCost, addRole, getBankAccount, getContentStore, getDEVSSimulator, getFixedCosts, removeRole, scheduledSendContent, scheduledSendContent, setContentStore
 
Methods inherited from class nl.tudelft.simulation.actor.Actor
addContentHandler, addReceivingDevice, addReceivingDevice, addSendingDevice, checkReceivingDevice, getLocation, getLocationDescription, getReceivingDevices, getReceivingDevices, getSendingDevices, getSendingDevices, getSimulator, getSimulatorTime, handleMessage, removeContentHandler, removeReceivingDevice, removeSendingDevice, resolveFastestDevice, setCheckInterval, setLocationDescription, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface nl.tudelft.simulation.actor.ActorInterface
getReceivingDevices, getReceivingDevices, getSendingDevices, getSendingDevices, getSimulator, getSimulatorTime, handleMessage
 
Methods inherited from interface nl.tudelft.simulation.dsol.animation.LocatableInterface
getLocation
 

Field Detail

RFQ_SENT_BY_CLIENT_EVENT

public static final nl.tudelft.simulation.event.EventType RFQ_SENT_BY_CLIENT_EVENT
a client has sent an RFQ which forms the basis for a quote


SELECTED_QUOTE_EVENT

public static final nl.tudelft.simulation.event.EventType SELECTED_QUOTE_EVENT
a client has selected a quote which forms the basis for an order


PAY_BILL_EVENT

public static final nl.tudelft.simulation.event.EventType PAY_BILL_EVENT
a client has selected a bill to pay


QUOTE_SENT_BY_CLIENT_EVENT

public static final nl.tudelft.simulation.event.EventType QUOTE_SENT_BY_CLIENT_EVENT
a client has selected an rfq and sent a quote


RFQ_DELETED_BY_CLIENT_EVENT

public static final nl.tudelft.simulation.event.EventType RFQ_DELETED_BY_CLIENT_EVENT
a client has deleted an rfq


ORDER_CONFIRMATION_SENT_BY_CLIENT_EVENT

public static final nl.tudelft.simulation.event.EventType ORDER_CONFIRMATION_SENT_BY_CLIENT_EVENT
a client has confirmed an order

Constructor Detail

GameDistributorInteractive

public GameDistributorInteractive(java.lang.String name,
                                  nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface simulator,
                                  javax.vecmath.Point3d position,
                                  nl.tudelft.simulation.supplychain.banking.Bank bank)
constructs a new GameDistributorInteractive; used when dragging and dropping an actor

Parameters:
name - the name
simulator - the simulator
position - the position
bank - the bank

GameDistributorInteractive

public GameDistributorInteractive(GameGlobalData globalSupplyChainData,
                                  java.lang.String name,
                                  nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface simulator,
                                  javax.vecmath.Point3d position,
                                  nl.tudelft.simulation.supplychain.roles.Role[] roles,
                                  nl.tudelft.simulation.supplychain.banking.Bank bank,
                                  double initialBankAccount,
                                  nl.tudelft.simulation.supplychain.product.Product[] product,
                                  java.lang.Double[] amount,
                                  nl.tudelft.simulation.supplychain.actor.Trader[] manufacturer)
constructs a new GameDistributorInteractive

Parameters:
globalSupplyChainData - the global supply chain data
name - the name
simulator - the simulator
position - the position
roles - the roles to implement
bank - the bank
initialBankAccount - the initial bank account
product - the product
amount - the amount
manufacturer - the manufacturer

GameDistributorInteractive

public GameDistributorInteractive(GameGlobalData globalSupplyChainData,
                                  java.lang.String name,
                                  nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface simulator,
                                  javax.vecmath.Point3d position,
                                  nl.tudelft.simulation.supplychain.roles.Role[] roles,
                                  nl.tudelft.simulation.supplychain.banking.Bank bank,
                                  nl.tudelft.simulation.supplychain.product.Product[] product,
                                  java.lang.Double[] amount,
                                  nl.tudelft.simulation.supplychain.actor.Trader[] manufacturer)
constructs a new GameDistributorInteractive

Parameters:
globalSupplyChainData - the global supply chain data
name - the name
simulator - the simulator
position - the position
roles - the roles to implement
bank - the bank
product - the product
amount - the amount
manufacturer - the manufacturer
Method Detail

getChangedDistributors

public static java.util.Set getChangedDistributors()
Returns:
returns the set with distributors of which the interactivity mode has changed after deseriliazation due to changes in the distributor.properties file

init

protected void init()
Description copied from class: GameDistributor
initializes the content handlers

Overrides:
init in class GameDistributor
See Also:
GameDistributor.init()

addDevices

protected void addDevices()
Overrides:
addDevices in class GameDistributor
See Also:
GameDistributor.addDevices()

announce

public void announce(nl.tudelft.simulation.event.EventType eventType,
                     boolean announce)
Description copied from interface: AnnounceInterface
Method announce.

Specified by:
announce in interface AnnounceInterface
Parameters:
eventType - the eventType
announce - indicates whether this is an announce
See Also:
AnnounceInterface.announce(nl.tudelft.simulation.event.EventType, boolean)

notify

public void notify(nl.tudelft.simulation.event.EventInterface event)
Specified by:
notify in interface nl.tudelft.simulation.event.EventListenerInterface
See Also:
EventListenerInterface.notify(nl.tudelft.simulation.event.EventInterface)

pay

public void pay(nl.tudelft.simulation.supplychain.content.Bill bill)
pays the bill

Parameters:
bill - the bill to pay

handleContent

public boolean handleContent(java.io.Serializable content)
Specified by:
handleContent in interface nl.tudelft.simulation.content.HandlerInterface
See Also:
HandlerInterface.handleContent(java.io.Serializable)

sendContent

public void sendContent(nl.tudelft.simulation.supplychain.content.Content content,
                        double administrativeDelay)
See Also:
SupplyChainActor.sendContent(nl.tudelft.simulation.supplychain.content.Content, double)

getSingleUserInteractionLayer

public SingleUserInteractionLayerInterface getSingleUserInteractionLayer()
Description copied from interface: GameActorInteractiveInterface
Method getSingleUserInteractionLayer.

Specified by:
getSingleUserInteractionLayer in interface GameActorInteractiveInterface
Returns:
returns the SingleUserInteractionLayer
See Also:
GameActorInteractiveInterface.getSingleUserInteractionLayer()

setSingleUserInteractionLayer

public void setSingleUserInteractionLayer(SingleUserInteractionLayerInterface singleUserInteractionLayer)
Specified by:
setSingleUserInteractionLayer in interface GameActorInteractiveInterface
Parameters:
singleUserInteractionLayer - the singel user interactionlayer
See Also:
GameActorInteractiveInterface.setSingleUserInteractionLayer(org.gscg.singleuser.interactionlayer.SingleUserInteractionLayerInterface)

addComputerControlledContentHandlers

public void addComputerControlledContentHandlers()
adds computer-controlled interactive content handlers

Overrides:
addComputerControlledContentHandlers in class GameDistributor

addInteractiveContentHandlers

public void addInteractiveContentHandlers()
adds interactive content handlers



Copyright © 2002-2005 Delft University of Technology, the Netherlands. All Rights Reserved.