org.gscg.gameactors
Class GameMarket
java.lang.Object
nl.tudelft.simulation.actor.Actor
nl.tudelft.simulation.supplychain.actor.SupplyChainActor
nl.tudelft.simulation.supplychain.reference.Customer
org.gscg.gameactors.GameMarket
- 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 GameMarket
- extends nl.tudelft.simulation.supplychain.reference.Customer
- implements GameActorInterface
The GameMarket extends a Customer 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.1 $ $Date: 2005/08/03 08:52:50 $
- Author:
- Alexander
Verbraeck
- See Also:
- Serialized Form
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 |
GameMarket(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 GameMarket; used when dragging and dropping an actor |
GameMarket(java.lang.String name,
nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface simulator,
javax.vecmath.Point3d position,
nl.tudelft.simulation.supplychain.banking.Bank bank,
double initialBankAccount,
nl.tudelft.simulation.supplychain.product.Product[] product,
nl.tudelft.simulation.supplychain.demand.Demand[] demand,
nl.tudelft.simulation.supplychain.reference.Retailer[] retailer)
constructs a new GameMarket |
Methods inherited from class nl.tudelft.simulation.supplychain.reference.Customer |
getBuyingRole, getDemandGenerationRole, handleContent, setBuyingRole, setDemandGenerationRole |
Methods inherited from class nl.tudelft.simulation.supplychain.actor.SupplyChainActor |
addFixedCost, addRole, getBankAccount, getContentStore, getDEVSSimulator, getFixedCosts, removeRole, scheduledSendContent, scheduledSendContent, sendContent, 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 |
GameMarket
public GameMarket(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 GameMarket; used when dragging and dropping an actor
- Parameters:
name
- the namesimulator
- the simulatorposition
- the positionbank
- the bank
GameMarket
public GameMarket(java.lang.String name,
nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface simulator,
javax.vecmath.Point3d position,
nl.tudelft.simulation.supplychain.banking.Bank bank,
double initialBankAccount,
nl.tudelft.simulation.supplychain.product.Product[] product,
nl.tudelft.simulation.supplychain.demand.Demand[] demand,
nl.tudelft.simulation.supplychain.reference.Retailer[] retailer)
throws java.rmi.RemoteException
- constructs a new GameMarket
- Parameters:
name
- the namesimulator
- the simulatorposition
- the positionbank
- the bankinitialBankAccount
- the initial bank accountproduct
- the productdemand
- the demand generators for the productsretailer
- the retailer
- Throws:
java.rmi.RemoteException
- thrown in case of a network exception
init
public void init()
throws java.rmi.RemoteException
- Throws:
java.rmi.RemoteException
- thrown in case of a network error
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)
changeDemand
public void changeDemand(nl.tudelft.simulation.supplychain.product.Product product,
boolean up,
double percentage)
- Method changeDemand changes the demand of a PCMarket for the specified
product.
- Parameters:
product
- the product to change the demand forup
- if true, demand will increase, if false, the demand will
decreasepercentage
- the percentage to change the demand with
Copyright © 2002-2005 Delft University of Technology, the Netherlands. All Rights Reserved.