SGSolve
|
Widget for forward simulating an equilibrium. More...
#include <sgsimulationhandler.hpp>
Public Member Functions | |
SGSimulationHandler (QWidget *parent, const SGSolution_PencilSharpening &_soln, const SGPoint &_point, int _state) | |
Constructor. | |
virtual | ~SGSimulationHandler () |
Destructor. | |
Private Slots | |
void | simulate () |
Triggers a new simulation. More... | |
Private Attributes | |
const SGSolution_PencilSharpening & | soln |
Constant reference to the associated SGSolution object. | |
const SGPoint & | point |
Discounted payoffs in the simulated equilibrium. More... | |
const int | state |
Initial state for the simulation. | |
SGSimulator | sim |
The associated SGSimulator object. | |
int | initialTuple |
The initial tuple for the simulation. | |
QLineEdit * | simEdit |
Displays the number of simulations to run. | |
QLineEdit * | iterationEdit |
Displays the number of periods for which to simulate. | |
QLineEdit * | longRunPayoffEdit |
Displays the average payoffs over the course of the simulation. | |
QLineEdit * | timeEdit |
Displays the time it took the simulation to run. | |
SGSimulationPlot * | distrPlot |
Displays the distribution of tuples, states, and action profiles. | |
QTextEdit * | textEdit |
Displays the first 200 periods of the simulation. | |
QTextEdit * | transitionTableEdit |
Displays the decomposition of extremal equilibria. | |
QCPBars * | stateBars |
Bars displaying for the distribution of states. | |
QCPBars * | tupleBars |
Bars displaying the distribution of tuples. | |
vector< QCPBars * > | actionBars |
Bars displaying the distributions of actions in each state. | |
QCPAxisRect * | stateDistrRect |
The QCPAxisRect object associated with the state distributions. | |
QCPAxisRect * | tupleDistrRect |
The QCPAxisRect object associated with the tuple distributions. | |
vector< QCPAxisRect * > | actionDistrRects |
The QCPAxisRect objects associated with the action distributions. | |
Widget for forward simulating an equilibrium.
This widget is constructed by SGSolutionHandler when the user requests to simulate a particular equilibrium from the right-click context menu on one of the SGCustomPlot objects. This class constructs an SGSimulator object from the SGSolve library, and it also constructs plots and text edits for viewing the output of the simulation. The user can then input the number of periods for which to simulate the equilibrium. The widget will then use SGSimulator to run the simulation. The output is displayed in various formats. The first 200 periods of the simulation are displayed, along with the decomposition of all extremal equilibria into stage payoffs and a lottery over continuation equilibria. If there is more than one decomposition of the continuation value, one is selected arbitrarily. The widget also shows the distributions of tuples, states, actions, and average payoffs of the players over the course of the simulation.
|
privateslot |
Triggers a new simulation.
Causes the widget to run a new simulation for the number of periods in iterationsEdit.
|
private |
Discounted payoffs in the simulated equilibrium.
The widget will simulate an equilibrium that generates payoffs closest to this point.