#pragma once #include #include #include "storm/models/sparse/Model.h" namespace storm { namespace exporter { struct DirectEncodingOptions { bool allowPlaceholders = true; }; /*! * Exports a sparse model into the explicit DRN format. * * @param os Stream to export to * @param sparseModel Model to export * @param parameters List of parameters */ template void explicitExportSparseModel(std::ostream& os, std::shared_ptr> sparseModel, std::vector const& parameters, DirectEncodingOptions const& options=DirectEncodingOptions()); /*! * Accumulate parameters in the model. * * @param sparseModel Model. * @return List of parameters in the model. */ template std::vector getParameters(std::shared_ptr> sparseModel); /*! * Generate placeholders for rational functions in the model. * * @param sparseModel Model. * @param exitRates Exit rates. * @return Mapping of the form:rational function -> placeholder name. */ template std::unordered_map generatePlaceholders(std::shared_ptr> sparseModel, std::vector exitRates); /*! * Write value to stream while using the placeholders. * @param os Output stream. * @param value Value. * @param placeholders Placeholders. */ template void writeValue(std::ostream& os, ValueType value, std::unordered_map const& placeholders); } }