SOLA
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
daisi::cpps::logical::AuctionInitiatorState Class Reference

Helper class for the IteratedAuctionAssignmentInitiator to handle and store the state of received bids and winner responses. More...

#include <auction_initiator_state.h>

Classes

struct  Winner
 Helper struct to store information needed to send WinnerNotifications. More...
 

Public Member Functions

 AuctionInitiatorState (std::shared_ptr< LayeredPrecedenceGraph > layered_precedence_graph)
 
void countBidSubmissionProcessing ()
 Counting how many times bid submissions were successful or not. Throwing an exception if there were no bid submissions too many times.
 
std::vector< WinnerselectWinner () const
 Calculating winners for the different ability groups based on received bids.
 
void countWinnerResponseProcessing ()
 Counting how many times winner responses were successful or not. Throwing an exception if there were no bid submissions too many times.
 
std::vector< daisi::material_flow::TaskprocessWinnerAcceptions ()
 Processing each successful winner response and removing related bids.
 
void addBidSubmission (const BidSubmission &bid_submission)
 Adding a received BidSubmission message to the internal state.
 
void addWinnerResponse (const WinnerResponse &winner_response)
 Adding a received WinnerResponse message to the internal state if it was successful.
 
void clearIterationInfo ()
 Clearing all information from the internal state.
 
void clearWinnerAcceptions ()
 Clearing winner acceptions from the internal state.
 

Detailed Description

Helper class for the IteratedAuctionAssignmentInitiator to handle and store the state of received bids and winner responses.

Member Function Documentation

◆ addBidSubmission()

void daisi::cpps::logical::AuctionInitiatorState::addBidSubmission ( const BidSubmission bid_submission)

Adding a received BidSubmission message to the internal state.

Parameters
bid_submissionReceived message

◆ addWinnerResponse()

void daisi::cpps::logical::AuctionInitiatorState::addWinnerResponse ( const WinnerResponse winner_response)

Adding a received WinnerResponse message to the internal state if it was successful.

Parameters
winner_responseReceived message

◆ processWinnerAcceptions()

std::vector< daisi::material_flow::Task > daisi::cpps::logical::AuctionInitiatorState::processWinnerAcceptions ( )

Processing each successful winner response and removing related bids.

Returns
Tasks that got auctioned and can be set to scheduled.

◆ selectWinner()

std::vector< AuctionInitiatorState::Winner > daisi::cpps::logical::AuctionInitiatorState::selectWinner ( ) const

Calculating winners for the different ability groups based on received bids.

Returns
Vector of winners with information to send WinnerNotifications.

The documentation for this class was generated from the following files: