org.gscg.gameactors
Class GameManufacturer

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 bynl.tudelft.simulation.supplychain.reference.DistributionCenter
                      extended bynl.tudelft.simulation.supplychain.reference.Manufacturer
                          extended byorg.gscg.gameactors.GameManufacturer
All Implemented Interfaces:
nl.tudelft.simulation.actor.ActorInterface, GameActorInterface, GameInteractiveActorRoleInterface, nl.tudelft.simulation.content.HandlerInterface, nl.tudelft.simulation.dsol.animation.LocatableInterface, java.io.Serializable
Direct Known Subclasses:
GameManufacturerInteractive

public class GameManufacturer
extends nl.tudelft.simulation.supplychain.reference.Manufacturer
implements GameActorInterface, GameInteractiveActorRoleInterface

The GameManufacturer extends a Manufacturer from the supplychain project and provides additional game-specific 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.4 $ $Date: 2005/08/10 11:23:30 $
Author:
Alexander Verbraeck
See Also:
Serialized Form

Field Summary
protected static org.jdom.input.SAXBuilder builder
          builder the xerces parser with validation turned on
protected  CustomerStatistics customerStatistics
          the customer statistisc for this player
protected  GameGlobalData globalSupplyChainData
          the global supply chain game data
protected  boolean humanControlled
          if true than we use any human intervention
protected  InteractiveQuoteHandler interactiveQuoteHandler
          the special interactive quotehander
protected  CalculateLatLonDistance latLonDistanceCalculator
          the lat lon distance calculator to use
protected  nl.tudelft.simulation.supplychain.actor.Trader[] suppliers
          the suppliers where the GameManufacturer buys
protected  boolean warmingUp
          true for warming-up
 
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
GameManufacturer(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 GameManufacturer; used when dragging and dropping an actor
GameManufacturer(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, GameGlobalData globalSupplyChainData, nl.tudelft.simulation.supplychain.actor.Trader[] suppliers)
          constructs a new GameManufacturer
GameManufacturer(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, GameGlobalData globalSupplyChainData, nl.tudelft.simulation.supplychain.actor.Trader[] suppliers)
          constructs a new GameManufacturer
 
Method Summary
protected  void addComputerControlledContentHandlers()
          adds computer-controlled interactive content handlers
protected  void addDevices()
           
 double calculateDistance(nl.tudelft.simulation.supplychain.actor.SupplyChainActor actor)
           
 void fireAllContentData(java.lang.Class contentClass, boolean sent, java.lang.String productName)
          Method getContent returns all data objects of type contentClass
 void fireAllNumberData()
          Method fireAllNumberData.
protected  GisActorAnimation getAnimation()
           
 javax.media.j3d.Bounds getBounds()
           
 GameActorContentStore getGameContentStore()
          Method getGameContentStore
 RFQDataSuppliers getInitialRFQData(java.lang.String productName)
           
 java.lang.String getName()
           
 java.util.Map getProductNameToSuppliers()
           
 nl.tudelft.simulation.language.d3.DirectedPoint getSmallMapLocation()
           
protected  void init()
          Method init
 boolean isHumanControlled()
           
protected  void removeAllContentHandlers()
          removes all the content handlers
 void sendContent(nl.tudelft.simulation.supplychain.content.Content content, double administrativeDelay)
           
 void setInteractiveQuoteHandler(InteractiveQuoteHandler interactiveQuoteHandler)
          sets the interactive quote handler
 void setSmallMapLocation(nl.tudelft.simulation.language.d3.DirectedPoint smallMapLocation)
           
 
Methods inherited from class nl.tudelft.simulation.supplychain.reference.Manufacturer
addProductionService, getEndProducts, getRawMaterials
 
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, handleContent, 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
 
Methods inherited from interface nl.tudelft.simulation.content.HandlerInterface
handleContent
 

Field Detail

builder

protected static org.jdom.input.SAXBuilder builder
builder the xerces parser with validation turned on


suppliers

protected nl.tudelft.simulation.supplychain.actor.Trader[] suppliers
the suppliers where the GameManufacturer buys


globalSupplyChainData

protected GameGlobalData globalSupplyChainData
the global supply chain game data


customerStatistics

protected CustomerStatistics customerStatistics
the customer statistisc for this player


interactiveQuoteHandler

protected InteractiveQuoteHandler interactiveQuoteHandler
the special interactive quotehander


humanControlled

protected boolean humanControlled
if true than we use any human intervention


warmingUp

protected boolean warmingUp
true for warming-up


latLonDistanceCalculator

protected CalculateLatLonDistance latLonDistanceCalculator
the lat lon distance calculator to use

Constructor Detail

GameManufacturer

public GameManufacturer(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 GameManufacturer; used when dragging and dropping an actor

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

GameManufacturer

public GameManufacturer(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,
                        GameGlobalData globalSupplyChainData,
                        nl.tudelft.simulation.supplychain.actor.Trader[] suppliers)
constructs a new GameManufacturer

Parameters:
name - the name
simulator - the simulator
position - the position on the map
roles - the roles to implement
bank - the bank
product - the product
amount - the amount
globalSupplyChainData - the global supply chain data
suppliers - the suppliers

GameManufacturer

public GameManufacturer(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,
                        GameGlobalData globalSupplyChainData,
                        nl.tudelft.simulation.supplychain.actor.Trader[] suppliers)
constructs a new GameManufacturer

Parameters:
name - the name
simulator - the simulator
position - the position on the map
roles - the roles to implement
bank - the bank
initialBankAccount - the initial bank account
product - the product
amount - the amount
globalSupplyChainData - the global supply chain data
suppliers - the suppliers
Method Detail

init

protected void init()
Method init


addComputerControlledContentHandlers

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


sendContent

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

getBounds

public javax.media.j3d.Bounds getBounds()
Specified by:
getBounds in interface nl.tudelft.simulation.dsol.animation.LocatableInterface
See Also:
LocatableInterface.getBounds()

getGameContentStore

public GameActorContentStore getGameContentStore()
Description copied from interface: GameInteractiveActorRoleInterface
Method getGameContentStore

Specified by:
getGameContentStore in interface GameInteractiveActorRoleInterface
Returns:
returns the game actor content store
See Also:
GameInteractiveActorRoleInterface.getGameContentStore()

fireAllContentData

public void fireAllContentData(java.lang.Class contentClass,
                               boolean sent,
                               java.lang.String productName)
Method getContent returns all data objects of type contentClass

Parameters:
contentClass - the content class to look for
sent - indicates whether the content is sent or received
productName - the name of the product

fireAllNumberData

public void fireAllNumberData()
Method fireAllNumberData.


getInitialRFQData

public RFQDataSuppliers getInitialRFQData(java.lang.String productName)
Parameters:
productName - the product we want
Returns:
an initialized RFQData object with potential suppliers

getSmallMapLocation

public nl.tudelft.simulation.language.d3.DirectedPoint getSmallMapLocation()
Specified by:
getSmallMapLocation in interface GameActorInterface
Returns:
Returns the smallMapLocation.

setSmallMapLocation

public void setSmallMapLocation(nl.tudelft.simulation.language.d3.DirectedPoint smallMapLocation)
Parameters:
smallMapLocation - The smallMapLocation to set.

getName

public java.lang.String getName()
Specified by:
getName in interface nl.tudelft.simulation.actor.ActorInterface
See Also:
ActorInterface.getName()

getAnimation

protected GisActorAnimation getAnimation()
Returns:
Returns the animation

calculateDistance

public double calculateDistance(nl.tudelft.simulation.supplychain.actor.SupplyChainActor actor)
See Also:
SupplyChainActor.calculateDistance(nl.tudelft.simulation.supplychain.actor.SupplyChainActor)

getProductNameToSuppliers

public java.util.Map getProductNameToSuppliers()
Returns:
Returns the productNameToSuppliers.

isHumanControlled

public boolean isHumanControlled()
Returns:
true if human controlled, false otherwise

setInteractiveQuoteHandler

public void setInteractiveQuoteHandler(InteractiveQuoteHandler interactiveQuoteHandler)
sets the interactive quote handler

Parameters:
interactiveQuoteHandler - the interactive quote handler to set

removeAllContentHandlers

protected void removeAllContentHandlers()
removes all the content handlers


addDevices

protected void addDevices()


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