1
0
mirror of https://github.com/imapsync/imapsync.git synced 2024-11-17 00:02:29 +01:00
imapsync/W/pdq/pdq_i005
Nick Bebout 275436c5a0 1.945
2019-07-02 18:25:47 -05:00

73 lines
2.3 KiB
Perl
Executable File

#!/usr/bin/perl
###############################################################################
# Copyright (C) 1994 - 2009, Performance Dynamics Company #
# #
# This software is licensed as described in the file COPYING, which #
# you should have received as part of this distribution. The terms #
# are also available at http://www.perfdynamics.com/Tools/copyright.html. #
# #
# You may opt to use, copy, modify, merge, publish, distribute and/or sell #
# copies of the Software, and permit persons to whom the Software is #
# furnished to do so, under the terms of the COPYING file. #
# #
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY #
# KIND, either express or implied. #
###############################################################################
#
# $Id: test.pl,v 4.5 2012/11/08 23:16:44 earl-lang Exp $
#
use pdq;
$arrivRate = 9.9;
$service_time = 0.1;
#$arrivRate = .00261165577342047930;
#$service_time = 1774.1;
#---- Initialize --------------------------------------------------------------
pdq::Init("OpenCenter");
pdq::SetComment("A simple M/M/1 queue");
#---- Define the queueing center ----------------------------------------------
$noNodes = pdq::CreateNode("server", $pdq::CEN, $pdq::FCFS);
#---- Define the workload and circuit type ------------------------------------
$noStreams = pdq::CreateOpen("work", $arrivRate);
pdq::SetWUnit("Customers");
pdq::SetTUnit("Seconds");
#---- Define service demand due to workload on the queueing center ------------
pdq::SetDemand("server", "work", $service_time);
#---- Solve the model ---------------------------------------------------------
# Must use the CANONical method for an open circuit
pdq::Solve($pdq::CANON);
#---- Generate a report -------------------------------------------------------
pdq::Report();
#printf "[print_nodes] Before 2\n";
#pdq::PrintNodes();
#printf "[print_nodes] After 2\n";
#printf "pdq::nodes = %d\n", $pdq::nodes;
#$node = pdq::GetNode(0);
#printf "Node->{devname}\n", $node->{devname};