23#ifndef BCESOLVERWORKER_HPP
24#define BCESOLVERWORKER_HPP
26#include "bceabstractgame.hpp"
30#include "bcegurobicallback.hpp"
69 vector<double> _weightData,
70 vector<vector<double> > _mapBoundaryData,
72 bool _mapBoundaryOption,
73 double _minAngleIncrement):
118 if (solver.
model.get(GRB_IntAttr_Status)!=11) {
126 catch(std::exception &e) {
127 string str(e.
what());
130 catch(GRBException &e) {
132 "The error code for this GRBException was: " +
133 to_string(e.getErrorCode()))));
Exception class for BCESolve.
Definition: bceexception.hpp:33
string getMessage()
Returns an error message.
Definition: bceexception.hpp:79
const char * what() const
Reimplements std::exception::what().
Definition: bceexception.hpp:72
The base class for games of incomplete information.
Definition: bcegame.hpp:40
Callback object to communicate with the gurobi solver.
Definition: bcegurobicallback.hpp:30
void setFullOutput(bool toggle)
Controls how much information is printed to the log tab.
Definition: bcegurobicallback.hpp:47
Class for storing data produced by BCESolver.
Definition: bcesolution.hpp:64
Solves a BCEAbstractGame using gurobi.
Definition: bcesolver.hpp:47
GRBModel model
The GUROBI model.
Definition: bcesolver.hpp:206
void populate()
Main populate routine.
Definition: bcesolver.cpp:163
void mapBoundary(const char *fname)
Maps the frontier.
Definition: bcesolver.cpp:526
void solve(vector< double > &objectiveWeights)
Solve method.
Definition: bcesolver.cpp:474
void getSolution(BCESolution &output)
Returns the data object.
Definition: bcesolver.cpp:700
void setMinAngleIncr(double incr)
Used to set the minimum angle increment. Called by bcesolverworker.hpp.
Definition: bcesolver.hpp:91
Class for solving games created in the game tab.
Definition: bcesolverworker.hpp:45
void workFinished()
Signals that the solve routine has ended.
BCEGurobiCallback * callback
Callback, allows communication with Gurobi solver.
Definition: bcesolverworker.hpp:59
void sendSolution(BCESolution *soln, bool isBoundaryMapped)
Signals a pointer to the solution found by the solver.
BCESolverWorker(BCEGame _game, vector< double > _weightData, vector< vector< double > > _mapBoundaryData, BCEGurobiCallback *_callback, bool _mapBoundaryOption, double _minAngleIncrement)
Constructor.
Definition: bcesolverworker.hpp:68
vector< double > weightData
Weights on the objectives, as supplied by the user in the game tab.
Definition: bcesolverworker.hpp:55
const BCESolution & getSolution() const
Returns a reference to the solution object.
Definition: bcesolverworker.hpp:80
void exceptionSignal(QString message)
Signals an exception thrown during the solve routine.
void startSolve()
Triggered when the user clicks the "Solve" button in the game tab.
Definition: bcesolverworker.hpp:94
vector< vector< double > > mapBoundaryData
Weights on map boundary objectives, supplied in the game tab.
Definition: bcesolverworker.hpp:57
BCESolution solution
Solution, either default or the custom game (see class description).
Definition: bcesolverworker.hpp:53
bool mapBoundaryOption
True if the solver will be mapping the boundary.
Definition: bcesolverworker.hpp:61
BCEGame game
Game.
Definition: bcesolverworker.hpp:46
double minAngleIncrement
Minimum angle increment, used for mapping the boundary.
Definition: bcesolverworker.hpp:63