Quintiq file version 2.0
|
#parent: #root
|
Method LibMon_CollectInfo () const
|
{
|
Description: 'Collect model specific information.'
|
TextBody:
|
[*
|
/*
|
Send the following information to monitoring library:
|
- # of total scenarios
|
- # of online scenarios
|
- average # of objects across onlines scenarios (refer to method LibMon_SignificantObjects for the list)
|
*/
|
|
// Retrieve all macroplans keys.
|
macroplansObjectInfos := MDSEditor::Editor().ObjectInfos( typeof( MacroPlan ).ShortName() );
|
|
// Get online datasets.
|
options := DatasetFindOptions::Construct().Kind( typeof( MacroPlan ).ShortName() );
|
macroplans := MDSMacroPlan::Find( options );
|
|
// Publish the info of total and online scenarios to monitoring library
|
this->LibMon_SendInfo( ScenarioManager::LibMon_Scenario_ID() + ScenarioManager::LibMon_ID_AllScenarios(), macroplansObjectInfos.Elements( relsize ) );
|
this->LibMon_SendInfo( ScenarioManager::LibMon_Scenario_ID() + ScenarioManager::LibMon_ID_OnlineScenarios(), macroplans->GroupAll()->Size() );
|
|
// Now, we go through all the object types we wanna sample
|
// Retrieve their count from macroplans
|
traverse( ScenarioManager::LibMon_SignificantObjects(), Elements, e )
|
{
|
// Numbers of this object from all macroplans
|
numbers := macroplans->LibMon_ColIectInfo( e )->GroupAll();
|
this->LibMon_SendInfo( ScenarioManager::LibMon_MacroPlan_ID() + e, numbers );
|
}
|
*]
|
}
|