← Documentation
ADS-IDAC Engine 5.0.0
Scheduler Class Reference

#include <Scheduler.h>

Public Member Functions

 Scheduler ()
 Constructs a scheduler in the state set by resetScheduler(). More...
 
virtual ~Scheduler ()
 
void initiationForSimulation (ConsoleMode iMode=ConsoleMode::Console)
 Prepares the RELAP5 bridge and the working directory for a run. Call it after parseOptions(). More...
 
void endSimulation ()
 Does nothing. More...
 
void readInfoFromFile (ConsoleMode iMode=ConsoleMode::Console)
 Line-based alternative to parseOptions(); the engine's entry points do not call it. More...
 
void setProjectDirectory (std::string)
 
void setOutputDirectory (std::string)
 
void setESDirectory (std::string)
 
void setPEDirectory (std::string)
 
void setKPSDirectory (std::string)
 
void setInputDeckFileDirectoryAndName (std::string)
 
int getSolverPort () const
 
void setEOPDirectory (std::string)
 
void setODMDirectory (std::string)
 
void setOATDirectory (std::string)
 
void setOCTDirectory (std::string)
 
void setHardwareReliabilityDirectory (std::string)
 
void setIndicatorsDirectory (std::string)
 
void setSchedulerDirectory (std::string)
 
void setSystemDirectory (std::string)
 
void setSupportSystemsDirectory (std::string)
 
bool checkForTerminatingCurrentSequence ()
 Decides whether the running sequence ends at this evaluation point. More...
 
void setSequenceTruncationProbability (double)
 
void setSequenceTruncationTime (double)
 
double getSequenceTruncationProbability ()
 
double getSequenceTruncationTime ()
 
void setODMActionTimeMultiplier (double)
 
double getODMActionTimeMultiplier ()
 
void setOATActionTimeMultiplier (double)
 
double getOATActionTimeMultiplier ()
 
void setOCTActionTimeMultiplier (double)
 
double getOCTActionTimeMultiplier ()
 
void setSequenceTerminatedByAlarm (bool)
 
bool getSequenceTerminatedByAlarm ()
 
void setSequenceTerminatedByNonResponseAction (bool)
 
bool getSequenceTerminatedByNonResponseAction ()
 
void setInfoOfSequenceTerminatedByAlarm (std::string)
 
std::string getInfoOfSequenceTerminatedByAlarm ()
 
void setInfoSequenceTerminatedByNonResponseAction (std::string)
 
std::string getInfoSequenceTerminatedByNonResponseAction ()
 
void copyScheduler (Scheduler &)
 Copies directories, truncation settings, multipliers, termination flags, file names and mode from another scheduler. The solver port and viz port are not copied. More...
 
void saveSchedulerToFile (std::ofstream &)
 Writes the scheduler to a text restart stream, starting with the label Scheduler. Strings are written unquoted and read back with >>, so paths and termination texts that contain whitespace do not round-trip. More...
 
void retrieveSchedulerFromFile (std::ifstream &)
 Reads the layout written by saveSchedulerToFile. A stream that does not start with the Scheduler label sets r5pars_.sim_err. More...
 
void setFileNameNodeMultiProcessor (std::string)
 
void setFileNameIndeck (std::string)
 
void setFileNameRestart (std::string)
 
void setFileNameES (std::string)
 
std::string getFileNameNodeMultiProcessor ()
 
std::string getFileNameIndeck ()
 
std::string getFileNameRestart ()
 
std::string getFileNameES ()
 
void setMiMode (ConsoleMode)
 
ConsoleMode getMiMode ()
 
void resetScheduler ()
 Resets every member to its default: multipliers 1.0, termination flags off, all directories, file names and termination texts "NONE", truncation probability and time 0.0, mode ConsoleMode::Console. The solver port and viz port are not reset. More...
 
void parseOptions (int argc, char *argv[])
 Parses the command line and ZiniADS.txt, fills this scheduler and g_sim.config, and reads ZCtrlPar.txt. More...
 
int getVizPort () const
 
Directories

parseOptions() makes the project directory absolute and derives the others from it by plain concatenation; every derived directory ends with a '/': output /Output/, ES /Output/ES/, PE /Output/PE/, KPS /Output/KPS/, EOP /Input/Crew/Procedures/, ODM /Input/Crew/DecisionMaker/, OAT /Input/Crew/ActionTaker/, OCT /Input/Crew/Consultant/, hardware reliability /Input/HardwareReliability/, indicators /Input/Indicators/, scheduler /Input/Scheduler/, system /Input/System/, support systems /Input/SupportSystemsReliability/. The scheduler does not create any of them. Under MPI each client rank redirects the output, ES, PE and KPS directories to its own rank directory with the setters. Until parseOptions() or readInfoFromFile() runs every directory is the string "NONE".

std::string getProjectDirectory ()
 
std::string getOutputDirectory ()
 
std::string getESDirectory ()
 
std::string getPEDirectory ()
 
std::string getKPSDirectory ()
 
std::string getInputDeckFileDirectoryAndName ()
 
std::string getEOPDirectory ()
 
std::string getODMDirectory ()
 
std::string getOATDirectory ()
 
std::string getOCTDirectory ()
 
std::string getHardwareReliabilityDirectory ()
 
std::string getIndicatorsDirectory ()
 
std::string getSchedulerDirectory ()
 
std::string getSystemDirectory ()
 
std::string getSupportSystemsDirectory ()
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

ConsoleMode m_iMode
 
std::string project_directory
 
std::string output_directory
 
std::string es_directory
 
std::string pe_directory
 
std::string kps_directory
 
std::string input_deck_file_directory_and_name
 
std::string eop_directory
 
std::string ODM_directory
 
std::string OAT_directory
 
std::string OCT_directory
 
std::string support_systems_directory
 
std::string hardware_reliability_directory
 
std::string indicators_directory
 
std::string scheduler_directory
 
std::string system_directory
 
double sequence_truncation_probabiliy
 
double sequence_truncation_time
 
double OAT_action_time_multiplier
 
double ODM_action_time_multiplier
 
double OCT_action_time_multiplier
 
bool sequence_terminated_by_alarm
 
bool sequence_terminated_by_non_response_action
 
std::string info_of_sequence_terminated_by_alarm
 
std::string info_sequence_terminated_by_non_response_action
 
std::string file_name_NodeMultiProcessor
 
std::string file_name_indeck
 
std::string file_name_restart
 
std::string file_name_ES
 
int solver_port_ = 9090
 
int viz_port_ = 0
 

Friends

class boost::serialization::access
 

Detailed Description

Definition at line 39 of file Scheduler.h.

Constructor & Destructor Documentation

◆ Scheduler()

Scheduler::Scheduler ( )

Constructs a scheduler in the state set by resetScheduler().

Definition at line 52 of file Scheduler.cpp.

References resetScheduler().

Here is the call graph for this function:

◆ ~Scheduler()

Scheduler::~Scheduler ( )
virtual

Definition at line 56 of file Scheduler.cpp.

Member Function Documentation

◆ checkForTerminatingCurrentSequence()

bool Scheduler::checkForTerminatingCurrentSequence ( )

Decides whether the running sequence ends at this evaluation point.

Returns
true when the sequence must stop.

The checks run in this order and the first that applies wins:

  1. r5pars_.csnostop is already nonzero (an end state exists): stop, nothing added.
  2. The recent unconditional branch probability is below the truncation probability: end state Consequence::ProbTruncated, csnostop 4.
  3. The simulation time is above the truncation time: Consequence::TimeTruncated, csnostop 4.
  4. An alarm requested termination (setSequenceTerminatedByAlarm): end state Consequence::EndseqAlarm with the stored text, csnostop 5; the flag is cleared.
  5. A non-response action requested termination: Consequence::NonResponseAction with the stored text, csnostop 5; the flag is cleared.
  6. r5pars_.sim_err is set: end state with the consequence and message held by BranchRecord (getTempTypeOfConsequence, getTempESMessage), csnostop 6.

Each new end state is added through BranchRecord::addAnEndState(). Every stopping case sets g_sim.expected_abort. Cases 2 to 5 also display the text and add it to the analysis record.

Definition at line 694 of file Scheduler.cpp.

References BranchRecord::addAnEndState(), AnalysisInfoContainer::addRecord(), SimulationContext::Aux_info, SimulationContext::Branch_center, SimulationContext::Command_handler, CommandControlCenter::displayInformation(), EndseqAlarm, SimulationContext::expected_abort, g_sim, BranchRecord::getIDOfMotherBranch(), BranchRecord::getRecentUnconditionalBranchProbability(), BranchRecord::getTempESMessage(), BranchRecord::getTempTypeOfConsequence(), info_of_sequence_terminated_by_alarm, info_sequence_terminated_by_non_response_action, NonResponseAction, ProbTruncated, r5pars_, sequence_terminated_by_alarm, sequence_terminated_by_non_response_action, sequence_truncation_probabiliy, sequence_truncation_time, BranchEndState::setConsequenceDescription(), BranchEndState::setTypeOfConsequence(), and TimeTruncated.

Referenced by AdsidacCallback::onEvaluationPoint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ copyScheduler()

void Scheduler::copyScheduler ( Scheduler &  _ss)

Copies directories, truncation settings, multipliers, termination flags, file names and mode from another scheduler. The solver port and viz port are not copied.

Definition at line 911 of file Scheduler.cpp.

References eop_directory, es_directory, file_name_ES, file_name_indeck, file_name_NodeMultiProcessor, file_name_restart, getEOPDirectory(), getESDirectory(), getFileNameES(), getFileNameIndeck(), getFileNameNodeMultiProcessor(), getFileNameRestart(), getHardwareReliabilityDirectory(), getIndicatorsDirectory(), getInfoOfSequenceTerminatedByAlarm(), getInfoSequenceTerminatedByNonResponseAction(), getInputDeckFileDirectoryAndName(), getKPSDirectory(), getMiMode(), getOATActionTimeMultiplier(), getOATDirectory(), getOCTActionTimeMultiplier(), getOCTDirectory(), getODMActionTimeMultiplier(), getODMDirectory(), getOutputDirectory(), getPEDirectory(), getProjectDirectory(), getSchedulerDirectory(), getSequenceTerminatedByAlarm(), getSequenceTerminatedByNonResponseAction(), getSequenceTruncationProbability(), getSequenceTruncationTime(), getSupportSystemsDirectory(), getSystemDirectory(), hardware_reliability_directory, indicators_directory, info_of_sequence_terminated_by_alarm, info_sequence_terminated_by_non_response_action, input_deck_file_directory_and_name, kps_directory, m_iMode, OAT_action_time_multiplier, OAT_directory, OCT_action_time_multiplier, OCT_directory, ODM_action_time_multiplier, ODM_directory, output_directory, pe_directory, project_directory, scheduler_directory, sequence_terminated_by_alarm, sequence_terminated_by_non_response_action, sequence_truncation_probabiliy, sequence_truncation_time, support_systems_directory, and system_directory.

Here is the call graph for this function:

◆ endSimulation()

void Scheduler::endSimulation ( )

Does nothing.

Definition at line 469 of file Scheduler.cpp.

◆ getEOPDirectory()

string Scheduler::getEOPDirectory ( )

Definition at line 616 of file Scheduler.cpp.

References eop_directory.

Referenced by copyScheduler(), BranchMentalProcedureActivationTime::readInfoFromFile(), BranchProcedureAtionTime::readInfoFromFile(), BranchProcedureControlValue::readInfoFromFile(), Procedures::readInfoFromFile(), and ProcedureStep::readInfoFromFile().

Here is the caller graph for this function:

◆ getESDirectory()

string Scheduler::getESDirectory ( )

Definition at line 601 of file Scheduler.cpp.

References es_directory.

Referenced by BranchRecord::appendEndStateSummary(), copyScheduler(), BranchRecord::endSimulation(), initiationForSimulation(), Server::merge_outputs(), save_sequence_outputs(), BranchEndState::saveInfoToFile(), and AnalysisInfoContainer::saveInfoToFile().

Here is the caller graph for this function:

◆ getFileNameES()

string Scheduler::getFileNameES ( )

Definition at line 966 of file Scheduler.cpp.

References file_name_ES.

Referenced by copyScheduler().

Here is the caller graph for this function:

◆ getFileNameIndeck()

string Scheduler::getFileNameIndeck ( )

Definition at line 960 of file Scheduler.cpp.

References file_name_indeck.

Referenced by copyScheduler().

Here is the caller graph for this function:

◆ getFileNameNodeMultiProcessor()

string Scheduler::getFileNameNodeMultiProcessor ( )

Definition at line 957 of file Scheduler.cpp.

References file_name_NodeMultiProcessor.

Referenced by copyScheduler().

Here is the caller graph for this function:

◆ getFileNameRestart()

string Scheduler::getFileNameRestart ( )

Definition at line 963 of file Scheduler.cpp.

References file_name_restart.

Referenced by copyScheduler().

Here is the caller graph for this function:

◆ getHardwareReliabilityDirectory()

string Scheduler::getHardwareReliabilityDirectory ( )

Definition at line 628 of file Scheduler.cpp.

References hardware_reliability_directory.

Referenced by copyScheduler(), and HWReliabilityModule::readInfoFromFile().

Here is the caller graph for this function:

◆ getIndicatorsDirectory()

string Scheduler::getIndicatorsDirectory ( )

Definition at line 631 of file Scheduler.cpp.

References indicators_directory.

Referenced by copyScheduler(), and ControlPanel::readInfoFromFile().

Here is the caller graph for this function:

◆ getInfoOfSequenceTerminatedByAlarm()

string Scheduler::getInfoOfSequenceTerminatedByAlarm ( )

Definition at line 824 of file Scheduler.cpp.

References info_of_sequence_terminated_by_alarm.

Referenced by copyScheduler().

Here is the caller graph for this function:

◆ getInfoSequenceTerminatedByNonResponseAction()

string Scheduler::getInfoSequenceTerminatedByNonResponseAction ( )

Definition at line 830 of file Scheduler.cpp.

References info_sequence_terminated_by_non_response_action.

Referenced by copyScheduler().

Here is the caller graph for this function:

◆ getInputDeckFileDirectoryAndName()

string Scheduler::getInputDeckFileDirectoryAndName ( )

Definition at line 610 of file Scheduler.cpp.

References input_deck_file_directory_and_name.

Referenced by copyScheduler().

Here is the caller graph for this function:

◆ getKPSDirectory()

string Scheduler::getKPSDirectory ( )

Definition at line 607 of file Scheduler.cpp.

References kps_directory.

Referenced by copyScheduler(), Server::merge_outputs(), KeyParameterHistory::outputHistoryToFile(), and save_sequence_outputs().

Here is the caller graph for this function:

◆ getMiMode()

ConsoleMode Scheduler::getMiMode ( )

Definition at line 1003 of file Scheduler.cpp.

References m_iMode.

Referenced by copyScheduler().

Here is the caller graph for this function:

◆ getOATActionTimeMultiplier()

double Scheduler::getOATActionTimeMultiplier ( )

Definition at line 798 of file Scheduler.cpp.

References OAT_action_time_multiplier.

Referenced by copyScheduler(), and BranchProbability::sendBranchInfoToCommandCenter().

Here is the caller graph for this function:

◆ getOATDirectory()

◆ getOCTActionTimeMultiplier()

double Scheduler::getOCTActionTimeMultiplier ( )

Definition at line 804 of file Scheduler.cpp.

References OCT_action_time_multiplier.

Referenced by copyScheduler(), and BranchProbability::sendBranchInfoToCommandCenter().

Here is the caller graph for this function:

◆ getOCTDirectory()

string Scheduler::getOCTDirectory ( )

Definition at line 625 of file Scheduler.cpp.

References OCT_directory.

Referenced by copyScheduler(), Operator::initiationForSimulation(), KB::readHardWiredDiagnosis(), KB::readIndicatorBiasFactors(), ManeuverAction::readInfoFromFile(), and KB::readSystemDecompositionKB().

Here is the caller graph for this function:

◆ getODMActionTimeMultiplier()

double Scheduler::getODMActionTimeMultiplier ( )

Definition at line 792 of file Scheduler.cpp.

References ODM_action_time_multiplier.

Referenced by copyScheduler(), and BranchProbability::sendBranchInfoToCommandCenter().

Here is the caller graph for this function:

◆ getODMDirectory()

◆ getOutputDirectory()

string Scheduler::getOutputDirectory ( )

Definition at line 598 of file Scheduler.cpp.

References output_directory.

Referenced by copyScheduler(), Server::merge_outputs(), ReasonMachine::PrintKnowledgeWeb(), ReasonMachine::PrintSemanticBase(), and ReasonMachine::SaveSequenceInfoToFile().

Here is the caller graph for this function:

◆ getPEDirectory()

string Scheduler::getPEDirectory ( )

Definition at line 604 of file Scheduler.cpp.

References pe_directory.

Referenced by copyScheduler(), Server::dispatch_resume_tasks(), main(), Server::merge_outputs(), and BranchCluster::savePENodeToFile().

Here is the caller graph for this function:

◆ getProjectDirectory()

string Scheduler::getProjectDirectory ( )

Definition at line 595 of file Scheduler.cpp.

References project_directory.

Referenced by copyScheduler(), initiationForSimulation(), main(), AdsidacCallback::onBranchingPoint(), CalculationAid::readInfoFromFile(), restart_base_path(), RelapSolver::restore(), run_merge_only(), Client::self_merge_outputs(), and Server::Simulation().

Here is the caller graph for this function:

◆ getSchedulerDirectory()

string Scheduler::getSchedulerDirectory ( )

Definition at line 634 of file Scheduler.cpp.

References scheduler_directory.

Referenced by copyScheduler().

Here is the caller graph for this function:

◆ getSequenceTerminatedByAlarm()

bool Scheduler::getSequenceTerminatedByAlarm ( )

Definition at line 811 of file Scheduler.cpp.

References sequence_terminated_by_alarm.

Referenced by copyScheduler().

Here is the caller graph for this function:

◆ getSequenceTerminatedByNonResponseAction()

bool Scheduler::getSequenceTerminatedByNonResponseAction ( )

Definition at line 817 of file Scheduler.cpp.

References sequence_terminated_by_non_response_action.

Referenced by copyScheduler().

Here is the caller graph for this function:

◆ getSequenceTruncationProbability()

double Scheduler::getSequenceTruncationProbability ( )

Definition at line 643 of file Scheduler.cpp.

References sequence_truncation_probabiliy.

Referenced by copyScheduler().

Here is the caller graph for this function:

◆ getSequenceTruncationTime()

double Scheduler::getSequenceTruncationTime ( )

Definition at line 646 of file Scheduler.cpp.

References sequence_truncation_time.

Referenced by copyScheduler(), and main().

Here is the caller graph for this function:

◆ getSolverPort()

int Scheduler::getSolverPort ( ) const
Returns
Mock solver port (--solver-port, default 9090).

Definition at line 613 of file Scheduler.cpp.

References solver_port_.

◆ getSupportSystemsDirectory()

string Scheduler::getSupportSystemsDirectory ( )

Definition at line 640 of file Scheduler.cpp.

References support_systems_directory.

Referenced by copyScheduler().

Here is the caller graph for this function:

◆ getSystemDirectory()

string Scheduler::getSystemDirectory ( )

Definition at line 637 of file Scheduler.cpp.

References system_directory.

Referenced by copyScheduler(), InitiatingEventController::readInfoFromFile(), and SystemModule::readInfoFromFile().

Here is the caller graph for this function:

◆ getVizPort()

int Scheduler::getVizPort ( ) const
inline
Returns
Port of the DET visualization server (--viz-port), 0 when disabled.

Definition at line 227 of file Scheduler.h.

References viz_port_.

◆ initiationForSimulation()

void Scheduler::initiationForSimulation ( ConsoleMode  iMode = ConsoleMode::Console)

Prepares the RELAP5 bridge and the working directory for a run. Call it after parseOptions().

Parameters
iModeSimulation mode; stored and copied to r5pars_.tsimmode.

Resets the r5pars_ control flags (first-scenario flag on, no branch generation, no stop, time -2.0, British units) and the argument strings "-i", "-o", "-r". In console mode it also sets the RELAP5 arguments: program name "relap5", output file "out.o", the input deck path, and the restart file ("restart.r", or <shm_prefix>restart.r with in-memory restart). The process exits with a FATAL message when the restart path or the input deck path is longer than 80 characters (the RELAP5 filename limit) or when the input deck cannot be opened.

It then deletes stale files: Scenario info.txt, Procedure data.txt and Scan data.txt in the ES directory, and out.o, restart.r, dbg info.txt, Scenario info.txt, Procedure data.txt in the current working directory (err messages.txt too in console and net server mode). Finally it computes the configuration fingerprint over the project inputs and the input deck, stores it in g_sim.config_fingerprint and prints it as [CONFIG] fingerprint=0x....

Definition at line 364 of file Scheduler.cpp.

References adsidac::compute_config_fingerprint(), SimulationContext::config, SimulationContext::config_fingerprint, Console, es_directory, g_sim, getESDirectory(), getProjectDirectory(), input_deck_file_directory_and_name, m_iMode, SimConfig::memory_restart, NetServer, r5pars_, and SimConfig::shm_prefix.

Referenced by Client::Client(), main(), and Server::Server().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseOptions()

void Scheduler::parseOptions ( int  argc,
char *  argv[] 
)

Parses the command line and ZiniADS.txt, fills this scheduler and g_sim.config, and reads ZCtrlPar.txt.

Parameters
argcArgument count as passed to main().
argvArgument vector as passed to main().

Sources and precedence: the command line is stored first, then ZiniADS.txt from the current working directory (if it exists) is parsed as a Boost config file (key=value, keys are the long option names). A value given on the command line wins over the file. --project-dir and --input-deck are required from one of the two sources. --help, --version and --info print and call exit(0) before the required options are checked. An unknown option or a missing required option prints an error and calls exit(1).

Effects:

  • Project directory and input deck path are made absolute against the current working directory; the sub-directories listed under "Directories" are derived.
  • Solver: --solver=relap|0 leaves g_sim.config.solver_url empty (RELAP5) and rejects --solver-url; --solver=mock|1 sets the URL to --solver-url or to http://localhost:<--solver-port>. Because --solver defaults to relap, --solver-url alone is an error.
  • Restart: --no-memory-restart turns in-memory restart off; it cannot be combined with an explicit --memory-limit above 0. With in-memory restart the shared memory prefix is /dev/shm/adsidac_<pid>_ when /dev/shm exists, otherwise <temp dir>/adsidac_<pid>_.
  • --no-thermo-cache, --compress-queue, --aggregate-pe, --enable-rm-cycle, --occupancy-log, --truncation-time are copied to g_sim.config.
  • --viz-outputs (events, es, all; comma separated) requires --viz-port.
  • --notify-ntfy without a value uses a topic generated from the host name.
  • Checkpoint: --checkpoint-dir and --resume are made absolute against the launch directory; --checkpoint-interval requires --checkpoint-dir; --checkpoint-stop requires --checkpoint-interval; the checkpoint directory is created.
  • Merge: --merge is now (0), serial (1) or defer (2); --merge-only cannot be combined with --resume or checkpointing; --resume is refused while <project>/Output/MERGE_PENDING.txt exists.
  • In console and net server mode, <project>/Input/Scheduler/ZCtrlPar.txt supplies the truncation probability and truncation time (third and fifth token). A missing file sets r5pars_.terminateall and returns; a file that cannot be parsed is fatal (exit(1)). A --truncation-time above 0 then replaces the time from the file.

Every validation failure prints an ERROR line and calls exit(1). The function does not create or clean the output directories.

Definition at line 59 of file Scheduler.cpp.

References SimConfig::aggregate_pe_output, auto_ntfy_topic(), SimConfig::checkpoint_dir, SimConfig::checkpoint_interval, SimConfig::checkpoint_stop, SimConfig::compress_queue, SimulationContext::config, Console, e, eop_directory, es_directory, g_sim, hardware_reliability_directory, indicators_directory, input_deck_file_directory_and_name, kps_directory, m_iMode, SimConfig::memory_limit_mb, SimConfig::memory_restart, SimConfig::merge_mode, SimConfig::merge_only, SimConfig::merge_threads, NetServer, notify_discord_webhook, notify_ntfy_topic, OAT_directory, SimConfig::occupancy_log, OCT_directory, ODM_directory, output_directory, pe_directory, project_directory, r5pars_, SimConfig::resume_file, SimConfig::rm_cycle_enabled, scheduler_directory, sequence_truncation_probabiliy, sequence_truncation_time, SimConfig::shm_prefix, solver_port_, SimConfig::solver_url, support_systems_directory, system_directory, SimConfig::thermo_cache_mode, SimConfig::truncation_time_override, SimConfig::viz_output_end_states, SimConfig::viz_output_events, and viz_port_.

Referenced by main(), and run_merge_only().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readInfoFromFile()

void Scheduler::readInfoFromFile ( ConsoleMode  iMode = ConsoleMode::Console)

Line-based alternative to parseOptions(); the engine's entry points do not call it.

In console and net server mode it reads ZiniADS.txt from the current working directory as four lines (a label line, the project directory, a label line, the input deck path), derives the same sub-directories as parseOptions() and reads ZCtrlPar.txt. It reads no command-line option and sets nothing in g_sim.config. A missing file sets r5pars_.terminateall.

< read in "project-dir"

< read in "input-deck"

Definition at line 471 of file Scheduler.cpp.

References Console, eop_directory, es_directory, hardware_reliability_directory, indicators_directory, input_deck_file_directory_and_name, kps_directory, m_iMode, NetServer, OAT_directory, OCT_directory, ODM_directory, output_directory, pe_directory, project_directory, r5pars_, scheduler_directory, sequence_truncation_probabiliy, sequence_truncation_time, support_systems_directory, and system_directory.

◆ resetScheduler()

void Scheduler::resetScheduler ( )

Resets every member to its default: multipliers 1.0, termination flags off, all directories, file names and termination texts "NONE", truncation probability and time 0.0, mode ConsoleMode::Console. The solver port and viz port are not reset.

Definition at line 969 of file Scheduler.cpp.

References Console, eop_directory, es_directory, file_name_ES, file_name_indeck, file_name_NodeMultiProcessor, file_name_restart, hardware_reliability_directory, indicators_directory, info_of_sequence_terminated_by_alarm, info_sequence_terminated_by_non_response_action, input_deck_file_directory_and_name, kps_directory, m_iMode, OAT_action_time_multiplier, OAT_directory, OCT_action_time_multiplier, OCT_directory, ODM_action_time_multiplier, ODM_directory, output_directory, pe_directory, project_directory, scheduler_directory, sequence_terminated_by_alarm, sequence_terminated_by_non_response_action, sequence_truncation_probabiliy, sequence_truncation_time, support_systems_directory, and system_directory.

Referenced by Scheduler().

Here is the caller graph for this function:

◆ retrieveSchedulerFromFile()

◆ saveSchedulerToFile()

◆ serialize()

◆ setEOPDirectory()

void Scheduler::setEOPDirectory ( std::string  )

Definition at line 667 of file Scheduler.cpp.

References eop_directory.

◆ setESDirectory()

void Scheduler::setESDirectory ( std::string  )

Definition at line 655 of file Scheduler.cpp.

References es_directory.

Referenced by Client::Client().

Here is the caller graph for this function:

◆ setFileNameES()

void Scheduler::setFileNameES ( std::string  )

Definition at line 954 of file Scheduler.cpp.

References file_name_ES.

Referenced by BranchEndState::saveInfoToFile().

Here is the caller graph for this function:

◆ setFileNameIndeck()

void Scheduler::setFileNameIndeck ( std::string  )

Definition at line 948 of file Scheduler.cpp.

References file_name_indeck.

◆ setFileNameNodeMultiProcessor()

void Scheduler::setFileNameNodeMultiProcessor ( std::string  )

Definition at line 945 of file Scheduler.cpp.

References file_name_NodeMultiProcessor.

◆ setFileNameRestart()

void Scheduler::setFileNameRestart ( std::string  )

Definition at line 951 of file Scheduler.cpp.

References file_name_restart.

◆ setHardwareReliabilityDirectory()

void Scheduler::setHardwareReliabilityDirectory ( std::string  )

Definition at line 679 of file Scheduler.cpp.

References hardware_reliability_directory.

◆ setIndicatorsDirectory()

void Scheduler::setIndicatorsDirectory ( std::string  )

Definition at line 682 of file Scheduler.cpp.

References indicators_directory.

◆ setInfoOfSequenceTerminatedByAlarm()

void Scheduler::setInfoOfSequenceTerminatedByAlarm ( std::string  )

Definition at line 821 of file Scheduler.cpp.

References info_of_sequence_terminated_by_alarm.

Referenced by ControlPanel::checkForNewAlarms().

Here is the caller graph for this function:

◆ setInfoSequenceTerminatedByNonResponseAction()

void Scheduler::setInfoSequenceTerminatedByNonResponseAction ( std::string  )

Definition at line 827 of file Scheduler.cpp.

References info_sequence_terminated_by_non_response_action.

Referenced by ProcedureStep::oneThroughProcessForProcedureStep().

Here is the caller graph for this function:

◆ setInputDeckFileDirectoryAndName()

void Scheduler::setInputDeckFileDirectoryAndName ( std::string  )

Definition at line 664 of file Scheduler.cpp.

References input_deck_file_directory_and_name.

◆ setKPSDirectory()

void Scheduler::setKPSDirectory ( std::string  )

Definition at line 661 of file Scheduler.cpp.

References kps_directory.

Referenced by Client::Client().

Here is the caller graph for this function:

◆ setMiMode()

void Scheduler::setMiMode ( ConsoleMode  n)

Definition at line 1000 of file Scheduler.cpp.

References m_iMode.

◆ setOATActionTimeMultiplier()

void Scheduler::setOATActionTimeMultiplier ( double  x)

Definition at line 795 of file Scheduler.cpp.

References OAT_action_time_multiplier.

Referenced by Operator::initiationForSimulation().

Here is the caller graph for this function:

◆ setOATDirectory()

void Scheduler::setOATDirectory ( std::string  )

Definition at line 673 of file Scheduler.cpp.

References OAT_directory.

◆ setOCTActionTimeMultiplier()

void Scheduler::setOCTActionTimeMultiplier ( double  x)

Definition at line 801 of file Scheduler.cpp.

References OCT_action_time_multiplier.

Referenced by Operator::initiationForSimulation().

Here is the caller graph for this function:

◆ setOCTDirectory()

void Scheduler::setOCTDirectory ( std::string  )

Definition at line 676 of file Scheduler.cpp.

References OCT_directory.

◆ setODMActionTimeMultiplier()

void Scheduler::setODMActionTimeMultiplier ( double  x)

Definition at line 789 of file Scheduler.cpp.

References ODM_action_time_multiplier.

Referenced by Operator::initiationForSimulation().

Here is the caller graph for this function:

◆ setODMDirectory()

void Scheduler::setODMDirectory ( std::string  )

Definition at line 670 of file Scheduler.cpp.

References ODM_directory.

◆ setOutputDirectory()

void Scheduler::setOutputDirectory ( std::string  )

Definition at line 652 of file Scheduler.cpp.

References output_directory.

Referenced by Client::Client().

Here is the caller graph for this function:

◆ setPEDirectory()

void Scheduler::setPEDirectory ( std::string  )

Definition at line 658 of file Scheduler.cpp.

References pe_directory.

Referenced by Client::Client().

Here is the caller graph for this function:

◆ setProjectDirectory()

void Scheduler::setProjectDirectory ( std::string  )

Definition at line 649 of file Scheduler.cpp.

References project_directory.

◆ setSchedulerDirectory()

void Scheduler::setSchedulerDirectory ( std::string  )

Definition at line 685 of file Scheduler.cpp.

References scheduler_directory.

◆ setSequenceTerminatedByAlarm()

void Scheduler::setSequenceTerminatedByAlarm ( bool  bg)

Definition at line 808 of file Scheduler.cpp.

References sequence_terminated_by_alarm.

Referenced by ControlPanel::checkForNewAlarms().

Here is the caller graph for this function:

◆ setSequenceTerminatedByNonResponseAction()

void Scheduler::setSequenceTerminatedByNonResponseAction ( bool  bg)

Definition at line 814 of file Scheduler.cpp.

References sequence_terminated_by_non_response_action.

Referenced by ProcedureStep::oneThroughProcessForProcedureStep().

Here is the caller graph for this function:

◆ setSequenceTruncationProbability()

void Scheduler::setSequenceTruncationProbability ( double  )

◆ setSequenceTruncationTime()

void Scheduler::setSequenceTruncationTime ( double  )

◆ setSupportSystemsDirectory()

void Scheduler::setSupportSystemsDirectory ( std::string  )

Definition at line 691 of file Scheduler.cpp.

References support_systems_directory.

◆ setSystemDirectory()

void Scheduler::setSystemDirectory ( std::string  )

Definition at line 688 of file Scheduler.cpp.

References system_directory.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 250 of file Scheduler.h.

Member Data Documentation

◆ eop_directory

◆ es_directory

◆ file_name_ES

std::string Scheduler::file_name_ES
private

◆ file_name_indeck

std::string Scheduler::file_name_indeck
private

◆ file_name_NodeMultiProcessor

std::string Scheduler::file_name_NodeMultiProcessor
private

◆ file_name_restart

std::string Scheduler::file_name_restart
private

◆ hardware_reliability_directory

◆ indicators_directory

◆ info_of_sequence_terminated_by_alarm

◆ info_sequence_terminated_by_non_response_action

◆ input_deck_file_directory_and_name

◆ kps_directory

◆ m_iMode

◆ OAT_action_time_multiplier

double Scheduler::OAT_action_time_multiplier
private

◆ OAT_directory

◆ OCT_action_time_multiplier

double Scheduler::OCT_action_time_multiplier
private

◆ OCT_directory

◆ ODM_action_time_multiplier

double Scheduler::ODM_action_time_multiplier
private

◆ ODM_directory

◆ output_directory

◆ pe_directory

◆ project_directory

◆ scheduler_directory

◆ sequence_terminated_by_alarm

◆ sequence_terminated_by_non_response_action

◆ sequence_truncation_probabiliy

◆ sequence_truncation_time

◆ solver_port_

int Scheduler::solver_port_ = 9090
private

Definition at line 247 of file Scheduler.h.

Referenced by getSolverPort(), and parseOptions().

◆ support_systems_directory

◆ system_directory

◆ viz_port_

int Scheduler::viz_port_ = 0
private

Definition at line 248 of file Scheduler.h.

Referenced by getVizPort(), and parseOptions().


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