WSF
WsfRIPRJob Class Reference

#include <WsfRIPRJob.hpp>

Inheritance diagram for WsfRIPRJob:
Collaboration diagram for WsfRIPRJob:

Public Member Functions

 WsfRIPRJob (WsfRIPRManager *aManagerPtr)
 WsfRIPRJob (WsfRIPRManager *aManagerPtr, unsigned int aAssignerRIPRProcId, std::string &aJobName, std::string &aJobDescription, double aPriority=0, int aMaxTakers=1)
 WsfRIPRJob (const WsfRIPRJob &aSrc)
 Copy constructor (for Clone()).
WsfRIPRJobClone () const override
 ~WsfRIPRJob () override
WsfRIPRJoboperator= (const WsfRIPRJob &aSrc)
void Update (double aSimTime)
void BidJob (unsigned int aBidderRIPRProcId, double aBid, double aProgress)
void BidJob (unsigned int aBidderRIPRProcId, double aBid)
ripr::RIPRBidderList::iterator UnbidJob (unsigned int aQuitterRIPRProcId)
void ClearBidders ()
double GetBid (unsigned int aRIPRProcId) const
ripr::RIPRBidderList GetBidders () const
double GetBestProgress ()
void SetWinnersMax (const int aNum)
 Sets the maximum number of bidders who can win this job.
void SetWinnersMin (const int aNum)
 Sets the minimum number of bidders who can win this job.
void SetPriority (const double aPriority)
 Set the job's priority.
void SetProgress (WsfRIPRProcessor *aBidderPtr, int aChannelIndex, double aProgress)
void SetProgress (unsigned int aRIPRProcId, double aProgress)
double GetProgress (unsigned int aBidderRIPRProcId)
int GetRank (unsigned int aBidderRIPRProcId)
int GetId () const
unsigned int AssignerProcessorId () const
WsfStringId AssignerPlatformName () const
size_t AssignerPlatformIndex () const
WsfPlatformAssignerPlatform () const
WsfRIPRProcessorAssigner () const
WsfStringId AssignerProcessorName () const
double GetPriority () const
int GetWinnersMax () const
int GetWinnersMin () const
std::string Description () const
const ripr::RIPRJobDataMapData () const
UtScriptData Data (const std::string &aDataKey) const
template<typename T>
void Serialize (T &aBuff)
 For XIO (de)serialization.
double CurrentTime () const
void SetBidWindowOpen (const bool aValue)
bool IsBidWindowOpen () const
void SendMessageSetProgress (wsf::comm::Comm *aCommPtr, WsfRIPRProcessor *aBidderPtr, int aChannelIndex, double aProgress)
void SendMessageBidJob (wsf::comm::Comm *aCommPtr, WsfRIPRProcessor *aBidderPtr, int aChannelIndex, double aBid, double aProgress=0)
void SendMessageUnbidJob (wsf::comm::Comm *aCommPtr, WsfRIPRProcessor *aBidderPtr, int aChannelIndex)
WsfRIPRManagerGetManager () const
WsfSimulationGetSimulation () const
std::set< int > & Dependencies ()
void DependencyAdd (int aDependedOnJobId)
void DependencyRemove (int aDependedOnJobId)
bool DependencyCheck (int aDependedOnJobId)
int DependencyCount ()
void Touch ()
double TouchTime ()
Public Member Functions inherited from WsfObject
 WsfObject ()
 This is the constructor for the WsfObject class.
 ~WsfObject () override
 This is the destructor for the WsfObject class.
const char * GetScriptClassName () const override
virtual bool ProcessInput (UtInput &aInput)
const std::string & GetType () const
WsfStringId GetTypeId () const
 Get the string ID of the 'type' of the object.
void SetType (WsfStringId aType)
const std::string & GetBaseType () const
WsfStringId GetBaseTypeId () const
const TypeListGetTypeList () const
bool IsA_TypeOf (WsfStringId aType) const
WsfObjectoperator= (const WsfObject &aRhs)
 Assignment operator.
template<typename T>
void Serialize (T &aBuff)
 For XIO (de)serialization.
const std::string & GetName () const
WsfStringId GetNameId () const
void SetName (WsfStringId aName)

Static Public Member Functions

static bool CompareBidders (const ripr::RIPRBidderPair &first, const ripr::RIPRBidderPair &second)
static int NextId ()
static void Reset ()

Public Attributes

WsfRIPRManagermManagerPtr
ripr::RIPRBidderList mBidders
 list of pairs matching bidders (by proc id) to their bids (doubles)
ripr::RIPRJobProgressMap mProgress
 mapping between proc ids and progress performing this job
std::string mDescription
 a human-readable string describing this job
ripr::RIPRJobDataMap mData
 key/value pairs of auxiliary data attached to this job

Additional Inherited Members

Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.
 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).

Constructor & Destructor Documentation

◆ WsfRIPRJob() [1/3]

◆ WsfRIPRJob() [2/3]

WsfRIPRJob::WsfRIPRJob ( WsfRIPRManager * aManagerPtr,
unsigned int aAssignerRIPRProcId,
std::string & aJobName,
std::string & aJobDescription,
double aPriority = 0,
int aMaxTakers = 1 )

◆ WsfRIPRJob() [3/3]

◆ ~WsfRIPRJob()

WsfRIPRJob::~WsfRIPRJob ( )
override

References mBidders, mData, mDescription, and mProgress.

Member Function Documentation

◆ Assigner()

WsfRIPRProcessor * WsfRIPRJob::Assigner ( ) const

◆ AssignerPlatform()

◆ AssignerPlatformIndex()

size_t WsfRIPRJob::AssignerPlatformIndex ( ) const

References AssignerPlatform(), and platformPtr.

◆ AssignerPlatformName()

WsfStringId WsfRIPRJob::AssignerPlatformName ( ) const

References AssignerPlatform(), and platformPtr.

◆ AssignerProcessorId()

unsigned int WsfRIPRJob::AssignerProcessorId ( ) const
inline

◆ AssignerProcessorName()

◆ BidJob() [1/2]

◆ BidJob() [2/2]

void WsfRIPRJob::BidJob ( unsigned int aBidderRIPRProcId,
double aBid,
double aProgress )

References BidJob(), and mProgress.

Referenced by BidJob(), and WsfRIPRProcessor::ProcessMessage().

◆ ClearBidders()

◆ Clone()

WsfRIPRJob * WsfRIPRJob::Clone ( ) const
inlineoverridevirtual

Return a copy of this object. Must be implemented by all derived types. If cloning is impossible, a WsfUncloneableException should be thrown.

Implements WsfObject.

References WsfRIPRJob().

◆ CompareBidders()

bool WsfRIPRJob::CompareBidders ( const ripr::RIPRBidderPair & first,
const ripr::RIPRBidderPair & second )
static

◆ CurrentTime()

double WsfRIPRJob::CurrentTime ( ) const
inline

Returns what this job believes to be the current time. This is intended for internal use, but somebody could conceivably find an external use for it.

Referenced by SetPriority(), and SetWinnersMax().

◆ Data() [1/2]

const ripr::RIPRJobDataMap & WsfRIPRJob::Data ( ) const
inline

References mData.

◆ Data() [2/2]

UtScriptData WsfRIPRJob::Data ( const std::string & aDataKey) const

References mData.

◆ Dependencies()

std::set< int > & WsfRIPRJob::Dependencies ( )
inline

◆ DependencyAdd()

void WsfRIPRJob::DependencyAdd ( int aDependedOnJobId)
inline

◆ DependencyCheck()

bool WsfRIPRJob::DependencyCheck ( int aDependedOnJobId)
inline

◆ DependencyCount()

int WsfRIPRJob::DependencyCount ( )
inline

◆ DependencyRemove()

void WsfRIPRJob::DependencyRemove ( int aDependedOnJobId)
inline

◆ Description()

std::string WsfRIPRJob::Description ( ) const
inline

References mDescription.

◆ GetBestProgress()

double WsfRIPRJob::GetBestProgress ( )

References mBidders, mProgress, and Update().

◆ GetBid()

double WsfRIPRJob::GetBid ( unsigned int aRIPRProcId) const

◆ GetBidders()

ripr::RIPRBidderList WsfRIPRJob::GetBidders ( ) const
inline

References mBidders.

◆ GetId()

◆ GetManager()

◆ GetPriority()

◆ GetProgress()

double WsfRIPRJob::GetProgress ( unsigned int aBidderRIPRProcId)

References mProgress.

◆ GetRank()

int WsfRIPRJob::GetRank ( unsigned int aBidderRIPRProcId)

References mBidders, and Update().

◆ GetSimulation()

◆ GetWinnersMax()

int WsfRIPRJob::GetWinnersMax ( ) const
inline

◆ GetWinnersMin()

int WsfRIPRJob::GetWinnersMin ( ) const
inline

◆ IsBidWindowOpen()

bool WsfRIPRJob::IsBidWindowOpen ( ) const
inline

◆ NextId()

int WsfRIPRJob::NextId ( )
static

Referenced by WsfRIPRJob(), and WsfRIPRJob().

◆ operator=()

◆ Reset()

void WsfRIPRJob::Reset ( )
inlinestatic

◆ SendMessageBidJob()

◆ SendMessageSetProgress()

◆ SendMessageUnbidJob()

◆ Serialize()

template<typename T>
void WsfRIPRJob::Serialize ( T & aBuff)
inline

For XIO (de)serialization.

References mBidders, mData, mDescription, mProgress, and WsfObject::Serialize().

◆ SetBidWindowOpen()

void WsfRIPRJob::SetBidWindowOpen ( const bool aValue)
inline

Referenced by WsfRIPRJobBoard::AddJob().

◆ SetPriority()

void WsfRIPRJob::SetPriority ( const double aPriority)

◆ SetProgress() [1/2]

void WsfRIPRJob::SetProgress ( unsigned int aRIPRProcId,
double aProgress )

◆ SetProgress() [2/2]

void WsfRIPRJob::SetProgress ( WsfRIPRProcessor * aBidderPtr,
int aChannelIndex,
double aProgress )

◆ SetWinnersMax()

void WsfRIPRJob::SetWinnersMax ( const int aNum)

◆ SetWinnersMin()

void WsfRIPRJob::SetWinnersMin ( const int aNum)

Sets the minimum number of bidders who can win this job.

◆ Touch()

void WsfRIPRJob::Touch ( )

◆ TouchTime()

double WsfRIPRJob::TouchTime ( )
inline

◆ UnbidJob()

ripr::RIPRBidderList::iterator WsfRIPRJob::UnbidJob ( unsigned int aQuitterRIPRProcId)

◆ Update()

void WsfRIPRJob::Update ( double aSimTime)

if Update is called with a time parameter, update the time member var then call the parameterless Update().

References Update().

Referenced by GetBestProgress(), GetRank(), and Update().

Member Data Documentation

◆ mBidders

ripr::RIPRBidderList WsfRIPRJob::mBidders

list of pairs matching bidders (by proc id) to their bids (doubles)

Referenced by BidJob(), ClearBidders(), GetBestProgress(), GetBid(), GetBidders(), GetRank(), operator=(), Serialize(), UnbidJob(), WsfRIPRJob(), and ~WsfRIPRJob().

◆ mData

ripr::RIPRJobDataMap WsfRIPRJob::mData

key/value pairs of auxiliary data attached to this job

Referenced by Data(), Data(), WsfRIPRJobBoard::GetJobByData(), operator=(), Serialize(), WsfRIPRJob(), and ~WsfRIPRJob().

◆ mDescription

◆ mManagerPtr

WsfRIPRManager* WsfRIPRJob::mManagerPtr

◆ mProgress

ripr::RIPRJobProgressMap WsfRIPRJob::mProgress

mapping between proc ids and progress performing this job

Referenced by BidJob(), ClearBidders(), GetBestProgress(), GetProgress(), operator=(), Serialize(), SetProgress(), UnbidJob(), WsfRIPRJob(), and ~WsfRIPRJob().


The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved