GAMS  1.4.0
AuctionMinimumDistance.h
Go to the documentation of this file.
1 
54 #ifndef _GAMS_AUCTIONS_MINIMUM_DISTANCE_H_
55 #define _GAMS_AUCTIONS_MINIMUM_DISTANCE_H_
56 
57 #include <vector>
58 #include <string>
59 #include <map>
60 
61 #include "madara/knowledge/containers/StringVector.h"
62 
63 #include "AuctionBase.h"
64 #include "AuctionFactory.h"
65 
68 #include "gams/pose/Position.h"
69 
70 namespace gams
71 {
72  namespace auctions
73  {
78  {
79  public:
87  AuctionMinimumDistance(const std::string & auction_prefix = "",
88  const std::string & agent_prefix = "",
89  madara::knowledge::KnowledgeBase * knowledge = 0,
90  platforms::BasePlatform * platform = 0);
91 
96 
101  virtual std::string get_leader(void);
102 
108 
114 
120 
124  void calculate_bids(void);
125 
126  protected:
127 
132 
137  };
138 
143  {
144  public:
145 
150 
155 
163  virtual AuctionBase * create(const std::string & auction_prefix = "",
164  const std::string & agent_prefix = "",
165  madara::knowledge::KnowledgeBase * knowledge = 0);
166  };
167  }
168 }
169 
170 #endif // _GAMS_AUCTIONS_MINIMUM_DISTANCE_H_
Copyright(c) 2016 Carnegie Mellon University.
Copyright(c) 2016 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
#define GAMS_EXPORT
Definition: GamsExport.h:20
Copyright(c) 2016 Carnegie Mellon University.
Base class for an auction.
Definition: AuctionBase.h:79
Base class for an auction factory.
Factory for creating minimum-bid auctions.
virtual AuctionBase * create(const std::string &auction_prefix="", const std::string &agent_prefix="", madara::knowledge::KnowledgeBase *knowledge=0)
Creates a minimum-bid auction.
An auction where the winner is the closest agent to a location.
void set_target(utility::GPSPosition target)
Sets the target of the distance calculations.
platforms::BasePlatform * platform_
The platform is necessary to construct poses(we need frame)
AuctionMinimumDistance(const std::string &auction_prefix="", const std::string &agent_prefix="", madara::knowledge::KnowledgeBase *knowledge=0, platforms::BasePlatform *platform=0)
Constructor.
virtual ~AuctionMinimumDistance()
Constructor.
void calculate_bids(void)
Calculate bids using current agent locations.
void set_target(pose::Position target)
Sets the target of the distance calculations.
virtual std::string get_leader(void)
Returns the leader of the bidding process.
void set_platform(platforms::BasePlatform *platform)
Sets the platform whose frame we are referencing.
pose::Position target_
The location that distance will be calculated to.
The base platform for all platforms to use.
Definition: BasePlatform.h:113
A position in the global positioning system reference frame.
Definition: GPSPosition.h:78
Contains all GAMS-related tools, classes and code.
Copyright (c) 2015-2018 Carnegie Mellon University.