1#ifndef CYCLUS_SRC_GREEDY_PRECONDITIONER_H_
2#define CYCLUS_SRC_GREEDY_PRECONDITIONER_H_
13 std::map<std::string, double>*
weights,
18 std::map<std::string, double>*
weights,
19 std::map<ExchangeNode::Ptr, double>*
avg_prefs);
98 return group_weights_[
l] > group_weights_[
r];
106 bool apply_commod_weights_;
107 std::map<ExchangeNode::Ptr, double> avg_prefs_;
108 std::map<std::string, double> commod_weights_;
109 std::map<RequestGroup::Ptr, double> group_weights_;
An ExchangeGraph is a resource-neutral representation of a ResourceExchange.
A GreedyPreconditioner conditions an ExchangeGraph for a GreedySolver by ordering the RequestGroups a...
void Condition(ExchangeGraph *graph)
conditions the graph as described above
GreedyPreconditioner()
constructor if weights are given in heaviest-first order
WgtOrder
the order of commodity weights
@ END
a flag for commodity weights given in the reverse order,
bool NodeComp(const ExchangeNode::Ptr l, const ExchangeNode::Ptr r)
a comparitor for ordering containers of ExchangeNode::Ptrs in descending order based on their commodi...
bool GroupComp(const RequestGroup::Ptr l, const RequestGroup::Ptr r)
a comparitor for ordering containers of Request::Ptrs in descending order based on their average comm...
boost::shared_ptr< RequestGroup > Ptr
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or....
double AvgPref(ExchangeNode::Ptr n)
double NodeWeight(ExchangeNode::Ptr n, std::map< std::string, double > *weights, double avg_pref)
T OptionalQuery(InfileTree *tree, std::string query, T default_val)
a query method for optional parameters
double GroupWeight(RequestGroup::Ptr g, std::map< std::string, double > *weights, std::map< ExchangeNode::Ptr, double > *avg_prefs)
boost::shared_ptr< ExchangeNode > Ptr