BCESolve
|
Class for solving games created in the game tab. More...
#include <bcesolverworker.hpp>
Public Slots | |
void | startSolve () |
Triggered when the user clicks the "Solve" button in the game tab. More... | |
Signals | |
void | workFinished () |
Signals that the solve routine has ended. | |
void | sendSolution (BCESolution *soln, bool isBoundaryMapped) |
Signals a pointer to the solution found by the solver. | |
void | exceptionSignal (QString message) |
Signals an exception thrown during the solve routine. | |
Public Member Functions | |
BCESolverWorker (BCEGame _game, vector< double > _weightData, vector< vector< double > > _mapBoundaryData, BCEGurobiCallback *_callback, bool _mapBoundaryOption, double _minAngleIncrement) | |
Constructor. | |
const BCESolution & | getSolution () const |
Returns a reference to the solution object. | |
Private Attributes | |
BCEGame | game |
Game. | |
BCESolution | solution |
Solution, either default or the custom game (see class description). | |
vector< double > | weightData |
Weights on the objectives, as supplied by the user in the game tab. | |
vector< vector< double > > | mapBoundaryData |
Weights on map boundary objectives, supplied in the game tab. | |
BCEGurobiCallback * | callback |
Callback, allows communication with Gurobi solver. | |
bool | mapBoundaryOption |
True if the solver will be mapping the boundary. | |
double | minAngleIncrement |
Minimum angle increment, used for mapping the boundary. | |
Class for solving games created in the game tab.
Contains a game and a solution object. When the solverWorker is created, a BCEGame is supplied in its constructor. The solverWorker solves the game, and the private member "solution" is set to the solution of the solved game. A signal sends a pointer to the solution to the BCEWindow object, which sends the solution to BCEPlotHandler for plotting. BCEWindow also automatically switches the tab currently displayed to the solution window after the solution has been plotted.
|
inlineslot |
Triggered when the user clicks the "Solve" button in the game tab.
Uses GUROBI and BCESolver to solve a BCEGame. Objectives are multiplied by their respective weights, and then the sum of these objectives is maximized.
If weights are negative, then the solver is maxing the negative of an objective, i.e. minimizing.