Abstracts a Gurobi LP solver that can solve a scheduling instance.
More...
#include <gurobi_fractional_scheduler.h>
Abstracts a Gurobi LP solver that can solve a scheduling instance.
Creates a gurobi fractional scheduler with given scheduling instance.
- Parameters
-
si | The scheduling instance of the gurobi MIP scheduler. |
void delphos::GurobiFractionalScheduler::ComputeExpectedTime |
( |
const string |
column | ) |
|
|
virtual |
Computes the expected times.
- Parameters
-
column | The column name in which the expected times are saved. |
Reimplemented from delphos::FractionalScheduler.
bool delphos::GurobiFractionalScheduler::CreateModel |
( |
| ) |
|
Inits the solver and load the model in gurobi.
Return true if the model has been successfully loaded in gurobi.
const double delphos::GurobiFractionalScheduler::GetDual |
( |
const string & |
cname | ) |
|
|
virtual |
Returns the dual value of given constraint.
- Parameters
-
cname | The name of the constraint of which the dual value is returned. |
the cname of constraint of original name name can be name_lower and name_upper that corresponds to lower bound constraint and upper bound constraint.
Reimplemented from delphos::FractionalScheduler.
double delphos::GurobiFractionalScheduler::GetSol |
( |
const BlockIndexType & |
block_index, |
|
|
const unsigned int & |
period, |
|
|
const unsigned int & |
destination |
|
) |
| |
Returns the solution value for a block period and destination.
- Parameters
-
block_index | The index of the block in the block model. |
period | The period. |
destination | The destination. |
bool delphos::GurobiFractionalScheduler::Run |
( |
| ) |
|
|
virtual |
Generates the model in Gurobi and optimize it.
Return true only if the model has been successfully optimized.
Reimplemented from delphos::FractionalScheduler.
void delphos::GurobiFractionalScheduler::SetLogFile |
( |
const string & |
name | ) |
|
|
virtual |
void delphos::GurobiFractionalScheduler::SetOptimizationSense |
( |
const Model::OptimizationSense & |
sense | ) |
|
Set the sense of the optimization model.
- Parameters
-
sense | The sense of the optimization. The sense can be Model::OptimizationSense::MINIMIZATION or Model::OptimizationSense::MAXIMIZATION. |
void delphos::GurobiFractionalScheduler::WriteLP |
( |
const string |
outfile | ) |
|
Writes the LP model in given file.
- Parameters
-
outfile | The name of the outfile in which the model is writen in LP format. Return true only if the model has been successfully writen in the LP format in given file. This method can only be used after the method InitSolver. |
void delphos::GurobiFractionalScheduler::WriteSol |
( |
const string |
outfile | ) |
|
Writes the solution in given file.
- Parameters
-
outfile | The name of the outfile in which the solution of the model is writen. Return true only if the solution of the model has been successfully writen in given file. This method can only be used after the method RunSolver. |
The documentation for this class was generated from the following files:
- /home/gmorales/dev/MineLink/BlockScheduling/core/trunk/solvers/scheduling/fractional_scheduler/gurobi_fractional_scheduler.h
- /home/gmorales/dev/MineLink/BlockScheduling/core/trunk/solvers/scheduling/fractional_scheduler/gurobi_fractional_scheduler.cpp