N-INRG and B-INRG modules¶
Functions that are used to run different types of games for the restoration of interdependent networks
- gameutils.analyze_NE(objs, combinations, optimal_combinations)¶
This function reads the results of analyses (INDP, JC, etc.) and the corresponding objects from file and aggregates the results in a dictionary.
- Parameters
objs (dict) – Dictionary that contains the objects corresponding to the read results.
combinations (dict) – All combinations of magnitude, sample, judgment type, resource allocation type involved in the JC (or any other decentralized results) collected by
generate_combinations()
.optimal_combinations (dict) – All combinations of magnitude, sample, judgment type, resource allocation type involved in the INDP (or any other optimal results) collected by
generate_combinations()
.
- gameutils.run_game(params, save_results=True, print_cmd=True, save_model=False, plot2D=False)¶
Finds interdependent restoration strategies using a decentralized heuristic, Judgment Call [TDO20][TDO19].
- Parameters
params (dict) – Global parameters, including number of iterations, game type, etc.
save_results (bool, optional) – Should the results be written to file. The default is True.
print_cmd (bool, optional) – If true, the results are printed to console. The default is True.
plot2D (bool, optional) – Should the payoff matrix be plotted (only for 2-players games). The default is False.
save_model (bool, optional) – Should the games and indp models to compute payoffs be written to file. The default is False.
- Returns
None