54 #ifndef _GAMS_AUCTIONS_AUCTION_BASE_H_ 55 #define _GAMS_AUCTIONS_AUCTION_BASE_H_ 61 #include "madara/knowledge/KnowledgeBase.h" 62 #include "madara/knowledge/containers/Map.h" 87 AuctionBase (
const std::string & auction_prefix =
"",
88 const std::string & agent_prefix =
"",
89 madara::knowledge::KnowledgeBase * knowledge = 0);
105 virtual void clear_group (
void);
112 virtual bool is_member (
const std::string & agent_prefix)
const;
122 virtual madara::knowledge::KnowledgeRecord get_bid (
123 const std::string &
id);
129 virtual void set_agent_prefix (
const std::string & prefix);
135 virtual void set_auction_prefix (
const std::string & prefix);
141 virtual void set_knowledge_base (
142 madara::knowledge::KnowledgeBase * knowledge);
147 virtual void sync (
void);
153 const std::string & get_agent_prefix (
void)
const;
159 const std::string & get_auction_prefix (
void)
const;
165 virtual double get_participation (
void)
const;
177 void bid (
const madara::knowledge::KnowledgeRecord & amount);
189 virtual void bid (
const std::string & agent,
190 const madara::knowledge::KnowledgeRecord & amount);
196 virtual std::string get_leader (
void) = 0;
205 bool strip_prefix =
true,
206 bool include_all_members =
false)
const;
212 virtual void advance_round (
void);
218 int get_round (
void)
const;
223 virtual void reset_round (
void);
230 void set_round (
int round);
237 std::string get_auction_round_prefix (
void)
const;
245 void reset_bids_pointer (
void);
270 madara::knowledge::containers::Map
bids_;
280 #include "AuctionBase.inl" 282 #endif // _GAMS_AUCTIONS_AUCTION_BASE_H_ A fixed list of agent members.
Copyright (c) 2016 Carnegie Mellon University.
std::string auction_prefix_
the prefix for the auction
Base class for an auction.
int round_
the auction round in a multi-round auction
madara::knowledge::containers::Map bids_
convenience class for bids
Copyright (c) 2016 Carnegie Mellon University.
Contains all GAMS-related tools, classes and code.
Base class for a group of agents.
groups::GroupFixedList group_
the expected participant group
madara::knowledge::KnowledgeBase * knowledge_
The knowledge base to use as a data plane.
Copyright (c) 2016 Carnegie Mellon University.
std::vector< AuctionBid > AuctionBids
convenience typedef for vector fo AuctionBid
Copyright (c) 2016 Carnegie Mellon University.
std::string agent_prefix_
self prefix of the agent