MicroModelicaCCompiler  4.5.3
MicroModelica::IR Namespace Reference

Namespaces

 EQUATION
 
 EVENT
 
 FUNCTION_PRINTER
 
 INDEX
 
 MATRIX
 
 RANGE
 
 STATEMENT
 

Classes

class  AlgebraicPrinter
 
class  AnnotationValue
 
class  BuiltInFunction
 
class  Class
 
class  ClassicPrinter
 
struct  CompDef
 
class  CompiledFunction
 
class  CompiledPackage
 
struct  DefAlgDepsUse
 
struct  DepCode
 
struct  DepData
 
class  DependencyPrinter
 
class  DerivativePrinter
 
class  Equation
 
class  EquationDefOrder
 
class  EquationDerivator
 
class  EquationPrinter
 
class  EquationVariable
 
class  EvalAnnotation
 
class  Event
 
class  Expression
 
class  ExpressionDerivator
 
class  ExternalFunction
 
class  Function
 
class  FunctionAnnotation
 
class  FunctionPrinter
 
class  Index
 
class  IndexDefinition
 
class  Input
 
struct  JacDef
 
class  JacGenerator
 
class  Jacobian
 
struct  MatrixCode
 
class  MicroModelicaIR
 
class  Model
 
class  ModelAnnotation
 
class  ModelChecker
 
class  ModelMatrix
 
struct  ModelMatrixDef
 
class  ModelMatrixGenerator
 
class  OutputPrinter
 
class  Package
 
struct  PrintedDep
 
class  QSSModel
 
struct  QSSModelConfig
 
struct  QSSModelDef
 
class  QSSModelDeps
 
struct  QSSModelDepsDef
 
class  QSSModelDepsGenerator
 
class  QSSModelGenerator
 
class  Range
 
class  RangeDefinition
 
class  ReductionFunctions
 
class  Settings
 
class  Statement
 
class  StoredDefinition
 
class  UserDefMatrix
 
class  VariableUsage
 
class  ZeroCrossingPrinter
 

Typedefs

using AnnotationType = boost::variant< ModelAnnotation, FunctionAnnotation >
 
typedef ModelTable< std::string, FunctionFunctionTable
 
typedef boost::variant< Function, Package, ModelClassType
 
typedef ClassClassPtr
 
typedef set< DefAlgDepsUse, CompDefAlgDeps
 
typedef std::map< int, AlgDepsAlgDepsMap
 
typedef list< PrintedDepPrintedDeps
 
typedef list< DepDataDepsData
 
typedef std::map< std::string, DepsDataDepsMap
 
typedef std::map< int, std::list< Equation > > OrderedEquations
 
typedef std::map< EquationDefOrder, EquationEquationOrderMap
 
typedef ModelTable< int, EquationEquationTable
 
typedef ModelTable< int, EventEventTable
 
typedef list< ExpressionExpressionList
 
typedef ModelTable< int, ExternalFunctionExternalFunctionTable
 
typedef ModelTable< std::string, CompiledFunctionCompiledFunctionTable
 
typedef ModelTable< std::string, CompiledPackageCompiledPackageTable
 
typedef ModelTable< int, InputInputTable
 
typedef ModelTable< std::string, IndexIndexTable
 
typedef vector< int > Usage
 
typedef ModelTable< std::string, RangeDefinitionRangeDefinitionTable
 
typedef ModelMatrix< Deps::SDSBGraphBuilder, Deps::EQModelMatrixBuilder, MATRIX::EQMatrixConfig, IR::EquationTable, IR::EquationSDMatrix
 
typedef ModelMatrix< Deps::SZSBGraphBuilder, Deps::EQModelMatrixBuilder, MATRIX::EQMatrixConfig, IR::EquationTable, IR::EquationSZMatrix
 
typedef ModelMatrix< Deps::SOSBGraphBuilder, Deps::EQModelMatrixBuilder, MATRIX::EQMatrixConfig, IR::EquationTable, IR::EquationSOMatrix
 
typedef ModelMatrix< Deps::DOSBGraphBuilder, Deps::EQModelMatrixBuilder, MATRIX::EQMatrixConfig, IR::EquationTable, IR::EquationDOMatrix
 
typedef ModelMatrix< Deps::DSCGraphBuilder, Deps::EVModelMatrixBuilder, MATRIX::EVMatrixConfig, IR::EventTable, IR::EventLHSDSCMatrix
 
typedef ModelMatrix< Deps::LHSStGraphBuilder, Deps::EVModelMatrixBuilder, MATRIX::EVMatrixConfig, IR::EventTable, IR::EventLHSSTMatrix
 
typedef ModelMatrix< Deps::RHSStGraphBuilder, Deps::EVModelMatrixBuilder, MATRIX::EVMatrixConfig, IR::EventTable, IR::EventRHSSTMatrix
 
typedef ModelMatrix< Deps::HDGraphBuilder, Deps::EVModelMatrixBuilder, MATRIX::EVMatrixConfig, IR::EventTable, IR::EventHDMatrix
 
typedef ModelMatrix< Deps::HZGraphBuilder, Deps::EVModelMatrixBuilder, MATRIX::EVMatrixConfig, IR::EventTable, IR::EventHZMatrix
 
typedef ModelMatrix< Deps::HZSTGraphBuilder, Deps::EVModelMatrixBuilder, MATRIX::EVMatrixConfig, IR::EventTable, IR::EventHZSTMatrix
 
typedef ModelMatrix< Deps::HHGraphBuilder, Deps::EVModelMatrixBuilder, MATRIX::EVMatrixConfig, IR::EventTable, IR::EventHHMatrix
 
typedef QSSModel< Deps::SDSBGraphBuilder > QSSModelGen
 
typedef QSSModel< Deps::SZSBGraphBuilder > ZCModelGen
 
typedef QSSModel< Deps::SOSBGraphBuilder > OutputModelGen
 
typedef ModelTable< int, StatementStatementTable
 

Enumerations

enum  Solver {
  Solver::QSS, Solver::CQSS, Solver::LIQSS, Solver::QSS2,
  Solver::LIQSS2, Solver::LIQSS_BDF, Solver::QSS3, Solver::LIQSS3,
  Solver::QSS4, Solver::DASSL, Solver::DOPRI, Solver::CVODE_BDF,
  Solver::CVODE_AM, Solver::IDA, Solver::mLIQSS, Solver::mLIQSS2
}
 
enum  DT_Synch { DT_Synch::DT_Fixed, DT_Synch::DT_Asynchronous }
 
enum  IntegerAnnotations { IntegerAnnotations::RandomSeed, IntegerAnnotations::CVODEMaxOrder, IntegerAnnotations::XOutput }
 
enum  DEC_Type { DEC_PUBLIC, DEC_LOCAL }
 

Functions

Expression getUseExp (Variable variable, DepData dep_data)
 
bool findDep (DepsMap deps, DepData dep_data, bool multiple_nodes)
 
bool findAlgDep (PrintedDeps printed_deps, int id, SB::Set range, SB::Deps::LMapExp use_map, SB::Deps::LMapExp eq_use_map)
 
bool checkAlgRecursiveDeps (Equation eq, AlgDepsMap alg_deps, AlgDepsMap deps)
 
string addAlgDeps (Equation eq, SB::Deps::LMapExp eq_use, AlgDepsMap alg_deps, AlgDepsMap deps, PrintedDeps &printed_deps, bool comes_from_rec)
 
void insertAlg (AlgDepsMap &map, int id, DefAlgDepsUse new_dep)
 
bool checkEventRange (Index index, Range range)
 
vector< string > getVariables (Index index, Range range)
 
string addAlgDeps (Equation eq, SB::Deps::LMapExp eq_use, std::map< int, AlgDeps > der_deps, std::map< int, AlgDeps > alg_deps, PrintedDeps &printed_deps, bool comes_from_rec=false)
 
template<typename N >
Option< RangegetUseRange (Util::Variable variable, DepData dep_data, N node, bool event=false, bool path_recursive_deps=false)
 
Option< RangegetUseRange (Util::Variable variable, DepData dep_data)
 
std::ostream & operator<< (std::ostream &out, const Equation &e)
 
EquationPrintergetPrinter (Equation eq)
 
EquationTable zeroCrossingTable (EventTable events)
 Helper function to to generate a equation table for zero crossing equations. More...
 
std::ostream & operator<< (std::ostream &out, const Expression &s)
 
std::ostream & operator<< (std::ostream &out, const ExternalFunction &e)
 
std::ostream & operator<< (std::ostream &out, const CompiledFunction &cf)
 
ostream & operator<< (std::ostream &out, const Input &i)
 
std::ostream & operator<< (std::ostream &out, const Index &i)
 
std::ostream & operator<< (std::ostream &out, const Range &r)
 
std::ostream & operator<< (std::ostream &out, const Statement &s)
 

Typedef Documentation

◆ AlgDeps

Definition at line 136 of file compute_deps.hpp.

◆ AlgDepsMap

typedef std::map<int, AlgDeps> MicroModelica::IR::AlgDepsMap

Definition at line 138 of file compute_deps.hpp.

◆ AnnotationType

Definition at line 280 of file annotation.hpp.

◆ ClassPtr

Definition at line 261 of file class.hpp.

◆ ClassType

Definition at line 259 of file class.hpp.

◆ CompiledFunctionTable

Definition at line 117 of file helpers.hpp.

◆ CompiledPackageTable

Definition at line 141 of file helpers.hpp.

◆ DepsData

Definition at line 157 of file compute_deps.hpp.

◆ DepsMap

typedef std::map<std::string, DepsData> MicroModelica::IR::DepsMap

Definition at line 159 of file compute_deps.hpp.

◆ DOMatrix

typedef ModelMatrix<Deps::DOSBGraphBuilder, Deps::EQModelMatrixBuilder, MATRIX::EQMatrixConfig, IR::EquationTable, IR::Equation> MicroModelica::IR::DOMatrix

Definition at line 95 of file model_matrix.hpp.

◆ EquationOrderMap

Definition at line 167 of file equation.hpp.

◆ EquationTable

Definition at line 169 of file equation.hpp.

◆ EventTable

Definition at line 129 of file event.hpp.

◆ ExpressionList

Definition at line 95 of file expression.hpp.

◆ ExternalFunctionTable

◆ FunctionTable

Definition at line 130 of file class.hpp.

◆ HDMatrix

typedef ModelMatrix<Deps::HDGraphBuilder, Deps::EVModelMatrixBuilder, MATRIX::EVMatrixConfig, IR::EventTable, IR::Event> MicroModelica::IR::HDMatrix

Definition at line 103 of file model_matrix.hpp.

◆ HHMatrix

typedef ModelMatrix<Deps::HHGraphBuilder, Deps::EVModelMatrixBuilder, MATRIX::EVMatrixConfig, IR::EventTable, IR::Event> MicroModelica::IR::HHMatrix

Definition at line 109 of file model_matrix.hpp.

◆ HZMatrix

typedef ModelMatrix<Deps::HZGraphBuilder, Deps::EVModelMatrixBuilder, MATRIX::EVMatrixConfig, IR::EventTable, IR::Event> MicroModelica::IR::HZMatrix

Definition at line 105 of file model_matrix.hpp.

◆ HZSTMatrix

typedef ModelMatrix<Deps::HZSTGraphBuilder, Deps::EVModelMatrixBuilder, MATRIX::EVMatrixConfig, IR::EventTable, IR::Event> MicroModelica::IR::HZSTMatrix

Definition at line 107 of file model_matrix.hpp.

◆ IndexTable

Definition at line 132 of file index.hpp.

◆ InputTable

Definition at line 195 of file helpers.hpp.

◆ LHSDSCMatrix

typedef ModelMatrix<Deps::DSCGraphBuilder, Deps::EVModelMatrixBuilder, MATRIX::EVMatrixConfig, IR::EventTable, IR::Event> MicroModelica::IR::LHSDSCMatrix

Definition at line 97 of file model_matrix.hpp.

◆ LHSSTMatrix

typedef ModelMatrix<Deps::LHSStGraphBuilder, Deps::EVModelMatrixBuilder, MATRIX::EVMatrixConfig, IR::EventTable, IR::Event> MicroModelica::IR::LHSSTMatrix

Definition at line 99 of file model_matrix.hpp.

◆ OrderedEquations

typedef std::map<int, std::list<Equation> > MicroModelica::IR::OrderedEquations

Definition at line 165 of file equation.hpp.

◆ OutputModelGen

typedef QSSModel<Deps::SOSBGraphBuilder> MicroModelica::IR::OutputModelGen

Definition at line 122 of file qss_model.hpp.

◆ PrintedDeps

Definition at line 147 of file compute_deps.hpp.

◆ QSSModelGen

typedef QSSModel<Deps::SDSBGraphBuilder> MicroModelica::IR::QSSModelGen

Definition at line 118 of file qss_model.hpp.

◆ RangeDefinitionTable

Definition at line 162 of file index.hpp.

◆ RHSSTMatrix

typedef ModelMatrix<Deps::RHSStGraphBuilder, Deps::EVModelMatrixBuilder, MATRIX::EVMatrixConfig, IR::EventTable, IR::Event> MicroModelica::IR::RHSSTMatrix

Definition at line 101 of file model_matrix.hpp.

◆ SDMatrix

typedef ModelMatrix<Deps::SDSBGraphBuilder, Deps::EQModelMatrixBuilder, MATRIX::EQMatrixConfig, IR::EquationTable, IR::Equation> MicroModelica::IR::SDMatrix

Definition at line 89 of file model_matrix.hpp.

◆ SOMatrix

typedef ModelMatrix<Deps::SOSBGraphBuilder, Deps::EQModelMatrixBuilder, MATRIX::EQMatrixConfig, IR::EquationTable, IR::Equation> MicroModelica::IR::SOMatrix

Definition at line 93 of file model_matrix.hpp.

◆ StatementTable

Definition at line 98 of file statement.hpp.

◆ SZMatrix

typedef ModelMatrix<Deps::SZSBGraphBuilder, Deps::EQModelMatrixBuilder, MATRIX::EQMatrixConfig, IR::EquationTable, IR::Equation> MicroModelica::IR::SZMatrix

Definition at line 91 of file model_matrix.hpp.

◆ Usage

typedef vector<int> MicroModelica::IR::Usage

Definition at line 134 of file index.hpp.

◆ ZCModelGen

typedef QSSModel<Deps::SZSBGraphBuilder> MicroModelica::IR::ZCModelGen

Definition at line 120 of file qss_model.hpp.

Enumeration Type Documentation

◆ DEC_Type

Enumerator
DEC_PUBLIC 
DEC_LOCAL 

Definition at line 75 of file class.hpp.

◆ DT_Synch

Enumerator
DT_Fixed 
DT_Asynchronous 

Definition at line 88 of file annotation.hpp.

◆ IntegerAnnotations

Enumerator
RandomSeed 
CVODEMaxOrder 
XOutput 

Definition at line 119 of file annotation.hpp.

◆ Solver

Enumerator
QSS 
CQSS 
LIQSS 
QSS2 
LIQSS2 
LIQSS_BDF 
QSS3 
LIQSS3 
QSS4 
DASSL 
DOPRI 
CVODE_BDF 
CVODE_AM 
IDA 
mLIQSS 
mLIQSS2 

Definition at line 69 of file annotation.hpp.

Function Documentation

◆ addAlgDeps() [1/2]

string MicroModelica::IR::addAlgDeps ( Equation  eq,
SB::Deps::LMapExp  eq_use,
AlgDepsMap  alg_deps,
AlgDepsMap  deps,
PrintedDeps printed_deps,
bool  comes_from_rec 
)

◆ addAlgDeps() [2/2]

string MicroModelica::IR::addAlgDeps ( Equation  eq,
SB::Deps::LMapExp  eq_use,
std::map< int, AlgDeps der_deps,
std::map< int, AlgDeps alg_deps,
PrintedDeps printed_deps,
bool  comes_from_rec = false 
)

◆ checkAlgRecursiveDeps()

bool MicroModelica::IR::checkAlgRecursiveDeps ( Equation  eq,
AlgDepsMap  alg_deps,
AlgDepsMap  deps 
)

◆ checkEventRange()

bool MicroModelica::IR::checkEventRange ( Index  index,
Range  range 
)

Definition at line 194 of file compute_deps.cpp.

◆ findAlgDep()

bool MicroModelica::IR::findAlgDep ( PrintedDeps  printed_deps,
int  id,
SB::Set  range,
SB::Deps::LMapExp  use_map,
SB::Deps::LMapExp  eq_use_map 
)

Definition at line 91 of file compute_deps.cpp.

References checkAlgRecursiveDeps().

Here is the call graph for this function:

◆ findDep()

bool MicroModelica::IR::findDep ( DepsMap  deps,
DepData  dep_data,
bool  multiple_nodes 
)

◆ getPrinter()

EquationPrinter * MicroModelica::IR::getPrinter ( Equation  eq)

Definition at line 64 of file equation_printer.cpp.

Referenced by MicroModelica::IR::Equation::index().

◆ getUseExp()

Expression MicroModelica::IR::getUseExp ( Variable  variable,
DepData  dep_data 
)

◆ getUseRange() [1/2]

Option<Range> MicroModelica::IR::getUseRange ( Util::Variable  variable,
DepData  dep_data 
)

◆ getUseRange() [2/2]

template<typename N >
Option<Range> MicroModelica::IR::getUseRange ( Util::Variable  variable,
DepData  dep_data,
node,
bool  event = false,
bool  path_recursive_deps = false 
)

If the variable is recursive, return the entire variable range.

If a range of variables affects one equation, generate a range with variable size and offsets, the same is done if the opposite condition is met, return the range of the equations.

Definition at line 173 of file compute_deps.hpp.

Referenced by MicroModelica::IR::QSSModelDepsGenerator::postProcess().

◆ getVariables()

std::vector< std::string > MicroModelica::IR::getVariables ( Index  index,
Range  range 
)

Definition at line 213 of file compute_deps.cpp.

◆ insertAlg()

void MicroModelica::IR::insertAlg ( AlgDepsMap map,
int  id,
DefAlgDepsUse  new_dep 
)

Definition at line 187 of file compute_deps.cpp.

Referenced by MicroModelica::IR::QSSModelDepsGenerator::visitF().

◆ operator<<() [1/8]

std::ostream& MicroModelica::IR::operator<< ( std::ostream &  out,
const CompiledFunction cf 
)

Definition at line 94 of file helpers.cpp.

◆ operator<<() [2/8]

std::ostream& MicroModelica::IR::operator<< ( std::ostream &  out,
const Equation e 
)

Definition at line 185 of file equation.cpp.

References MicroModelica::IR::Equation::_rhs, MicroModelica::IR::Expression::expression(), and MicroModelica::IR::Equation::isValid().

Here is the call graph for this function:

◆ operator<<() [3/8]

std::ostream& MicroModelica::IR::operator<< ( std::ostream &  out,
const Expression s 
)

Definition at line 178 of file expression.cpp.

◆ operator<<() [4/8]

std::ostream& MicroModelica::IR::operator<< ( std::ostream &  out,
const ExternalFunction e 
)

Definition at line 61 of file helpers.cpp.

◆ operator<<() [5/8]

std::ostream& MicroModelica::IR::operator<< ( std::ostream &  out,
const Index i 
)

Definition at line 240 of file index.cpp.

References MicroModelica::IR::Expression::isEmpty().

Here is the call graph for this function:

◆ operator<<() [6/8]

ostream& MicroModelica::IR::operator<< ( std::ostream &  out,
const Input i 
)

Definition at line 500 of file helpers.cpp.

◆ operator<<() [7/8]

std::ostream& MicroModelica::IR::operator<< ( std::ostream &  out,
const Range r 
)

Definition at line 910 of file index.cpp.

◆ operator<<() [8/8]

std::ostream& MicroModelica::IR::operator<< ( std::ostream &  out,
const Statement s 
)

Definition at line 297 of file statement.cpp.

◆ zeroCrossingTable()

EquationTable MicroModelica::IR::zeroCrossingTable ( EventTable  events)

Helper function to to generate a equation table for zero crossing equations.

Definition at line 182 of file event.cpp.