package nl.tudelft.simulation.examples.dsol.mm1queue;
import nl.tudelft.simulation.dsol.formalisms.Resource;
import nl.tudelft.simulation.dsol.simtime.SimTimeDouble;
import nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface;
/**
* The Seize is an extended Seize block whic sets delay times on arriving customers.
* Copyright (c) 2003-2018 Delft University of Technology , the
* Netherlands.
* See for project information www.simulation.tudelft.nl
* License of use: General Public License (GPL) , no warranty
* @version 2.0 21.09.2003
* @author Peter Jacobs
*/
public class Seize extends nl.tudelft.simulation.dsol.formalisms.flow.Seize.TimeDouble
{
/** */
private static final long serialVersionUID = 1L;
/**
* constructs a new Seize.
* @param simulator the devs simulator on which to schedule
* @param resource the resource to claim
*/
public Seize(final DEVSSimulatorInterface.TimeDouble simulator,
final Resource resource)
{
super(simulator, resource);
}
/**
* constructs a new Seize.
* @param simulator the devs simulator on which to schedule
* @param resource the resource to claim
* @param requestedCapacity the amount to claim
*/
public Seize(final DEVSSimulatorInterface.TimeDouble simulator,
final Resource resource, final double requestedCapacity)
{
super(simulator, resource, requestedCapacity);
}
/** {@inheritDoc} */
@Override
public final void receiveObject(final Object object)
{
Customer customer = (Customer) object;
customer.setEntranceTime(this.simulator.getSimulatorTime());
super.receiveObject(object);
}
}