package nl.tudelft.simulation.examples.dsol.mm1queue; import java.io.Serializable; 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-2020 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See * for project information https://simulation.tudelft.nl. The DSOL * project is distributed under a three-clause BSD-style license, which can be found at * * https://simulation.tudelft.nl/dsol/3.0/license.html. *

* @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 id the id of the Release block * @param simulator DEVSSimulatorInterface.TimeDouble; the devs simulator on which to schedule * @param resource Resource<Double,Double,SimTimeDouble>; the resource to claim */ public Seize(final Serializable id, final DEVSSimulatorInterface.TimeDouble simulator, final Resource resource) { super(id, simulator, resource); } /** * constructs a new Seize. * @param id the id of the Release block * @param simulator DEVSSimulatorInterface.TimeDouble; the devs simulator on which to schedule * @param resource Resource<Double,Double,SimTimeDouble>; the resource to claim * @param requestedCapacity double; the amount to claim */ public Seize(final Serializable id, final DEVSSimulatorInterface.TimeDouble simulator, final Resource resource, final double requestedCapacity) { super(id, simulator, resource, requestedCapacity); } /** {@inheritDoc} */ @Override public final void receiveObject(final Object object) { Customer customer = (Customer) object; customer.setEntranceTime(this.simulator.getSimulatorTime()); super.receiveObject(object); } }