|
WSF
|
#include <WsfRIPRJob.hpp>


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()). | |
| WsfRIPRJob * | Clone () const override |
| ~WsfRIPRJob () override | |
| WsfRIPRJob & | operator= (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 |
| WsfPlatform * | AssignerPlatform () const |
| WsfRIPRProcessor * | Assigner () const |
| WsfStringId | AssignerProcessorName () const |
| double | GetPriority () const |
| int | GetWinnersMax () const |
| int | GetWinnersMin () const |
| std::string | Description () const |
| const ripr::RIPRJobDataMap & | Data () 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) |
| WsfRIPRManager * | GetManager () const |
| WsfSimulation * | GetSimulation () 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 TypeList & | GetTypeList () const |
| bool | IsA_TypeOf (WsfStringId aType) const |
| WsfObject & | operator= (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 | |
| WsfRIPRManager * | mManagerPtr |
| 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< WsfStringId > | TypeList |
| The list of types returned by GetTypeList. | |
| WsfObject (const WsfObject &aSrc) | |
| Copy constructor (for Clone()). | |
| WsfRIPRJob::WsfRIPRJob | ( | WsfRIPRManager * | aManagerPtr | ) |
References WsfSimulation::GetSimTime(), GetSimulation(), mDescription, mManagerPtr, NextId(), WsfObject::SetName(), WsfObject::SetType(), and WsfObject::WsfObject().
Referenced by Clone(), operator=(), and WsfRIPRJob().
| WsfRIPRJob::WsfRIPRJob | ( | WsfRIPRManager * | aManagerPtr, |
| unsigned int | aAssignerRIPRProcId, | ||
| std::string & | aJobName, | ||
| std::string & | aJobDescription, | ||
| double | aPriority = 0, | ||
| int | aMaxTakers = 1 ) |
| WsfRIPRJob::WsfRIPRJob | ( | const WsfRIPRJob & | aSrc | ) |
Copy constructor (for Clone()).
References WsfObject::GetName(), WsfObject::GetType(), mBidders, mData, mDescription, mManagerPtr, mProgress, WsfObject::SetName(), WsfObject::SetType(), WsfObject::WsfObject(), and WsfRIPRJob().
|
override |
References mBidders, mData, mDescription, and mProgress.
| WsfRIPRProcessor * WsfRIPRJob::Assigner | ( | ) | const |
References GetManager(), and WsfRIPRManager::GetRiprProcById().
Referenced by SetPriority(), and SetWinnersMax().
| WsfPlatform * WsfRIPRJob::AssignerPlatform | ( | ) | const |
References GetManager(), WsfPlatformPart::GetPlatform(), WsfRIPRManager::GetRiprProcById(), and platformPtr.
Referenced by AssignerPlatformIndex(), AssignerPlatformName(), SendMessageBidJob(), SendMessageSetProgress(), and SendMessageUnbidJob().
| size_t WsfRIPRJob::AssignerPlatformIndex | ( | ) | const |
References AssignerPlatform(), and platformPtr.
| WsfStringId WsfRIPRJob::AssignerPlatformName | ( | ) | const |
References AssignerPlatform(), and platformPtr.
|
inline |
| WsfStringId WsfRIPRJob::AssignerProcessorName | ( | ) | const |
References GetManager(), WsfObject::GetNameId(), and WsfRIPRManager::GetRiprProcById().
Referenced by SendMessageBidJob(), SendMessageSetProgress(), and SendMessageUnbidJob().
| void WsfRIPRJob::BidJob | ( | unsigned int | aBidderRIPRProcId, |
| double | aBid ) |
| void WsfRIPRJob::BidJob | ( | unsigned int | aBidderRIPRProcId, |
| double | aBid, | ||
| double | aProgress ) |
References BidJob(), and mProgress.
Referenced by BidJob(), and WsfRIPRProcessor::ProcessMessage().
| void WsfRIPRJob::ClearBidders | ( | ) |
|
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().
|
static |
|
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().
|
inline |
References mData.
| UtScriptData WsfRIPRJob::Data | ( | const std::string & | aDataKey | ) | const |
References mData.
|
inline |
References WsfRIPRJobBoard::DependenciesForJob(), and GetId().
Referenced by WsfRIPRJobBoard::DependencyTest().
|
inline |
References WsfRIPRJobBoard::DependencyAdd(), and GetId().
|
inline |
References WsfRIPRJobBoard::DependencyCheck(), and GetId().
|
inline |
References WsfRIPRJobBoard::DependencyCount(), and GetId().
Referenced by WsfRIPRJobBoard::DependencyTest().
|
inline |
References WsfRIPRJobBoard::DependencyRemove(), and GetId().
|
inline |
References mDescription.
| double WsfRIPRJob::GetBid | ( | unsigned int | aRIPRProcId | ) | const |
References mBidders.
Referenced by WsfRIPRJobBoard::AllocateJobsCoverThenGreedy().
|
inline |
References mBidders.
| int WsfRIPRJob::GetId | ( | ) | const |
Referenced by WsfRIPRJobBoard::BlockJobsWithFailedDependencies(), WsfRIPRJobBoard::BlockJobsWithoutMinWinners(), Dependencies(), DependencyAdd(), DependencyCheck(), DependencyCount(), DependencyRemove(), WsfRIPRJobBoard::DependencyTest(), WsfRIPRProcessor::JobFor(), SendMessageBidJob(), SendMessageSetProgress(), SendMessageUnbidJob(), and UT_DEFINE_SCRIPT_METHOD().
|
inline |
References mManagerPtr.
Referenced by Assigner(), AssignerPlatform(), AssignerProcessorName(), BidJob(), ClearBidders(), GetSimulation(), SetPriority(), SetProgress(), SetWinnersMax(), and UnbidJob().
|
inline |
| double WsfRIPRJob::GetProgress | ( | unsigned int | aBidderRIPRProcId | ) |
References mProgress.
| WsfSimulation * WsfRIPRJob::GetSimulation | ( | ) | const |
References GetManager(), and WsfSimulationExtension::GetSimulation().
Referenced by SendMessageBidJob(), SendMessageSetProgress(), SendMessageUnbidJob(), Touch(), WsfRIPRJob(), and WsfRIPRJob().
|
inline |
|
inline |
Referenced by WsfRIPRJobBoard::BlockJobsWithoutMinWinners(), and WsfRIPRJobBoard::DependencyTest().
|
inline |
|
static |
Referenced by WsfRIPRJob(), and WsfRIPRJob().
| WsfRIPRJob & WsfRIPRJob::operator= | ( | const WsfRIPRJob & | aSrc | ) |
|
inlinestatic |
Referenced by WsfRIPR_ModuleSetup::~WsfRIPR_ModuleSetup().
| void WsfRIPRJob::SendMessageBidJob | ( | wsf::comm::Comm * | aCommPtr, |
| WsfRIPRProcessor * | aBidderPtr, | ||
| int | aChannelIndex, | ||
| double | aBid, | ||
| double | aProgress = 0 ) |
References AssignerPlatform(), AssignerProcessorName(), WsfComponentList::RoleIterator< T >::AtEnd(), wsf::comm::Address::GetAddress(), wsf::comm::Comm::GetAddress(), WsfSimulation::GetCommNetworkManager(), GetId(), WsfRIPRProcessor::GetId(), WsfPlatformPart::GetPlatform(), GetSimulation(), and wsf::comm::Comm::Send().
| void WsfRIPRJob::SendMessageSetProgress | ( | wsf::comm::Comm * | aCommPtr, |
| WsfRIPRProcessor * | aBidderPtr, | ||
| int | aChannelIndex, | ||
| double | aProgress ) |
References AssignerPlatform(), AssignerProcessorName(), WsfComponentList::RoleIterator< T >::AtEnd(), wsf::comm::Address::GetAddress(), wsf::comm::Comm::GetAddress(), WsfSimulation::GetCommNetworkManager(), GetId(), WsfRIPRProcessor::GetId(), WsfPlatformPart::GetPlatform(), GetSimulation(), and wsf::comm::Comm::Send().
| void WsfRIPRJob::SendMessageUnbidJob | ( | wsf::comm::Comm * | aCommPtr, |
| WsfRIPRProcessor * | aBidderPtr, | ||
| int | aChannelIndex ) |
References AssignerPlatform(), AssignerProcessorName(), WsfComponentList::RoleIterator< T >::AtEnd(), wsf::comm::Address::GetAddress(), wsf::comm::Comm::GetAddress(), WsfSimulation::GetCommNetworkManager(), GetId(), WsfRIPRProcessor::GetId(), WsfPlatformPart::GetPlatform(), GetSimulation(), and wsf::comm::Comm::Send().
|
inline |
For XIO (de)serialization.
References mBidders, mData, mDescription, mProgress, and WsfObject::Serialize().
|
inline |
Referenced by WsfRIPRJobBoard::AddJob().
| void WsfRIPRJob::SetPriority | ( | const double | aPriority | ) |
Set the job's priority.
References Assigner(), CurrentTime(), GetManager(), WsfRIPRManager::GetObserver(), WsfRIPRProcessor::JobBoard(), WsfRIPRObserver::JobPriorityChanged, and WsfRIPRJobBoard::SetDirtyJobs().
| void WsfRIPRJob::SetProgress | ( | unsigned int | aRIPRProcId, |
| double | aProgress ) |
| void WsfRIPRJob::SetProgress | ( | WsfRIPRProcessor * | aBidderPtr, |
| int | aChannelIndex, | ||
| double | aProgress ) |
References WsfRIPRProcessor::GetId(), and mProgress.
Referenced by WsfRIPRProcessor::ProcessMessage(), and SetProgress().
| void WsfRIPRJob::SetWinnersMax | ( | const int | aNum | ) |
Sets the maximum number of bidders who can win this job.
References Assigner(), CurrentTime(), GetManager(), WsfRIPRManager::GetObserver(), WsfRIPRProcessor::JobBoard(), WsfRIPRObserver::JobMaxWinnersChanged, and WsfRIPRJobBoard::SetDirtyJobs().
| void WsfRIPRJob::SetWinnersMin | ( | const int | aNum | ) |
Sets the minimum number of bidders who can win this job.
| void WsfRIPRJob::Touch | ( | ) |
References WsfSimulation::GetSimTime(), and GetSimulation().
|
inline |
| ripr::RIPRBidderList::iterator WsfRIPRJob::UnbidJob | ( | unsigned int | aQuitterRIPRProcId | ) |
References GetManager(), WsfRIPRManager::GetRiprProcById(), WsfRIPRProcessor::JobBoard(), mBidders, mProgress, and WsfRIPRJobBoard::SetDirtyJobs().
Referenced by BidJob(), and WsfRIPRProcessor::ProcessMessage().
| 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().
| 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().
| 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().
| std::string WsfRIPRJob::mDescription |
a human-readable string describing this job
Referenced by WsfRIPRJobBoard::AddJob(), WsfRIPRJobBoard::AllocateJobsCoverThenGreedy(), WsfRIPRJobBoard::AllocateJobsGreedy(), WsfRIPRJobBoard::BlockJobsWithFailedDependencies(), WsfRIPRJobBoard::BlockJobsWithoutMinWinners(), WsfRIPRJobBoard::DependencyTest(), Description(), operator=(), WsfRIPRJobBoard::RemoveJob(), Serialize(), WsfRIPRJob(), WsfRIPRJob(), WsfRIPRJob(), and ~WsfRIPRJob().
| WsfRIPRManager* WsfRIPRJob::mManagerPtr |
Referenced by GetManager(), operator=(), WsfRIPRJob(), WsfRIPRJob(), and WsfRIPRJob().
| 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().