1 #ifndef CYCLUS_SRC_XML_FILE_LOADER_H_ 2 #define CYCLUS_SRC_XML_FILE_LOADER_H_ 7 #include <boost/shared_ptr.hpp> 124 #endif // CYCLUS_SRC_XML_FILE_LOADER_H_ XMLFileLoader(Recorder *r, QueryableBackend *b, std::string schema_file, const std::string input_file="", const std::string format="none", bool ms_print=false)
Create a new loader reading from the xml simulation input file and writing to and initializing the ba...
virtual std::string master_schema()
std::string BuildMasterSchema(std::string schema_path, std::string infile, std::string format)
Builds and returns a master cyclus input xml schema that includes the sub-schemas defined by all inst...
boost::shared_ptr< XMLParser > parser_
the parser
boost::shared_ptr< Composition > Ptr
std::string schema_path_
filepath to the schema
double b(int nuc)
Computes the scattering length [cm] from the coherent and incoherent components.
std::string file_
the input file name
void LoadRawStringstreamFromFile(std::stringstream &stream, std::string file)
Reads the given file path into the passed stream without modification.
void LoadRecipes()
Method to load recipes from either the primary input file or a recipeBook catalog.
virtual void LoadInitialAgents()
Creates all initial agent instances from the input file.
void LoadRecipe(InfileTree *qe)
loads a specific recipe
Agent * BuildAgent(std::string proto, Agent *parent)
Creates and builds an agent, notifying its parent.
A class for extracting information from a given XML parser.
std::string format_
the input file format
void LoadControlParams()
Method to load the simulation control parameters.
Handles initialization of a database with information from a cyclus xml input file.
int parent(int nuc, unsigned int rx, std::string z="n")
std::map< std::string, AgentSpec > specs_
Composition::Ptr ReadRecipe(InfileTree *qe)
Creates a composition from the recipe in the query engine.
bool ms_print_
flag to indicate printing master schema
Collects and manages output data generation for the cyclus core and agents during a simulation...
A simulation context provides access to necessary simulation-global functions and state...
The abstract base class used by all types of agents that live and interact in a simulation.
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or.org/Osi/browser/trunk.
void LoadSolver()
Method to load the simulation exchange solver.
std::vector< AgentSpec > ParseSpecs(std::string infile, std::string format)
Returns a list of the full module+agent spec for all agents in the given input file.
void ProcessCommodities(std::map< std::string, double > *commodity_priority)
Processes commodity priorities, such that any without a defined priority (i.e., are nonpositive)...
void LoadStringstreamFromFile(std::stringstream &stream, std::string file, std::string format)
Reads the given file path as XML into the passed stream.
virtual void LoadSim()
Load an entire simulation from the inputfile.
std::string LoadStringFromFile(std::string file, std::string format)
Reads the given file path and returns an XML string.
void LoadSpecs()
Load agent specs from the input file to a map by alias.
Interface implemented by backends that support rudimentary querying.
Controls simulation timestepping and inter-timestep phases.