SOLA
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
daisi::cpps::logical::AuctionParticipantState Struct Reference

Helper struct for the IteratedAuctionAssignmentParticipant to store the state of open auction processes, calculated bids (metrics) and insertion points. Each AuctionParticipantState is only responsible for one auction process by one dedicated initiator. More...

#include <auction_participant_state.h>

Public Member Functions

 AuctionParticipantState (const std::vector< daisi::material_flow::Task > &tasks)
 Initiating the task states based on the given tasks.
 
AuctionParticipantTaskState pickBest ()
 Given the information from the task_state_mapping, the best possible task is picked depending on stored metrics.
 
void prune ()
 Removing task states with invalid stored information (= empty metrics and insertion point) from the map.
 
bool hasEntries () const
 Checking whether there are valid entries.
 

Public Attributes

std::unordered_map< std::string, AuctionParticipantTaskStatetask_state_mapping
 Storing the state of each open task. The key is the task uuid.
 
std::string previously_submitted
 Task uuid of the lastest previously submitted task. If a task was submitted before, the initiator has still the relevant information and sending this bid again is unnecessary overhead.
 

Detailed Description

Helper struct for the IteratedAuctionAssignmentParticipant to store the state of open auction processes, calculated bids (metrics) and insertion points. Each AuctionParticipantState is only responsible for one auction process by one dedicated initiator.

Constructor & Destructor Documentation

◆ AuctionParticipantState()

daisi::cpps::logical::AuctionParticipantState::AuctionParticipantState ( const std::vector< daisi::material_flow::Task > &  tasks)
explicit

Initiating the task states based on the given tasks.

Parameters
tasksOpen tasks that initially got announced.

Member Function Documentation

◆ hasEntries()

bool daisi::cpps::logical::AuctionParticipantState::hasEntries ( ) const

Checking whether there are valid entries.

Returns

◆ pickBest()

AuctionParticipantTaskState daisi::cpps::logical::AuctionParticipantState::pickBest ( )

Given the information from the task_state_mapping, the best possible task is picked depending on stored metrics.

Returns

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