VieSched++
VieVS VLBI Scheduling Software
VieVS::Scheduler Class Reference

this is the VLBI scheduling class which is responsible for the scan selection and the creation of the schedule More...

#include <Scheduler.h>

Inheritance diagram for VieVS::Scheduler:
Collaboration diagram for VieVS::Scheduler:

Classes

struct  Parameters
 general parameters used for scheduling More...
 
struct  PreCalculated
 pre calculated values (deprecated) More...
 

Public Member Functions

 Scheduler (Initializer &init, std::string path, std::string fname)
 constructor More...
 
 Scheduler (std::string name, std::string path, Network network_, SourceList sourceList, std::vector< Scan > scans, boost::property_tree::ptree xml, std::shared_ptr< ObservingMode > obsModes_=nullptr)
 constructor More...
 
void start () noexcept
 main function that starts the scheduling More...
 
Subcon createSubcon (const std::shared_ptr< Subnetting > &subnetting, Scan::ScanType type, const boost::optional< StationEndposition > &endposition=boost::none) noexcept
 this function creates a subcon with all scans, times and scores More...
 
Subcon allVisibleScans (Scan::ScanType type, const boost::optional< StationEndposition > &endposition=boost::none, bool doNotObserveSourcesWithinMinRepeat=true) noexcept
 constructs all visible scans More...
 
void update (Scan &scan, std::ofstream &of) noexcept
 updates the selected next scans to the schedule More...
 
void consideredUpdate (unsigned long n1scans, unsigned long n2scans, int depth, std::ofstream &of) noexcept
 updates and prints the number of all considered scans More...
 
void statistics (std::ofstream &of)
 statistics output More...
 
void highImpactScans (HighImpactScanDescriptor &himp, std::ofstream &of)
 schedule high impact scans More...
 
void calibratorBlocks (std::ofstream &of)
 schedule calibrator blocks More...
 
bool checkAndStatistics (std::ofstream &of) noexcept
 checks the schedule with an independend methode More...
 
const SourceListgetSourceList () const noexcept
 get all sources More...
 
const NetworkgetNetwork () const noexcept
 get station network More...
 
const std::string & getPath () const noexcept
 get path More...
 
const std::shared_ptr< const ObservingMode > & getObservingMode () const noexcept
 get observing mode network More...
 
int getNumberOfObservations () const noexcept
 get number of observations scheduled in this observation More...
 
const std::vector< Scan > & getScans () const noexcept
 get all scans More...
 
- Public Member Functions inherited from VieVS::VieVS_NamedObject
 VieVS_NamedObject (std::string name, unsigned long id)
 constructor More...
 
 VieVS_NamedObject (std::string name, std::string alternativeName, unsigned long id)
 constructor More...
 
const std::string & getName () const
 get object name More...
 
const std::string & getAlternativeName () const
 get object alternative name More...
 
bool hasAlternativeName () const
 check if object has alternative name More...
 
bool hasName (const std::string &name) const
 check if object has name More...
 
void changeName (const std::string &newName)
 change name of object More...
 
- Public Member Functions inherited from VieVS::VieVS_Object
 VieVS_Object (unsigned long id)
 constructor More...
 
const unsigned long getId () const
 get object id More...
 
bool hasValidId () const
 check if id is valid More...
 
bool hasId (unsigned long id) const
 check if object has specific id More...
 
void setId (unsigned long id)
 set object id More...
 
std::string printId () const
 object id string More...
 

Private Member Functions

void startScanSelection (unsigned int endTime, std::ofstream &of, Scan::ScanType type, boost::optional< StationEndposition > &opt_endposition, boost::optional< Subcon > &subcon, int depth)
 start recursive scan selection More...
 
bool checkForNewEvents (unsigned int time, bool output, std::ofstream &of, bool tagalong) noexcept
 checks if some parameters need to be changed More...
 
void listSourceOverview (std::ofstream &of) noexcept
 output of source overview More...
 
void startTagelongMode (Station &station, SkyCoverage &skyCoverage, std::ofstream &of)
 start tagalong mode More...
 
bool checkOptimizationConditions (std::ofstream &of)
 check optimization conditions More...
 
void changeStationAvailability (const boost::optional< StationEndposition > &endposition, StationEndposition::change change)
 change station availability More...
 
void startScanSelectionBetweenScans (unsigned int duration, std::ofstream &of, Scan::ScanType type, bool output=false, bool ignoreTagalong=false)
 start scan selection between scans More...
 
void resetAllEvents (std::ofstream &of, bool resetCurrentPointingVector=true)
 reset all events to time zero More...
 
void ignoreTagalongParameter ()
 ignore tagalong parameter More...
 
void idleToScanTime (Timestamp ts, std::ofstream &of)
 transform idle time to observing time More...
 
void sortSchedule (Timestamp ts=Timestamp::start)
 sort schedule More...
 
void sortSchedule (unsigned long staid, Timestamp ts=Timestamp::start)
 sort schedule based on station More...
 
void writeCalibratorStatistics (std::ofstream &of, std::vector< double > &highestElevations, std::vector< double > &lowestElevations)
 write astrometric calibrator statistics More...
 
void writeCalibratorHeader (std::ofstream &of)
 write astrometric calibrator block header More...
 
void updateObservingTimes ()
 updates the time of each observation according to the observing times of the station More...
 
void scheduleAPrioriScans (const boost::property_tree::ptree &ptree, std::ofstream &of)
 add a priori scan More...
 

Static Private Member Functions

static bool calibratorUpdate (const std::vector< Scan > &bestScans, std::vector< double > &prevHighElevationScores, std::vector< double > &prevLowElevationScores, std::vector< double > &highestElevations, std::vector< double > &lowestElevations)
 astrometric calibrator update More...
 

Private Attributes

int version_
 version More...
 
std::string path_
 path to VieSchedpp.xml directory More...
 
boost::property_tree::ptree xml_
 content of VieSchedpp.xml file More...
 
SourceList sourceList_
 session source list More...
 
Network network_
 station network More...
 
std::shared_ptr< const ObservingModeobsModes_ = nullptr
 observing modes More...
 
std::shared_ptr< const ModecurrentObservingMode_ = nullptr
 current observing mode More...
 
std::vector< Scanscans_
 all scans in schedule More...
 
Parameters parameters_
 general scheduling parameters More...
 
PreCalculated preCalculated_
 pre calculated values More...
 
unsigned long nSingleScansConsidered = 0
 considered single source scans More...
 
unsigned long nSubnettingScansConsidered = 0
 considered subnetting scans More...
 
unsigned long nObservationsConsidered = 0
 considered baselines More...
 
boost::optional< HighImpactScanDescriptorhimp_
 high impact scan descriptor More...
 
std::vector< CalibratorBlockcalib_
 calibrator impact scan descriptor More...
 
boost::optional< MultiScheduling::ParametersmultiSchedulingParameters_
 multi scheduling paramters More...
 

Static Private Attributes

static unsigned long nextId = 0
 next id for this object type More...
 

Friends

class Output
 

Detailed Description

this is the VLBI scheduling class which is responsible for the scan selection and the creation of the schedule

Author
Matthias Schartner
Date
28.06.2017

Constructor & Destructor Documentation

VieVS::Scheduler::Scheduler ( Initializer init,
std::string  path,
std::string  fname 
)

constructor

Author
Matthias Schartner
Parameters
initinitializer
pathpath to VieSchedpp.xml file
fnamefile name
Scheduler::Scheduler ( std::string  name,
std::string  path,
Network  network_,
SourceList  sourceList,
std::vector< Scan scans,
boost::property_tree::ptree  xml,
std::shared_ptr< ObservingMode obsModes_ = nullptr 
)

constructor

Author
Matthias Schartner
Parameters
namesession name
pathsession path
network_station network
sourceListsource list
scanslist of scans
xmlVieSchedpp.xml file

Member Function Documentation

Subcon Scheduler::allVisibleScans ( Scan::ScanType  type,
const boost::optional< StationEndposition > &  endposition = boost::none,
bool  doNotObserveSourcesWithinMinRepeat = true 
)
noexcept

constructs all visible scans

Author
Matthias Schartner
Parameters
typescan type
endpositionrequired endposition
doNotObserveSourcesWithinMinRepeatconsider scans (with reduced weight) if they are within min repeat time
Returns
subcon with all visible single source scans

Here is the call graph for this function:

Here is the caller graph for this function:

void Scheduler::calibratorBlocks ( std::ofstream &  of)

schedule calibrator blocks

Author
Matthias Schartner
Parameters
ofoutstream object

Here is the call graph for this function:

Here is the caller graph for this function:

bool Scheduler::calibratorUpdate ( const std::vector< Scan > &  bestScans,
std::vector< double > &  prevHighElevationScores,
std::vector< double > &  prevLowElevationScores,
std::vector< double > &  highestElevations,
std::vector< double > &  lowestElevations 
)
staticprivate

astrometric calibrator update

Author
Matthias Schartner
Parameters
bestScansscheduled scans
prevHighElevationScorespreviouse high elevation scores
prevLowElevationScorespreviouse low elevation scores
highestElevationshighest elevation scores
lowestElevationslowest elevation scores
Returns
true if no more astrometric calibrator scans are needed, otherwise false

Here is the call graph for this function:

Here is the caller graph for this function:

void Scheduler::changeStationAvailability ( const boost::optional< StationEndposition > &  endposition,
StationEndposition::change  change 
)
private

change station availability

Author
Matthias Schartner
Parameters
endpositionrequired endpositions
changechange type

Here is the call graph for this function:

Here is the caller graph for this function:

bool Scheduler::checkAndStatistics ( std::ofstream &  of)
noexcept

checks the schedule with an independend methode

Author
Matthias Schartner
Parameters
ofoutstream file object

Here is the call graph for this function:

Here is the caller graph for this function:

bool Scheduler::checkForNewEvents ( unsigned int  time,
bool  output,
std::ofstream &  of,
bool  tagalong 
)
privatenoexcept

checks if some parameters need to be changed

Author
Matthias Schartner
Parameters
timecurrent time in seconds since start
outputflag if output to log file is required
ofoutstream file object
tagalongschedule tagalong scans
Returns
true if a hard break was found

Here is the call graph for this function:

Here is the caller graph for this function:

bool Scheduler::checkOptimizationConditions ( std::ofstream &  of)
private

check optimization conditions

Author
Matthias Schartner
Parameters
ofoutstream object

Here is the call graph for this function:

Here is the caller graph for this function:

void Scheduler::consideredUpdate ( unsigned long  n1scans,
unsigned long  n2scans,
int  depth,
std::ofstream &  of 
)
noexcept

updates and prints the number of all considered scans

Author
Matthias Schartner
Parameters
n1scansnumber of single source scans
n2scansnumber of subnetting scans
depthrecursion depth
ofoutstream file object

Here is the caller graph for this function:

Subcon Scheduler::createSubcon ( const std::shared_ptr< Subnetting > &  subnetting,
Scan::ScanType  type,
const boost::optional< StationEndposition > &  endposition = boost::none 
)
noexcept

this function creates a subcon with all scans, times and scores

Author
Matthias Schartner
Parameters
subnettingtrue if subnetting is allowed, false otherwise
typescan type
endpositionrequired endposition
Returns
subcon with all information

Here is the call graph for this function:

Here is the caller graph for this function:

const Network& VieVS::Scheduler::getNetwork ( ) const
inlinenoexcept

get station network

Author
Matthias Schartner
Returns
station network
int Scheduler::getNumberOfObservations ( ) const
noexcept

get number of observations scheduled in this observation

Author
Matthias Schartner
Returns
number of observations scheduled in this schedule

Here is the caller graph for this function:

const std::shared_ptr<const ObservingMode>& VieVS::Scheduler::getObservingMode ( ) const
inlinenoexcept

get observing mode network

Author
Matthias Schartner
Returns
observing mode

Here is the call graph for this function:

const std::string& VieVS::Scheduler::getPath ( ) const
inlinenoexcept

get path

Author
Matthias Schartner
Returns
path
const std::vector<Scan>& VieVS::Scheduler::getScans ( ) const
inlinenoexcept

get all scans

Author
Matthias Schartner
Returns
all scans
const SourceList& VieVS::Scheduler::getSourceList ( ) const
inlinenoexcept

get all sources

Author
Matthias Schartner
Returns
all sources
void Scheduler::highImpactScans ( HighImpactScanDescriptor himp,
std::ofstream &  of 
)

schedule high impact scans

Author
Matthias Schartner
Parameters
himphigh impact scan descriptor
ofoutstream object

Here is the call graph for this function:

Here is the caller graph for this function:

void Scheduler::idleToScanTime ( Timestamp  ts,
std::ofstream &  of 
)
private

transform idle time to observing time

Author
Matthias Schartner
Parameters
tstime stamp
ofoutstrem object

Here is the call graph for this function:

Here is the caller graph for this function:

void Scheduler::ignoreTagalongParameter ( )
private

ignore tagalong parameter

Author
Matthias Schartner

Here is the call graph for this function:

Here is the caller graph for this function:

void Scheduler::listSourceOverview ( std::ofstream &  of)
privatenoexcept

output of source overview

Author
Matthias Schartner
Parameters
ofobject

Here is the call graph for this function:

Here is the caller graph for this function:

void Scheduler::resetAllEvents ( std::ofstream &  of,
bool  resetCurrentPointingVector = true 
)
private

reset all events to time zero

Author
Matthias Schartner
Parameters
ofoutstream object
resetCurrentPointingVectorchange the current pointing vector

Here is the call graph for this function:

Here is the caller graph for this function:

void Scheduler::scheduleAPrioriScans ( const boost::property_tree::ptree &  ptree,
std::ofstream &  of 
)
private

add a priori scan

Author
Matthias Schartner
Parameters
ofoutfile stream
ptreeproperty tree including a priori scans

Here is the call graph for this function:

Here is the caller graph for this function:

void Scheduler::sortSchedule ( Timestamp  ts = Timestamp::start)
private

sort schedule

Author
Matthias Schartner
Parameters
tstime stamp

Here is the call graph for this function:

Here is the caller graph for this function:

void Scheduler::sortSchedule ( unsigned long  staid,
Timestamp  ts = Timestamp::start 
)
private

sort schedule based on station

Author
Matthias Schartner
Parameters
staidstation id
tstime stamp
void Scheduler::start ( )
noexcept

main function that starts the scheduling

Author
Matthias Schartner

Here is the call graph for this function:

Here is the caller graph for this function:

void Scheduler::startScanSelection ( unsigned int  endTime,
std::ofstream &  of,
Scan::ScanType  type,
boost::optional< StationEndposition > &  opt_endposition,
boost::optional< Subcon > &  subcon,
int  depth 
)
private

start recursive scan selection

Author
Matthias Schartner
Parameters
endTimeend time of this recursion
ofoutstream object
typescan type
opt_endpositionrequired endposition
subconprecalculated subcon
depthrecursion depth

Here is the call graph for this function:

Here is the caller graph for this function:

void Scheduler::startScanSelectionBetweenScans ( unsigned int  duration,
std::ofstream &  of,
Scan::ScanType  type,
bool  output = false,
bool  ignoreTagalong = false 
)
private

start scan selection between scans

Author
Matthias Schartner

for example fillin mode a posteriori

Parameters
durationduration (deprecated?)
ofoutstream object
typescan type
outputoutput flag
ignoreTagalongignore tagalong modes flag

Here is the call graph for this function:

Here is the caller graph for this function:

void Scheduler::startTagelongMode ( Station station,
SkyCoverage skyCoverage,
std::ofstream &  of 
)
private

start tagalong mode

Author
Matthias Schartner
Parameters
stationtagalong station
skyCoveragesky coverage of tagalong station
ofoutstream object

Here is the call graph for this function:

Here is the caller graph for this function:

void Scheduler::statistics ( std::ofstream &  of)

statistics output

Author
Matthias Schartner
Parameters
ofoutput stream

Here is the caller graph for this function:

void Scheduler::update ( Scan scan,
std::ofstream &  of 
)
noexcept

updates the selected next scans to the schedule

Author
Matthias Schartner
Parameters
scanbest possible next scans
ofoutstream file object

Here is the call graph for this function:

Here is the caller graph for this function:

void Scheduler::updateObservingTimes ( )
private

updates the time of each observation according to the observing times of the station

Author
Matthias Schartner

Here is the caller graph for this function:

void Scheduler::writeCalibratorHeader ( std::ofstream &  of)
private

write astrometric calibrator block header

Author
Matthias Schartner
Parameters
ofoutstream object

Here is the caller graph for this function:

void Scheduler::writeCalibratorStatistics ( std::ofstream &  of,
std::vector< double > &  highestElevations,
std::vector< double > &  lowestElevations 
)
private

write astrometric calibrator statistics

Author
Matthias Schartner
Parameters
ofoutput stream object
highestElevationshighest elevations scheduled so far in astrometric calibrator block
lowestElevationslowest elevations scheduled so far in astrometric calibrator block

Here is the call graph for this function:

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class Output
friend

Member Data Documentation

std::vector<CalibratorBlock> VieVS::Scheduler::calib_
private

calibrator impact scan descriptor

std::shared_ptr<const Mode> VieVS::Scheduler::currentObservingMode_ = nullptr
private

current observing mode

boost::optional<HighImpactScanDescriptor> VieVS::Scheduler::himp_
private

high impact scan descriptor

boost::optional<MultiScheduling::Parameters> VieVS::Scheduler::multiSchedulingParameters_
private

multi scheduling paramters

Network VieVS::Scheduler::network_
private

station network

unsigned long Scheduler::nextId = 0
staticprivate

next id for this object type

unsigned long VieVS::Scheduler::nObservationsConsidered = 0
private

considered baselines

unsigned long VieVS::Scheduler::nSingleScansConsidered = 0
private

considered single source scans

unsigned long VieVS::Scheduler::nSubnettingScansConsidered = 0
private

considered subnetting scans

std::shared_ptr<const ObservingMode> VieVS::Scheduler::obsModes_ = nullptr
private

observing modes

Parameters VieVS::Scheduler::parameters_
private

general scheduling parameters

std::string VieVS::Scheduler::path_
private

path to VieSchedpp.xml directory

PreCalculated VieVS::Scheduler::preCalculated_
private

pre calculated values

std::vector<Scan> VieVS::Scheduler::scans_
private

all scans in schedule

SourceList VieVS::Scheduler::sourceList_
private

session source list

int VieVS::Scheduler::version_
private

version

boost::property_tree::ptree VieVS::Scheduler::xml_
private

content of VieSchedpp.xml file


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