Difference between revisions of "Assignments WS 2024/2025"
Line 457: | Line 457: | ||
<p>The Lightning Network represents a promising solution to Bitcoin's scalability challenges, enabling fast and low-cost transactions. In the Czech Republic, it's gaining practical adoption with merchants like Alza.cz, Rohlik.cz and payment processors like Qerko and GoPay.</p> | <p>The Lightning Network represents a promising solution to Bitcoin's scalability challenges, enabling fast and low-cost transactions. In the Czech Republic, it's gaining practical adoption with merchants like Alza.cz, Rohlik.cz and payment processors like Qerko and GoPay.</p> | ||
− | + | <p> The network consists of payment channels, direct connections between two participants. Each channel has a fixed capacity, representing the total funds locked in for transactions. This capacity is shared between the two participants, with each holding a portion of the total on his side of the channel. Payments update the balance distribution within the channel. If two participants don’t have a direct channel, the network routes payments through connected channels, relying on intermediary nodes with enough capacity to complete the transfer. </p> | |
<h2>What will be simulated:</h2> | <h2>What will be simulated:</h2> | ||
Revision as of 20:22, 8 December 2024
Please, put here your assignments. Do not forget to sign them. You can use ~~~~ (four tildas) for an automatic signature. Use Show preview in order to check the result before your final sumbition. |
Please, strive to formulate your assignment carefully. We expect an adequate effort to formulate the assignment as it is your semestral paper. Do not forget that your main goal is a research paper. It means your simulation model must generate the results that are specific, measurable and verifiable. Think twice how you will develop your model, which entities you will use, draw a model diagram, consider what you will measure. No sooner than when you have a good idea about the model, submit your assignment. And of course, read How to deal with the simulation assignment. |
Topics on gambling, cards, etc. are not welcome. |
In order to avoid possible confusion, please, check if you have added approved in bold somewhere in our comment under your submission. If there is no approved, it means the assignment was not approved yet. |
Criteria for evaluation of the simulation proposal The proposal must contain:
If any of the above points are missing from the simulation proposal, the proposal is considered incomplete. Unless the proposal contains all of the above points it will not be evaluated at all (and therefore cannot be approved).
If the answer to any of the above points is no, you need to improve your proposal. Don't wait for us to tell you so - you're wasting your time. |
Assignment Proposal (Draft) Title:
- Simulation of pension reform in the Czech Republic: Analysis of long-term sustainability
What will be simulated:
- A system dynamics model of the Czech pension system that simulates the long-term financial sustainability under varying demographic, economic, and policy scenarios. The simulation will project future balances of the pension system, incorporating the flows of revenues (social insurance contributions) and expenditures (pension payouts)
Goal of the simulation (What problem should the simulation solve):
- The main goal is to analyze how different pension reform strategies (e.g., adjusting retirement age, altering contribution rates, changing the indexation formula of pensions) will affect the long-term stability of the Czech pension system. The simulation aims to identify specific policy levers and thresholds that ensure the pension system’s financial equilibrium over a multi-decade horizon, despite changing demographic and economic conditions.
Who would use the simulation and how it helps them:
- The potential users include not only the Ministry of Finance, the Ministry of Labour and Social Affairs, but also the general public and the media. Although the model does not simulate the pension system in complete detail, it provides a general overview and helps users understand the basic mechanisms and trends that will shape the future of the pension system. In this way, users can:
- Gain a preliminary orientation and inspiration: By experimenting with simple scenarios (e.g., raising the retirement age or altering contribution rates), users can gain a clearer picture of how different reform steps could influence the stability of the pension system.
- Provide context for public debate: The model can assist citizens, journalists, and non-profit organizations in better understanding the issues surrounding pension reform. This allows them to critically evaluate political proposals or expert recommendations.
- Lead to more informed decision-making: While this is not a tool for detailed macroeconomic forecasting, the simulation provides a general insight into potential long-term trends. This can contribute to a broader understanding of the necessity for reforms and their impact on future generations.
Method and simulation environment:
- Method: System Dynamics
- Simulation environment: Vensim PLE (freely available for academic use)
Variables in the model (deterministic and random):
- Core Population Variables:
- Number of children (new entrants to future workforce)
- Number of working-age population (workers contributing to the system)
- Number of pensioners (beneficiaries)
- Policy Variables:
- Statutory retirement age
- Contribution rate to social insurance (percentage of wage)
- Pension benefit formula and indexation mechanism
- Economic Variables:
- Average wage (influences contributions)
- Inflation rate (influences indexation of pensions and wage growth)
- Fiscal Variables:
- Total contributions collected (based on number of workers, contribution rate, and average wage)
- Total pension expenditure (based on number of pensioners and average pension)
- Pension system reserve fund (if applicable) and its depletion or accumulation
- Random Variables:
- The model will incorporate stochastic elements through probability distributions derived from historical data and OECD/EUROSTAT projections to reflect uncertainty in:
- Fertility rate (affects future workforce size; random from projected distribution)
- Mortality rate / Life expectancy changes (stochastic variation around central OECD forecasts)
- Inflation rate (stochastic variation around central forecast from CNB/OECD data)
- Retirement rate (number of people retire each year +-)
- The model will incorporate stochastic elements through probability distributions derived from historical data and OECD/EUROSTAT projections to reflect uncertainty in:
Data sources (for deterministic baseline and to derive distributions):
- Czech Statistical Office (ČSÚ) for historical demographic data
- OECD demographic and economic projections for Czech Republic
- Eurostat long-term demographic projections for EU countries
Formulas in the simulation (examples):
- Pension Expenditure: Total Pension Expenditure = Number of Pensioners * Average Pension
- Average Pension Calculation: Average Pension(t+1) = Average Pension(t) * (1 + InflationIndex)
- Contribution Revenue: Total Contributions = Number of Workers * Average Wage * Contribution Rate
- System Balance: Annual Balance = Total Contributions - Total Pension Expenditure
- Accumulation or depletion of the pension reserve fund is then modeled as a stock: Reserve(t+1) = Reserve(t) + Annual Balance.
Model complexity and data linking:
- Causal loop diagrams (CLD): Will illustrate feedback loops such as how employment and wage growth influence contributions, and how demographic changes influence the ratio of workers to retirees.
- Stock and Flow Diagrams: Will detail population stocks (children, workers, retirees), and financial stocks (pension fund reserves), along with flows (entrants to workforce, retirees, death rates, pension contributions, and payouts).
Specific, measurable, and verifiable results:
- Specificity: The model will project the pension system’s financial status from year X to year X+50 under various reform scenarios, providing exact quantitative outcomes (e.g., fund balance in billions CZK, pension-to-wage ratio).
- Measurable metrics:
- Dependency ratio (number of pensioners per 100 workers)
- Pension system annual balance (CZK) and cumulative reserves over time
- Average replacement rate (pension/average wage ratio)
- Sensitivity of sustainability gap to changes in retirement age or contribution rate
- Verifiability: The initial model run will be calibrated against historical data for the past decade. Adjustments to parameters and comparison with known OECD and ČSÚ forecasts will verify the model’s credibility.
- APPROVEDOleg.Svatos (talk) 17:57, 6 December 2024 (CET)
Simulation concept – Invasive Plant Species vs. Native Plants vs. Herbivores Jan César (cesj05)
Objectives:
Understand the dynamics of competition between invasive plant species and native plants in a shared environment
Explore the conditions under which either the invasive species dominates, coexists, or fails to establish.
Environment:
Each patch represents a piece of land that can grow either a natrive or invasive plant (or remain empty)
Plants compete for resources on each path
Agents:
Native Plants: Slower growth but more resistant to herbivores or harsh conditions.
Invasive Plants: Faster growth and higher seed dispersal rate but less resistant to herbivores.
Herbivores: Agents that eat plants, with a preference for invasive or native species (modifiable by the user).
Methods
Initialization:
Randomly populate the grid with a mix of invasive and native plants.
Set up resource levels for each patch.
Place herbivores randomly across the grid.
Simulation Steps (Turtles/Agents):
Each plant (agent) checks:
Whether it has resources to grow or reproduce.
If conditions are favorable, it spreads seeds to nearby patches.
Herbivores move and consume plants on the patches they visit.
Competition between plants on shared patches determines which survives.
Interaction Dynamics: Modify the probability of herbivory or the effectiveness of seed dispersal as sliders to explore different scenarios.
The simulation will be done in NetLogo, as for the data, it will not be used from real world, but it will be set up, so the behaviour of agents will be as close as it can to real life.
Used studies for setting up the behaviour of plants and herbivores will be: https://www.mdpi.com/1424-2818/16/6/317 https://academic.oup.com/jpe/article/17/2/rtae007/7589693
If needed, more studies will be used.
This simulation can be used by gardeners trying to maintain their garden. Cesj05 (talk) 17:53, 6 December 2024 (CET)
Contents
- 1 Simulation Concept – Traffic Accident Risk Analysis
- 2 Assignment Proposal (Draft)
- 2.1 Title
- 2.2 What will be simulated
- 2.3 Goal of the simulation (What problem should the simulation solve)
- 2.4 Who would use the simulation and how it helps them
- 2.5 Method and simulation environment
- 2.6 Variables in the model (deterministic and random)
- 2.7 Formulas in the simulation (examples)
- 2.8 Model complexity and data linking
- 2.9 Specific, measurable, and verifiable results
- 2.10 Key questions the simulation will answer
- 3 Customers at traditional and self-service checkouts
- 3.1 Topic
- 3.2 Problem
- 3.3 Goal
- 3.4 Simulation Stakeholders
- 3.5 Method
- 3.6 Requirements
- 3.7 What you will simulate:
- 3.8 The goal of the simulation:
- 3.9 Who would actually use such simulation and how:
- 3.10 What method and simulation environment:
- 3.11 What variables will be incorporated:
- 3.12 What variables will be random:
- 3.13 What exact data you will base values of your variables on:
- 4 Lightning Network Channel Dynamics Simulation
Simulation Concept – Traffic Accident Risk Analysis
Objectives
- Understand the dynamics of traffic accidents based on road conditions, traffic density, and driver behavior.
- Explore the conditions under which accidents become frequent, and how they impact overall traffic flow.
- Test mitigation strategies like improved road quality or stricter speed limits.
Environment
- Patches: Represent road segments and intersections, each with a defined condition:
- Good: Low accident probability.
- Bad: Increased accident probability.
- Under Construction: High accident probability and slower movement for cars.
- Road Network: A grid-based layout with straight roads and intersections where traffic can flow.
Agents
- Cars (Turtles):
- Each car has a speed, a destination, and a probability of making a driving error.
- Movement is influenced by traffic density and road conditions.
- Accidents:
- Simulated as blocked road segments.
- Cause delays and force cars to reroute.
- Traffic Lights (Optional):
- Located at intersections to control flow.
- Can be toggled on/off to explore their impact on accidents.
Methods
Initialization
- Randomly distribute cars across the road network with initial speeds and destinations.
- Assign random conditions (good, bad, under construction) to road segments based on user input.
Simulation Steps (Turtles/Agents)
- Movement:
- Cars follow road segments, moving faster on good roads and slower on bad/under-construction ones.
- Accident Risk:
- Probability of an accident increases with:
- Poor road conditions.
- High speed.
- High traffic density.
- Probability of an accident increases with:
- Accident Handling:
- If an accident occurs, the road segment is temporarily blocked.
- Cars reroute to avoid the blocked segment, increasing congestion elsewhere.
- Recovery:
- Accidents are cleared after a set duration, restoring traffic flow.
Interaction Dynamics
- User Controls:
- Traffic density, road condition distribution, speed limits, and driver error probabilities can be adjusted with sliders.
- Scenarios:
- Test high traffic density with poor roads versus low traffic density with good roads.
- Simulate stricter traffic laws by reducing driver errors and imposing speed limits.
Simulation Details
- Platform: NetLogo.
- Data Source: Synthetic data will be used to mimic real-world traffic dynamics based on studies and assumptions.
- Behavior Setup: Modeled on findings from traffic and safety research:
- Additional studies will be incorporated if needed to refine parameters.
Sim timm03 (talk) 16:11, 7 December 2024 (CET)
Assignment Proposal (Draft)
Title
Simulation of Security Efficiency in a Store: Analyzing Optimal Guard Allocation Based on Obstruction and Escape Dynamics
What will be simulated
- A simulation of a store environment where security guards patrol to prevent thieves from stealing goods and escaping through designated exits. The store layout includes customizable obstacles (regals), guards, and thieves. The simulation focuses on the limited visibility due to obstacles and models the dynamic interaction between guards and thieves, exploring how the required number of guards changes based on the number of thieves.*
Goal of the simulation (What problem should the simulation solve)
- The simulation aims to determine the optimal number of guards needed to secure a store effectively under varying conditions of thief count. The ultimate goal is to provide recommendations for store security design based on quantitative analysis.*
Who would use the simulation and how it helps them
- Store Managers and Security Companies*: Helps in designing security layouts and determining the number of security guards needed to maximize efficiency and minimize theft.
- Students*: Offers insights into visibility-limited environments and agent-based modeling techniques.
Method and simulation environment
- Method: Agent-based modeling
- Simulation environment: NetLogo
Variables in the model (deterministic and random)
Deterministic Variables
- Number of guards
- Number of thieves
- Number of regals (obstacles): Fixed positions
- Store size:
- Guard and thief placement: Guards are placed on opposite sides of the store to maximize coverage; thieves are placed randomly.
Random Variables
- Movement paths: Thieves and guards move dynamically based on patrol or escape strategies.
- Thief behavior: Randomized target selection for obstacles and exits.
- Guard patrol patterns: Random movement within patrol zones unless a thief is spotted.
Formulas in the simulation (examples)
- Guard visibility:
* \( \text{Visible range} = d \), where \( d \) is the number of unobstructed cells (line of sight blocked by obstacles).
- Thief capture condition:
* A thief is captured if a guard moves onto the same cell.
- Escape success:
* A thief escapes if it reaches an exit before being captured.
- Capture efficiency:
* \( \text{Efficiency} = \frac{\text{Captured thieves}}{\text{Total thieves}} \)
Model complexity and data linking
- Guard and thief dynamics:
* Guards patrol predefined zones or reactively chase thieves if spotted. * Thieves move toward regals to "steal" and then to exits to escape.
- Obstacle placement:
* Regals are fixed in predefined locations that block visibility and movement.
- Outputs:
* Capture success rate * Number of escaped thieves * Guard efficiency metrics
Specific, measurable, and verifiable results
- Specificity:
* The model provides quantitative insights into the number of guards needed to maintain security across various scenarios.
- Measurable metrics:
* Capture rate (% of thieves caught) * Escape rate (% of thieves successfully escaped) * Average patrol effectiveness (distance covered by guards and time to interception).
Key questions the simulation will answer
- How does the number of guards required to secure the store change with varying numbers of thieves?
- What are the most effective patrol strategies for guards in a fixed environment with limited visibility?
- How does the coordination or randomness of thieves’ behavior influence the effectiveness of the store's security?
Holp11 (talk) 21:06, 7 December 2024 (CET)
Customers at traditional and self-service checkouts
Topic
Simulation of the customer check-in process at the checkout, including incoming customers, their checkout selection (including self-service options), queuing, and service. The model reflects different service speeds, customer behavior (e.g., transitioning between checkouts), and satisfaction levels.
Problem
The supermarket lacks rules for opening and closing checkouts, resulting in either excessive staff costs or low customer satisfaction. Data-based rules for checkout operations can optimize efficiency and satisfaction.
Goal
Establish optimal rules for opening and closing checkouts to maintain customer satisfaction above 70%.
Simulation Stakeholders
- HR Managers: Determine employee requirements per shift.
- Shift Leaders: Establish rules for opening new checkouts.
- Financial Manager: Optimize employee costs.
Method
- Platform: NetLogo
- Method: Agent-based simulation
Requirements
Reality Abstraction Plan
Customers
- Number of Items in Purchase: Lognormal distribution (µ=3, σ=0.3).
- Checkout Type Preference:
- Items > 20: Preference = 1 (regular checkouts only).
- Items > 10: Lognormal distribution on scale 1-100 (µ=2.8, σ=0.7).
- Items ≤ 10: 100 - (Lognormal distribution on scale 1-100, µ=2.8, σ=0.7).
- Willingness to Switch Checkouts: Lognormal distribution on scale 1-100 (µ=2.9, σ=0.4). Drops to half after switching.
- Satisfaction: Depends on waiting time, switching, and checkout type.
- Initial value: Normal distribution (mean=95, std=5).
- Waiting Time:
- ≤ 3 min: No change.
- > 3 min: Decreases logarithmically:
S(t) = 100 − 10 * ln(1 + (t − 3))
.
- Switching Checkouts:
- Willingness > 80: No change.
- Willingness ≤ 80: Decreases by a range (e.g., 1-5 points for willingness ≤ 80 & > 60).
- Checkout Type: Satisfaction changes based on preference and actual service type (e.g., increases by 5-10 points if preference > 60 and served at self-checkout).
- Satisfaction cannot be negative.
- Goal: Leave the supermarket as satisfied as possible.
Checkouts
- Regular Checkouts (Count: 6):
- Service Speed:
- Payment: Normal distribution (mean=1 min, std=0.2).
- Marking Items: 80% EAN-coded items (mean=0.02 min, std=0.01); 20% non-EAN (mean=0.03 min, std=0.01).
- Checkout Error: 0.1% probability; solving time = Normal distribution (mean=0.5 min, std=0.1).
- Service Speed:
- Self-Service Checkouts (Count: 12):
- Service Speed:
- Payment: Normal distribution (mean=1.2 min, std=0.3).
- Marking Items: 80% EAN-coded items (mean=0.03 min, std=0.01); 20% non-EAN (mean=0.04 min, std=0.01).
- Checkout Error: 1% probability; solving time = Normal distribution (mean=0.5 min, std=0.1).
- Service Speed:
Simulation Rules
- Operating Hours: 8:00-20:00 (1 average day).
- Customer Arrivals:
- Peak Hours (8:00-10:00 & 16:00-18:00): Normal distribution (mean=4, std=1).
- Non-Peak Hours (10:00-16:00 & 18:00-20:00): Normal distribution (mean=2, std=1).
- Goal of Checkouts: Maintain customer satisfaction above 70% with minimal open regular checkouts.
- The simulation will not address scenarios outside the checkout area.
- One customer corresponds to one purchase.
Rysc00 (talk) 13:23, 08 December 2024 (CET)
What you will simulate:
- I will simulate the process of artificially snowing a ski slope, including the operation of snow cannons, and the influence of temperature, humidity, and wind on snow production and the maintenance of a snow cover.
The goal of the simulation:
- The objective is to optimize the snowmaking process to achieve the desired snow cover height at the lowest possible energy and water costs, while accounting for changing weather conditions.
Who would actually use such simulation and how:
- A typical user might be a ski resort manager or the operator of snowmaking equipment. The simulation would help them plan and optimize their snowmaking strategy in advance, reduce operational costs, and ensure quality snow conditions for skiers.
What method and simulation environment:
- Multi-agent simulation in NetLogo
What variables will be incorporated:
- Deterministic variables: the placement of snow cannons, the energy demands of the snow cannons, and the target snow cover height.
- State variables: the current snow depth on the slope, and the current water and energy consumption.
What variables will be random:
- Weather conditions (temperature, humidity, wind, and any natural snowfall) will be generated with random fluctuations within the range of observed real-world values.
What exact data you will base values of your variables on:
- The values for weather and the performance of snow cannons will be based on literature and technical specifications from manufacturers (average seasonal temperatures, typical humidity ranges, average efficiency of snow cannons).
Lanm14 (talk) 15:00, 08 December 2024 (CET)
Lightning Network Channel Dynamics Simulation
The Lightning Network represents a promising solution to Bitcoin's scalability challenges, enabling fast and low-cost transactions. In the Czech Republic, it's gaining practical adoption with merchants like Alza.cz, Rohlik.cz and payment processors like Qerko and GoPay.
The network consists of payment channels, direct connections between two participants. Each channel has a fixed capacity, representing the total funds locked in for transactions. This capacity is shared between the two participants, with each holding a portion of the total on his side of the channel. Payments update the balance distribution within the channel. If two participants don’t have a direct channel, the network routes payments through connected channels, relying on intermediary nodes with enough capacity to complete the transfer.
What will be simulated:
A NetLogo agent-based simulation of Lightning Network payment channels that models:
- Nodes (merchants, customers, routing nodes) as agents with defined balances and behaviors
- Payment channels as links between nodes with specific capacities
- Transaction routing through the network
- Channel balance changes and payment success/failure dynamics
Goal of the simulation:
To analyze how different network configurations affect payment success rates and channel efficiency, specifically:
- Identify optimal channel capacity distribution for maximizing successful payments
- Determine relationship between node connectivity and network reliability
- Find bottlenecks in payment routing that cause transaction failures
Who would use the simulation and how it helps them:
Primary users:
- New merchants considering Lightning Network adoption:
- Understand required number of payment channels
- Plan initial channel capacity requirements
- Estimate liquidity needs
- Lightning Network node operators:
- Optimize channel configurations
- Understand routing effectiveness
- Plan capital allocation
Method and simulation environment:
- Method: Agent-based modeling
- Environment: NetLogo
Variables incorporated:
Deterministic Variables:
- Number of nodes (N):
- Initial setup: 100-200 nodes
- Based on small subset of real network for feasibility
- Can be adjusted via interface slider
- Initial channel capacity (C):
- Range: 0.001 - 0.1 BTC per channel
- Based on average values from 1ML.com statistics
- Set at channel creation time
- Node types:
- Merchant: 20% of nodes
- Customer: 70% of nodes
- Routing-node: 10% of nodes
- Proportions based on network analysis papers
- Base fee per transaction:
- Default: 1 satoshi base + 0.001% of amount
- Based on common Lightning node configurations
- Network topology structure:
- Average connections per node: 3-8
- Based on observed network patterns
- Follows power-law distribution
Random Variables:
- Transaction amounts:
- Distribution: Log-normal
- Mean: 50,000 satoshis
- Standard deviation: 25,000 satoshis
- Based on public Lightning Network statistics
- Transaction timing:
- Poisson distribution
- Mean arrival rate (λ): 0.1 transactions per node per minute
- Can be adjusted via interface slider
- Channel balance fluctuations:
- Random walk within channel capacity
- Step size: Normal distribution (μ=0, σ=0.01 × capacity)
- Updates every simulation tick
- Node connection preferences:
- Probability of connection decreases with distance
- Weighted by node type and existing connections
- Uses preferential attachment model
- Payment success probability:
- Base probability: 0.95
- Modified by:
- Channel capacity utilization
- Path length
- Node type
Data sources for variable values:
- Network structure and capacities:
- Public Lightning Network explorer (1ML.com):
- Current number of nodes (~17,000)
- Average channel capacity (~0.03 BTC)
- Node distribution and connectivity patterns
- Mempool.space statistics:
- Total network capacity
- Channel count
- Node count
- Public Lightning Network explorer (1ML.com):
- Transaction patterns:
- Public Lightning Network statistics from Bitcoin Visuals (bitcoinvisuals.com)
- Academic research papers on Lightning Network analysis:
- "Lightning Network: a second path towards centralisation of the Bitcoin economy" (Lin et al., 2020)
- "A Quantitative Analysis of Security, Anonymity and Scalability for the Lightning Network" (Tikhomirov et al., 2020)
Simulation behavior formulas based on:
- Payment routing:
- Lightning Network specifications (BOLTs) from lightning-rfc repository
- LND implementation documentation
- Published research on routing behavior
- Channel balancing:
- Lightning Network whitepaper formulas
- Public node operation best practices
- Academic analysis of channel dynamics