Theme
Probability / Blocking
When systems operate under finite physical capacity (queue limits, buffer bounds, or restricted connections), requests that arrive when the system is full experience immediate degradation. The blocking and loss probability metric quantifies how often the system reaches capacity saturation and rejects incoming work.
The Core Expression
The percentage probability of finding the system with zero available capacity is expressed directly as:
P{#Slots = 0} * 100The operator P{ } calculates the fraction of simulation time during which the condition was true. Multiplied by 100, it yields the percentage of time the system operated at maximum saturation.
Blocking vs. Dropping: Modeling Distinction
Two distinct behaviors occur when a system reaches capacity:
| Property | Blocking | Dropping / Loss |
|---|---|---|
| Behavior | Arriving items wait outside until a slot is freed | Arriving items that find no slots are discarded immediately |
| Real-world example | Assembly line conveyor belt that pauses | Dropped phone call, discarded UDP packet |
| Petri Net Modeling | Arrival transition consumes a slot token to fire | Arrival transition always fires and branches into Accept or Drop |
Modeling Explicit Workload Dropping
When rejected requests are discarded, the net models the branching logic explicitly using immediate transitions and inhibitor arcs:
json
{
"modelName": "Fila com recusa de clientes",
"definitions": [
{
"name": "TEMPO_ENTRE_CHEGADAS",
"type": "DOUBLE",
"value": "10"
},
{
"name": "TEMPO_DE_ATENDIMENTO",
"type": "DOUBLE",
"value": "5"
},
{
"name": "VAGAS",
"type": "INTEGER",
"value": "3"
},
{
"name": "PASSAGEM",
"type": "DOUBLE",
"value": "0.0001"
}
],
"places": [
{
"name": "Vagas",
"initialMarking": 3,
"stringMarking": "VAGAS",
"initialStringMarking": "VAGAS"
},
{
"name": "Fila",
"initialMarking": 0,
"stringMarking": "0",
"initialStringMarking": "0"
},
{
"name": "Atendente",
"initialMarking": 1,
"stringMarking": "1",
"initialStringMarking": "1"
},
{
"name": "EmAtendimento",
"initialMarking": 0,
"stringMarking": "0",
"initialStringMarking": "0"
},
{
"name": "Chegando",
"initialMarking": 0,
"stringMarking": "0",
"initialStringMarking": "0"
},
{
"name": "Perdidos",
"initialMarking": 0,
"stringMarking": "0",
"initialStringMarking": "0"
}
],
"rewardMeasures": [
{
"name": "cheio_pct",
"expression": "P{#Vagas = 0} * 100"
},
{
"name": "taxa_de_perda",
"expression": "E{#Perdidos} / PASSAGEM"
},
{
"name": "vazao",
"expression": "E{#EmAtendimento} / TEMPO_DE_ATENDIMENTO"
}
],
"transitions": [
{
"name": "Chegada",
"type": "TIMED",
"firingPolicy": "SINGLE_SERVER",
"raceType": "RACE_WITH_ENABLING_MEMORY",
"priority": 1,
"distribution": {
"type": "exponential",
"parameters": {
"Mean delay": "TEMPO_ENTRE_CHEGADAS"
}
},
"inputArcs": [],
"outputArcs": [
{
"type": "OUTPUT",
"place": "Chegando",
"multiplicity": 1
}
],
"inhibitorArcs": []
},
{
"name": "Inicio",
"type": "IMMEDIATE",
"firingPolicy": "SINGLE_SERVER",
"raceType": "RACE_WITH_ENABLING_MEMORY",
"priority": 1,
"weight": 1,
"inputArcs": [
{
"type": "INPUT",
"place": "Fila",
"multiplicity": 1
},
{
"type": "INPUT",
"place": "Atendente",
"multiplicity": 1
}
],
"outputArcs": [
{
"type": "OUTPUT",
"place": "EmAtendimento",
"multiplicity": 1
}
],
"inhibitorArcs": []
},
{
"name": "Fim",
"type": "TIMED",
"firingPolicy": "INFINITY_SERVER",
"raceType": "RACE_WITH_ENABLING_MEMORY",
"priority": 1,
"distribution": {
"type": "exponential",
"parameters": {
"Mean delay": "TEMPO_DE_ATENDIMENTO"
}
},
"inputArcs": [
{
"type": "INPUT",
"place": "EmAtendimento",
"multiplicity": 1
}
],
"outputArcs": [
{
"type": "OUTPUT",
"place": "Atendente",
"multiplicity": 1
},
{
"type": "OUTPUT",
"place": "Vagas",
"multiplicity": 1
}
],
"inhibitorArcs": []
},
{
"name": "Aceita",
"type": "IMMEDIATE",
"firingPolicy": "SINGLE_SERVER",
"raceType": "RACE_WITH_ENABLING_MEMORY",
"priority": 1,
"weight": 1,
"inputArcs": [
{
"type": "INPUT",
"place": "Chegando",
"multiplicity": 1
},
{
"type": "INPUT",
"place": "Vagas",
"multiplicity": 1
}
],
"outputArcs": [
{
"type": "OUTPUT",
"place": "Fila",
"multiplicity": 1
}
],
"inhibitorArcs": []
},
{
"name": "Recusa",
"type": "IMMEDIATE",
"firingPolicy": "SINGLE_SERVER",
"raceType": "RACE_WITH_ENABLING_MEMORY",
"priority": 1,
"weight": 1,
"inputArcs": [
{
"type": "INPUT",
"place": "Chegando",
"multiplicity": 1
}
],
"outputArcs": [
{
"type": "OUTPUT",
"place": "Perdidos",
"multiplicity": 1
}
],
"inhibitorArcs": [
{
"type": "INHIBITOR",
"place": "Vagas",
"multiplicity": 1
}
]
},
{
"name": "Descarta",
"type": "TIMED",
"firingPolicy": "INFINITY_SERVER",
"raceType": "RACE_WITH_ENABLING_MEMORY",
"priority": 1,
"distribution": {
"type": "exponential",
"parameters": {
"Mean delay": "PASSAGEM"
}
},
"inputArcs": [
{
"type": "INPUT",
"place": "Perdidos",
"multiplicity": 1
}
],
"outputArcs": [],
"inhibitorArcs": []
}
]
}- Accept Path: Consumes 1 available slot token and routes the request into the waiting queue.
- Drop Path: Connects to
Slotsvia an inhibitor arc. It fires only whenSlotshas 0 tokens, routing the request toDropped.
An immediate transition Discard flushes tokens from Dropped, enabling direct computation of the drop rate:
E{#Dropped} / TRANSIT_DELAYVerifying Flow Conservation
In any properly formulated model with dropping, total arrival rate must balance against served throughput and loss rate:
| Quantity | Simulation Output |
|---|---|
| Nominal arrival rate | 0.1000 items/min |
| Served throughput | 0.0933 items/min |
| Loss rate | 0.0067 items/min |
| Served throughput + Loss rate | 0.1000 items/min ✓ |
If this sum diverges, an arc in the model is creating or destroying tokens unexpectedly.
Correlating Blocking with Response Time
Restricting queue capacity reduces waiting time for admitted users, but at the cost of rejecting others:
| Available slots | % Time full | Completed throughput | Mean response time |
|---|---|---|---|
| 1 slot | 33.4% | 0.067 | 5.0 min |
| 3 slots | 6.7% | 0.093 | 7.9 min |
| 10 slots | 0.0% | 0.100 | 10.0 min |
With 1 slot, the average response time is the fastest in the table (5 minutes) — but the system turns away 1 out of every 3 incoming requests!
Never present response time in isolation
Presenting lower response times without showing the corresponding rejection rate masks severe service degradation. A fast response time achieved by dropping significant traffic indicates misconfigured capacity.
Next steps
Learn how to configure and execute stochastic engines in 5 · Execution and Analysis.