9 #include "event_manager.hpp" 10 #include "player/gear_stats.hpp" 11 #include "progress_bar.hpp" 12 #include "sim_ostream.hpp" 13 #include "sim/option.hpp" 14 #include "util/concurrency.hpp" 15 #include "util/rng.hpp" 16 #include "util/sample_data.hpp" 17 #include "util/util.hpp" 18 #include "util/vector_with_callback.hpp" 45 class report_configuration_t;
54 int current_iterations;
57 {
return std::min( 1.0, current_iterations / static_cast<double>(total_iterations) ); }
85 bool save_profile_with_actions;
90 double vary_combat_length;
91 int current_iteration, iterations;
93 role_e target_error_role;
96 int analyze_error_interval, analyze_number;
110 size_t current_index;
116 int global_spawn_index;
117 int max_player_level;
123 bool strict_gcd_queue;
124 double confidence, confidence_estimator;
127 double travel_variance, default_skill;
130 int optimize_expressions;
131 int optimize_expressions_rounds;
133 int optimal_raid, log, debug_each;
134 std::vector<uint64_t> debug_seed;
135 stat_e normalized_stat;
136 std::string current_name, default_region_str, default_server_str, save_prefix_str, save_suffix_str;
137 bool save_talent_str;
138 talent_format talent_input_format;
140 std::string main_target_str;
143 double tmi_window_global;
146 bool requires_regen_event;
147 bool single_actor_batch;
148 bool allow_experimental_specializations;
149 int progressbar_type;
153 double enemy_death_pct;
154 int rel_target_level, target_level;
155 std::string target_race;
157 std::string sim_progress_base_str, sim_progress_phase_str;
162 std::unique_ptr<dbc_t>
dbc;
163 std::unique_ptr<dbc_override_t> dbc_override;
169 int scale_to_itemlevel;
172 std::string keystone_bounty;
174 bool scale_itemlevel_down_only;
175 bool disable_set_bonuses;
177 bool use_item_verification;
178 unsigned int disable_2_set;
179 unsigned int disable_4_set;
180 unsigned int enable_2_set;
181 unsigned int enable_4_set;
184 bool feast_as_dps =
true;
185 bool auto_attacks_always_land;
192 std::vector<std::unique_ptr<option_t>> options;
193 std::vector<std::string> party_encoding;
194 std::vector<std::string> item_db_sources;
200 int strict_work_queue;
201 int average_range, average_gauss;
204 std::vector<std::unique_ptr<raid_event_t>> raid_events;
205 std::string raid_events_str;
206 fight_style_e fight_style;
213 int arcane_intellect;
215 int power_word_fortitude;
226 std::vector<uint64_t> target_health;
233 buff_t* power_word_fortitude;
240 int infernal_cinders_users = 1;
241 int engine_of_eradication_orbs = 4;
242 int void_stalkers_contract_targets = -1;
243 double specter_of_betrayal_overlap = 1.0;
244 std::vector<double> cradle_of_anguish_resets;
250 double secrets_of_the_deep_chance = 0.1;
252 double secrets_of_the_deep_collect_chance = 1.0;
254 double gutripper_default_rppm = 2.0;
256 double seductive_power_pickup_chance = 1.0;
260 double covenant_chance = 1.0;
262 double incandescent_sliver_chance = 1.0;
266 double fight_or_flight_chance = 0.0;
268 double harbingers_inscrutable_will_silence_chance = 0.0;
270 double harbingers_inscrutable_will_move_chance = 1.0;
272 double aberrant_tidesage_damage_chance = 1.0;
274 double fathuuls_floodguards_damage_chance = 1.0;
276 double grips_of_forsaken_sanity_damage_chance = 1.0;
278 double stormglide_steps_take_damage_chance = 0.0;
282 timespan_t abyssal_speakers_gauntlets_shield_duration = 0_ms;
286 double legplates_of_unbound_anguish_chance = 1.0;
290 double loyal_to_the_end_ally_death_chance = 0.0;
292 int loyal_to_the_end_allies = 0;
294 int worldvein_allies = 0;
296 double ripple_in_space_proc_chance = 0.0;
298 double blood_of_the_enemy_in_range = 1.0;
302 double undulating_tides_lockout_chance = 0.0;
304 double leviathans_lure_base_rppm = 0.75;
306 double aquipotent_nautilus_catch_chance = 1.0;
308 double zaquls_portal_key_move_chance = 0.0;
312 double storm_of_the_eternal_ratio = 0.05;
316 double voidtwisted_titanshard_percent_duration = 0.5;
320 unsigned manifesto_allies_start = 0;
322 unsigned manifesto_allies_end = 5;
326 double whispered_truths_offensive_chance = 0.75;
328 int initial_seductive_power_stacks = 0;
330 unsigned jes_howler_allies = 4;
332 int initial_archive_of_the_titans_stacks = 0;
334 unsigned arcane_heart_hps = 0;
336 int subroutine_recalibration_precombat_stacks = 0;
338 int subroutine_recalibration_dummy_casts = 0;
340 int reorigination_array_stacks = 0;
342 bool reorigination_array_ignore_scale_factors =
false;
344 bool randomize_oscillation =
true;
346 bool auto_oscillating_overload =
true;
348 bool zuldazar =
false;
350 bool nyalotha =
true;
352 bool nazjatar =
true;
354 bool shiver_venom =
false;
361 double combat_meditation_extend_chance = 1.0;
363 unsigned pointed_courage_nearby = 3;
366 int lead_by_example_nearby = -1;
368 unsigned stone_legionnaires_in_party = 0;
370 unsigned crimson_choir_in_party = 0;
374 double judgment_of_the_arbiter_arc_chance = 0.0;
378 std::string volatile_solvent_type =
"mastery";
383 std::string unbound_changeling_stat_type =
"default";
385 double gluttonous_spike_overheal_chance = 1.0;
387 double anima_field_emitter_mean = std::numeric_limits<double>::max(),
388 anima_field_emitter_stddev = 0.0;
392 double iqd_stat_fail_chance = 0.0;
395 double thrill_seeker_killing_blow_chance = -1.0;
397 double wild_hunt_tactics_duration_multiplier = 1.0;
399 double bonded_hearts_other_covenant_chance = 1.0;
402 std::string party_favor_type =
"random";
405 int battlefield_presence_enemies = -1;
407 unsigned shattered_psyche_allies = 0;
411 double titanic_ocular_gland_worthy_chance = 1.0;
413 double newfound_resolve_success_chance = 1.0;
417 double newfound_resolve_delay_relstddev = 0.2;
421 double shredded_soul_pickup_chance = 1.0;
423 double valiant_strikes_heal_rate = 1.0;
426 std::string soleahs_secret_technique_type =
"haste";
432 double field_of_blossoms_duration_multiplier = 1.0;
434 double cruciform_veinripper_proc_rate = 0.0;
436 double cruciform_veinripper_in_front_rate = 0.0;
438 unsigned int precombat_pustules = 9;
442 bool disable_soul_igniter_second_use =
true;
444 bool disable_iqd_execute =
false;
447 bool better_together_ally =
true;
448 bool enable_rune_words =
false;
449 bool enable_domination_gems =
false;
451 timespan_t the_first_sigil_fleshcraft_cancel_time = 50_ms;
453 unsigned int earthbreakers_impact_weak_points = 3;
455 double grim_eclipse_dot_duration_multiplier = 1.0;
457 double grim_eclipse_buff_duration_multiplier = 0.9;
459 bool chains_of_domination_auto_break =
true;
461 double first_strike_chance = 0.0;
465 double adaptive_armor_fragment_uptime = 0.5;
467 double soothing_shade_duration_multiplier = 1.0;
486 std::unique_ptr<scale_factor_control_t> scaling;
487 std::unique_ptr<plot_t> plot;
488 std::unique_ptr<reforge_plot_t> reforge_plot;
489 chrono::cpu_clock::duration elapsed_cpu;
490 chrono::wall_clock::duration elapsed_time;
491 std::vector<size_t> work_per_thread;
493 double iteration_dmg, priority_iteration_dmg, iteration_heal, iteration_absorb;
496 chrono::wall_clock::duration merge_time, init_time, analyze_time;
499 std::vector<iteration_data_entry_t> iteration_data, low_iteration_data, high_iteration_data;
501 double report_iteration_data;
503 int min_report_iteration_data;
505 int bloodlust_percent;
507 std::string reference_player_str;
508 std::vector<player_t*> players_by_dps;
509 std::vector<player_t*> players_by_priority_dps;
510 std::vector<player_t*> players_by_hps;
511 std::vector<player_t*> players_by_hps_plus_aps;
512 std::vector<player_t*> players_by_dtps;
513 std::vector<player_t*> players_by_tmi;
514 std::vector<player_t*> players_by_name;
515 std::vector<player_t*> players_by_apm;
516 std::vector<player_t*> players_by_variance;
517 std::vector<player_t*> targets_by_name;
518 std::vector<std::string> id_dictionary;
519 std::map<double, std::vector<double> > divisor_timeline_cache;
520 std::vector<report::json::report_configuration_t> json_reports;
521 std::string output_file_str, html_file_str, json_file_str;
522 std::string reforge_plot_output_file_str;
523 std::vector<std::string> error_list;
524 int report_precision;
525 int report_pets_separately;
528 int report_raw_abilities;
531 int save_raid_summary;
532 int save_gear_comments;
533 int statistics_level;
534 int separate_stats_by_actions;
535 int report_raid_summary;
536 int buff_uptime_timeline;
537 int buff_stack_uptime_timeline;
538 bool json_full_states;
539 int decorated_tooltips;
544 int allow_augmentations;
546 bool maximize_reporting;
547 std::string apikey, user_apitoken;
548 bool distance_targeting_enabled;
549 bool ignore_invulnerable_targets;
550 bool enable_dps_healing;
551 bool count_overheal_as_heal;
552 double scaling_normalized;
553 bool merge_enemy_priority_dmg;
558 std::vector<sim_t*> children;
560 computer_process::priority_e process_priority;
562 std::shared_ptr<work_queue_t> work_queue;
566 std::vector<sim_t*> relatives;
569 std::unique_ptr<spell_data_expr_t> spell_query;
570 unsigned spell_query_level;
571 std::string spell_query_xml_output_file_str;
573 std::unique_ptr<mutex_t> pause_mutex;
580 std::vector<std::string> on_ready_chart_data;
584 std::map<std::string, std::vector<std::string> > chart_data;
586 bool chart_show_relative_difference;
588 bool relative_difference_from_max;
590 std::string relative_difference_base;
591 double chart_boxplot_percentile;
595 std::vector<std::function<void(actor_target_data_t*)> > target_data_initializer;
597 bool display_hotfixes, disable_hotfixes;
598 bool display_bonus_ids;
601 opts::map_list_t profileset_map;
602 std::vector<scale_metric_e> profileset_metric;
603 std::vector<std::string> profileset_output_data;
604 bool profileset_enabled;
605 int profileset_work_threads, profileset_init_threads;
606 std::unique_ptr<profileset::profilesets_t> profilesets;
615 int main(
const std::vector<std::string>& args );
616 double iteration_time_adjust();
617 double expected_max_time()
const;
618 bool is_canceled()
const;
619 void cancel_iteration();
622 void add_relative(
sim_t* cousin );
623 void remove_relative(
sim_t* cousin );
624 sim_progress_t progress( std::string* detailed =
nullptr,
int index = -1 );
625 double progress( std::string& phase, std::string* detailed =
nullptr,
int index = -1 );
626 void detailed_progress( std::string*,
int current_iterations,
int total_iterations );
627 void datacollection_begin();
628 void datacollection_end();
631 void init_fight_style();
635 void init_actor_pets();
638 void merge(
sim_t& other_sim );
643 void analyze_error();
644 void analyze_iteration_data();
645 void print_options();
646 void add_option( std::unique_ptr<option_t> opt );
647 void create_options();
648 bool parse_option(
const std::string& name,
const std::string&
value );
651 player_t* find_player( util::string_view name )
const;
652 player_t* find_player(
int index )
const;
653 cooldown_t* get_cooldown( util::string_view name );
654 void use_optimal_buffs_and_debuffs(
int value );
655 std::unique_ptr<expr_t> create_expression( util::string_view name );
659 template <
typename... Args>
660 void errorf( util::string_view format, Args&&... args )
662 if ( thread_index != 0 )
665 set_error( fmt::sprintf( format, std::forward<Args>(args)... ) );
671 template <
typename... Args>
672 void error( fmt::format_string<Args...> format, Args&&... args )
674 if ( thread_index != 0 )
677 set_error( fmt::vformat( format, fmt::make_format_args( std::forward<Args>(args)... ) ) );
685 bool has_raid_event( util::string_view type )
const;
688 void activate_actors();
691 {
return event_mgr.current_time; }
693 {
return s.confidence_estimator * sd.mean_std_dev; }
695 { target_data_initializer.push_back( cb ); }
700 double averaged_range(
double min,
double max );
703 #ifndef SC_NO_THREADING 704 std::thread::id thread_id()
const 705 {
return sc_thread_t::thread_id(); }
721 template <
typename... Args>
722 void print_debug( fmt::format_string<Args...> format, Args&& ... args )
727 out_debug.vprint( format, fmt::make_format_args( std::forward<Args>(args)... ) );
736 template <
typename... Args>
737 void print_log( fmt::format_string<Args...> format, Args&& ... args )
742 out_log.vprint( format, fmt::make_format_args( std::forward<Args>(args)... ) );
746 void set_error(std::string error);
748 void print_spell_query();
749 void enable_debug_seed();
750 void disable_debug_seed();
751 bool requires_cleanup()
const;
Definition: option.hpp:38
Definition: generic.hpp:484
Definition: client_data.hpp:17
void error(fmt::format_string< Args... > format, Args &&... args)
Create error using fmt libraries python-like formatting syntax.
Definition: sim.hpp:672
Definition: sim_control.hpp:39
Definition: charts.hpp:36
Definition: cooldown.hpp:26
void errorf(util::string_view format, Args &&... args)
Create error with printf formatting.
Definition: sim.hpp:660
void print_log(fmt::format_string< Args... > format, Args &&... args)
Convenient log function using python-like formatting.
Definition: sim.hpp:737
Definition: sample_data.hpp:311
Definition: spell_data.hpp:398
Definition: raid_event.hpp:28
Definition: sample_data.hpp:196
Definition: scale_factor_control.hpp:18
Definition: highchart.hpp:48
Definition: concurrency.hpp:23
Definition: progress_bar.hpp:17
Definition: work_queue.hpp:14
Definition: gear_stats.hpp:17
Definition: event_manager.hpp:20
Definition: charts.hpp:22
bool log_spell_id
Allow Auto Attacks (white attacks) to always hit the enemy.
Definition: sim.hpp:186
Definition: spell_data_expr.hpp:35
Class for representing InGame time.
Definition: timespan.hpp:37
Definition: player.hpp:109
azerite_control azerite_status
Status of azerite-related effects.
Definition: sim.hpp:482
Action expression.
Definition: expressions.hpp:79
Definition: concurrency.hpp:37
Definition: reforge_plot.hpp:15
bool strict_parsing
Error on unknown options (default=false)
Definition: sim.hpp:77
Definition: sim_ostream.hpp:56
Definition: enchants.hpp:23
Definition: report_configuration.cpp:39
Random number generation.
Definition: action.hpp:37
void print_debug(fmt::format_string< Args... > format, Args &&... args)
Convenient stdout print function using python-like formatting.
Definition: sim.hpp:722
Simulation engine.
Definition: sim.hpp:61
Definition: charts.hpp:27
Definition: actor_target_data.hpp:15
Definition: vector_with_callback.hpp:19
Definition: iteration_data_entry.hpp:13