76 std::optional<std::pair<uint8_t, uint8_t>>
penalties;
125 std::vector<MatchSimulationResult>
run(
126 const std::vector<MatchSimulationInput>& inputs,
132 completed.store(0, std::memory_order_relaxed);
133 total.store(0, std::memory_order_relaxed);
138 return {
completed.load(std::memory_order_relaxed),
139 total.load(std::memory_order_relaxed)};
144 std::unique_ptr<ThreadPool>
pool;
Manages the starting XI and reserves of a team.
Definition lineup.h:85
Simulates a batch of independent matches in parallel.
Definition match_scheduler.h:115
void setThreadCount(unsigned thread_count)
Definition match_scheduler.cpp:119
std::unique_ptr< ThreadPool > pool
Definition match_scheduler.h:144
std::atomic< uint32_t > total
Definition match_scheduler.h:146
std::atomic< uint32_t > completed
Definition match_scheduler.h:145
void resetProgress()
Definition match_scheduler.h:130
SimulationProgress getProgress() const
Definition match_scheduler.h:136
unsigned threads
Definition match_scheduler.h:143
unsigned getThreadCount() const
Definition match_scheduler.h:122
Represents the tactical setup of a team for a match.
Definition strategy.h:61
static unsigned defaultThreadCount()
Definition thread_pool.cpp:148
float run
Definition match_stadium_3d.cpp:388
Definition match_scheduler.h:85
MatchContext leagueContext(LeagueID league_id)
Definition match_scheduler.cpp:28
Contains structures to simplify JSON parsing and loading of player statistics.
Definition match_context.h:26
Structured summary of a played fixture, persisted per fixture.
Definition match_report.h:93
Definition match_rules.h:48
Definition match_scheduler.h:72
uint8_t away_goals
Definition match_scheduler.h:74
MatchReport report
Definition match_scheduler.h:80
uint8_t home_goals
Definition match_scheduler.h:73
std::optional< bool > tie_winner_home
Definition match_scheduler.h:79
std::vector< PlayerMatchConsequence > consequences
Definition match_scheduler.h:81
bool extra_time
Definition match_scheduler.h:75
std::optional< std::pair< uint8_t, uint8_t > > penalties
Definition match_scheduler.h:76
Definition match_scheduler.h:102
uint32_t completed
Definition match_scheduler.h:103
uint32_t total
Definition match_scheduler.h:104
Configuration mapping roles to their focus areas and listing all possible stats.
Definition stats_config.h:42
uint8_t LeagueID
Type alias for League identifiers.
Definition types.h:15
uint16_t TeamID
Type alias for Team identifiers.
Definition types.h:18