#include "fpaknown.hpp"
void solveFPA(int nvals, int nbids,
double entryCost, double reservePrice,
bool exAnteFee);
int main(int argc, char ** argv)
{
double entryCost=0.0;
double reservePrice=0.125;
int nvals=20;
int nbids=20;
double lowbid = 0.0;
solveFPA(nvals,nbids,entryCost,reservePrice,false);
return 0;
}
void solveFPA(int nvals, int nbids,
double entryCost, double reservePrice,
bool exAnteFee)
{
int t, a, ahat;
double minAngleIncrement = 0.05;
vector< vector<double> > devObjectives;
stringstream filename;
filename << "fpaknown_nv=" << nvals << "_nb=" << nbids << ".bce";
bool verbose = true;
double highbid = 1.0;
if (verbose)
cout << "Starting main" << endl;
try
{
FPAKnown fpa(nbids,nvals,entryCost,reservePrice,highbid,
exAnteFee);
fpa.distribution.clear();
fpa.setHasProductStructureData(true);
if (verbose)
cout << "Constructor finished" << endl;
solver.populate();
if (verbose)
cout << "Done populating" << endl;
int numObjs = fpa.getNumObjectives();
vector<double> solverWeights(numObjs,0);
solverWeights[2]=-1;
solverWeights[0]=-1;
solverWeights[1]=-1;
solverWeights[2]=-1;
if (verbose)
cout << "Objective function set" << endl;
solver.solve(solverWeights);
solver.getSolution(soln);
string fileNameStr = filename.str();
const char * fnameC = fileNameStr.c_str();
}
{
cerr << "BCEException caught." << endl;
}
catch (...)
{
cout << "Unknown exception caught." << endl;
}
}
Exception class for BCESolve.
Definition: bceexception.hpp:33
Class for storing data produced by BCESolver.
Definition: bcesolution.hpp:64
static void save(const BCESolution &data, const char *filename)
Serialize a BCESolution object using Boost.
Definition: bcesolution.hpp:202
Solves a BCEAbstractGame using gurobi.
Definition: bcesolver.hpp:47
CDF is of the form .
Definition: bcedistr.hpp:352