ggcq package

Submodules

ggcq.ggcq module

Copyright 2015 The pyggcq Developers

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

class ggcq.ggcq.GGCQ(arrival_time_generator, service_time_generator, capacity=1)[source]

Bases: object

now[source]
run(until=None)[source]
exception ggcq.ggcq.GGCQArrivalTimeTypeError[source]

Bases: exceptions.TypeError

Exception thrown if arrival time is of wrong type

exception ggcq.ggcq.GGCQNegativeArrivalTimeError[source]

Bases: exceptions.ValueError

Exception thrown if arrival time is negative

exception ggcq.ggcq.GGCQNegativeServiceTimeError[source]

Bases: exceptions.ValueError

Exception thrown if service time is negative

exception ggcq.ggcq.GGCQServiceTimeStopIteration[source]

Bases: exceptions.RuntimeError

Exception thrown if service time generator is exhausted

Should not base StopIteration as simpy uses that exception to signify the end of the process!

exception ggcq.ggcq.GGCQServiceTimeTypeError[source]

Bases: exceptions.TypeError

Exception thrown if service time is of wrong type

class ggcq.ggcq.Queue(env, service_time_generator, observer, capacity=1)[source]

Bases: object

process(job_id)[source]

Process a job by the queue

queue[source]
class ggcq.ggcq.RawDataObserver[source]

Bases: object

JOB_COLUMNS = ['arrival_epoch', 'service_epoch', 'departure_epoch']
jobs[source]
notify_arrival(time, job_id)[source]
notify_departure(time, job_id)[source]
notify_service(time, job_id)[source]
class ggcq.ggcq.Source(env, queue, arrival_time_generator, observer)[source]

Bases: object

generate()[source]

Source generates jobs according to the interarrival time distribution

Module contents

Copyright 2015 The pyggcq Developers

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.