Back to portfolio

PROJECT / MOBILITY-MARKOV-SIMULATOR

One fleet. Many futures.

RShinyMarkovMonte Carlo

What happens to a fleet as vehicles move, break down and return to service? Change the conditions and watch it evolve.

Reproducible project

What you can explore

The app represents a fleet moving between three stations. Change the travel probabilities, introduce breakdowns and decide whether vehicles get repaired or remain out of service. Charts then show where the fleet ends up and how many vehicles remain available. You can also compare the model's expected evolution with simulated random journeys. The project grew from a UOC linear algebra assignment, which I extended to explore different maintenance decisions.

What the project tells us

See why availability falls when breakdowns accumulate, and how repairs change that trajectory. The scenario comparison also includes illustrative costs to connect the system's behaviour with maintenance decisions. Everything depends on the probabilities you choose; these are not observations from a real fleet. Each step is a system transition, not an hour, and the costs help explore the example rather than produce a real budget.

EXECUTED EVALUATION / 2026-10-01

TRIPS UNTIL FAILURE20
STATIONARY AVAILABILITY83.33%
HORIZON / TRANSITIONS40
No failures / 100.0%Absorbing failure / 12.9%Maintenance / 83.3%

Initial fleet of 1,500 bicycles, failure probability 0.05 and repair probability 0.25 per transition opportunity, returning to A. No capacity limits or rebalancing. The comparison shows mathematical expectations, not observations; costs depend on illustrative parameters.

Source code