TCPSPSuite
|
a soultion for a TCPSP instance More...
#include <solution.hpp>
Public Member Functions | |
Solution (const Instance &instance, bool optimal, std::vector< Maybe< unsigned int >> &start_times, Maybe< double > lower_bound) | |
Solution (const Instance &instance, bool optimal, std::vector< Maybe< unsigned int >> &&start_times, Maybe< double > lower_bound) | |
Solution (const Instance &instance, bool optimal, std::vector< unsigned int > &start_times, Maybe< double > lower_bound) | |
Solution (const Instance &instance) | |
Solution (const Solution &other) | |
Solution (Solution &&other) | |
Solution & | operator= (const Solution &other) |
Solution & | operator= (Solution &&other) |
void | print () const |
void | print_jobs () const |
void | print_profile () const |
double | get_costs () const |
double | get_overshoot_costs () const |
double | get_investment_costs () const |
double | get_costs_lower_bound () const |
const Instance * | get_instance () const |
unsigned int | get_start_time (unsigned int job_id) const |
bool | job_scheduled (unsigned int job_id) const |
bool | is_feasible () const |
bool | is_optimal () const |
double | get_max_usage (unsigned int rid) const |
Maybe< double > | get_lower_bound () const |
bool | verify (int seed, InconsistentResultError *error_out=nullptr) const |
a soultion for a TCPSP instance
A solution contains for every job its start time. most of the informations get calculated on request
Solution::Solution | ( | const Instance & | instance, |
bool | optimal, | ||
std::vector< Maybe< unsigned int >> & | start_times, | ||
Maybe< double > | lower_bound | ||
) |
Solution::Solution | ( | const Instance & | instance, |
bool | optimal, | ||
std::vector< Maybe< unsigned int >> && | start_times, | ||
Maybe< double > | lower_bound | ||
) |
Solution::Solution | ( | const Instance & | instance, |
bool | optimal, | ||
std::vector< unsigned int > & | start_times, | ||
Maybe< double > | lower_bound | ||
) |
|
explicit |
"Default" constructor creates an obviously not feasible solution
double Solution::get_costs | ( | ) | const |
get the costs for this solution
double Solution::get_costs_lower_bound | ( | ) | const |
Get the costs for this solution
const Instance * Solution::get_instance | ( | ) | const |
Get the TCPSP instance that was solved
Maybe< double > Solution::get_lower_bound | ( | ) | const |
get the lower bound for the TCPSP instance
double Solution::get_max_usage | ( | unsigned int | rid | ) | const |
Returns the maximum usage of the geven resource
rid | the resource id |
unsigned int Solution::get_start_time | ( | unsigned int | job_id | ) | const |
Get the start time for the given job Warning If the job was not scheduled this is undefined!
job_id | the job to get the start time for |
bool Solution::is_feasible | ( | ) | const |
checks if this solution is feasible Warning currently only checks if all jobs are scheduled
bool Solution::is_optimal | ( | ) | const |
checks if this solution is optimal Warning this is true if the solver says so!
bool Solution::job_scheduled | ( | unsigned int | job_id | ) | const |
checks if a job is scheduled
job_id | the job to check |
void Solution::print | ( | ) | const |
logs generell informations about this solution (for example the costs of this Solution)
void Solution::print_jobs | ( | ) | const |
logs for every job the time it starts and the last time it runs
void Solution::print_profile | ( | ) | const |
logs the profile
bool Solution::verify | ( | int | seed, |
InconsistentResultError * | error_out = nullptr |
||
) | const |
verifies that this solution is correct all constraints are met