PyMacroToolPlugin.DetectorLocation

class DetectorLocation

The DetectorLocation class

Inheritance diagram of PyMacroToolPlugin.DetectorLocation

Synopsis

Methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

class DetectorLocationStatus
__init__()
addExistingDetectorToConsider(detector)
Parameters:

detectorGKDetector

Adds an existing detector as a valid detector wanted to be taken into account when executing the detection layout algorithm

addSectionAsCandidate(section, percentage)
Parameters:
  • sectionGKSection

  • percentage – float

Adds a section as selected by the detection layout algorithm to locate a detector on

addSectionToAvoid(section)
Parameters:

sectionGKSection

Adds a section that cannot be selected as candidate to locate a detector on, when executing the detection layout algorithm

addSectionWithDetectorCreated(section)
Parameters:

sectionGKSection

Adds a section as one where a detector has been created after calculating the detection layout

calculateDetectorLocation()
Return type:

bool

clearCandidateSections()

Clears the list of sections selected by the detection layout algorithm to locate a detector on

clearExistingDetectorsToConsider()

Clears the list of detectors to consider

clearSectionsToAvoid()

Clears the list of sections to avoid

clearSectionsWithDetectorCreated()

Clears the list of sections where detectors have been created after calculating the detection layout

getCandidateSections()
Return type:

.list of std.pairGKSection,double

Gets the list of sections selected by the detection layout algorithm to locate a detector on

getDetectorLocationStatus()
Return type:

DetectorLocationStatus

getErrorMessage()
Return type:

str

getExistingDetectorsToConsider()
Return type:

.list of GKDetector

Gets all the existing detectors considered as a valid detector wanted to be taken into account when executing the detection layout algorithm

getExperiment()
Return type:

MacroExperiment

Gets the MacroExperiment where the flows and paths data have been taken from

getMaximumNumberOfDetectorsToCreate()
Return type:

int

Gets the maximum number of detectors that are wanted to be created after executing the detection layout algorithm. If undefined or no limit set then a -1 will be returned

getPercentageOfTripsAchievedWithExistingDetectorsToConsider()
Return type:

float

Gets the percentage of trips covered just with the existing detectors marked as to be considered after executing the detection layout algorithm

getPercentageOfTripsToAchieve()
Return type:

float

Gets the maximum percentage of trips wanted to be covered when executing the detection layout algorithm. If undefined or no percentage set then a -1.0 will be returned. If set a value from 0.0 to 100.0 will be returned

getSectionsToAvoid()
Return type:

.list of GKSection

Gets the list of sections that cannot be selected as candidates to locate a detector on, when executing the detection layout algorithm

getSectionsWithDetectorCreated()
Return type:

.list of GKSection

Gets the list of sections where detectors have been created after calculating the detection layout

setExperiment(exp)
Parameters:

expMacroExperiment

Sets the MacroExperiment where the flows and paths data will be taken from

setMaximumNumberOfDetectorsToCreate(maxNbDetectors)
Parameters:

maxNbDetectors – int

Sets the maximum number of detectors that are wanted to be created after executing the detection layout algorithm. If no limit wants to be set then a -1 can be used.

setPercentageOfTripsToAchieve(percentage)
Parameters:

percentage – float

Sets the maximum percentage of trips [0.0, 100.0] wanted to be covered when executing the detection layout algorithm. If no percentage wants to be set then a -1.0 can be used.