org.gscg.gameactors
Class GameSupplier

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.Supplier
                  extended byorg.gscg.gameactors.GameSupplier
All Implemented Interfaces:
nl.tudelft.simulation.actor.ActorInterface, GameActorInterface, nl.tudelft.simulation.content.HandlerInterface, nl.tudelft.simulation.dsol.animation.LocatableInterface, java.io.Serializable

public class GameSupplier
extends nl.tudelft.simulation.supplychain.reference.Supplier
implements GameActorInterface

The GameSupplier extends a Supplier 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.2 $ $Date: 2005/08/10 11:23:30 $
Author:
Alexander Verbraeck
See Also:
Serialized Form

Field Summary
 
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
GameSupplier(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 GameSupplier; used when dragging and dropping an actor
GameSupplier(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)
          constructs a new GameSupplier
GameSupplier(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)
          constructs a new GameSupplier
 
Method Summary
 double calculateDistance(nl.tudelft.simulation.supplychain.actor.SupplyChainActor actor)
           
protected  GisActorAnimation getAnimation()
           
 javax.media.j3d.Bounds getBounds()
           
 java.lang.String getName()
           
 nl.tudelft.simulation.language.d3.DirectedPoint getSmallMapLocation()
           
 void sendContent(nl.tudelft.simulation.supplychain.content.Content content, double administrativeDelay)
           
 void setSmallMapLocation(nl.tudelft.simulation.language.d3.DirectedPoint smallMapLocation)
           
 
Methods inherited from class nl.tudelft.simulation.supplychain.reference.Supplier
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
 

Constructor Detail

GameSupplier

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

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

GameSupplier

public GameSupplier(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)
constructs a new GameSupplier

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

GameSupplier

public GameSupplier(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)
constructs a new GameSupplier

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
Method Detail

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()

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)


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