|
3 | 3 | #include "core.h"
|
4 | 4 | #include "storm/utility/initialize.h"
|
5 | 5 | #include "storm/utility/SignalHandler.h"
|
| 6 | +#include "storm/io/file.h" |
6 | 7 | #include "storm/io/DirectEncodingExporter.h"
|
7 | 8 | #include "storm/storage/ModelFormulasPair.h"
|
8 | 9 | #include "storm/storage/dd/DdType.h"
|
@@ -179,21 +180,21 @@ void define_optimality_type(py::module& m) {
|
179 | 180 |
|
180 | 181 | // Thin wrapper for exporting model
|
181 | 182 | template<typename ValueType>
|
182 |
| -void exportDRN(std::shared_ptr<storm::models::sparse::Model<ValueType>> model, std::string const& file, storm::exporter::DirectEncodingOptions options) { |
| 183 | +void exportDRN(std::shared_ptr<storm::models::sparse::Model<ValueType>> model, std::string const& file, storm::io::DirectEncodingOptions options) { |
183 | 184 | std::ofstream stream;
|
184 |
| - storm::utility::openFile(file, stream); |
185 |
| - storm::exporter::explicitExportSparseModel(stream, model, {}, options); |
186 |
| - storm::utility::closeFile(stream); |
| 185 | + storm::io::openFile(file, stream); |
| 186 | + storm::io::explicitExportSparseModel(stream, model, {}, options); |
| 187 | + storm::io::closeFile(stream); |
187 | 188 | }
|
188 | 189 |
|
189 | 190 | void define_export(py::module& m) {
|
190 | 191 |
|
191 |
| - py::class_<storm::exporter::DirectEncodingOptions> opts(m, "DirectEncodingOptions"); |
| 192 | + py::class_<storm::io::DirectEncodingOptions> opts(m, "DirectEncodingOptions"); |
192 | 193 | opts.def(py::init<>());
|
193 |
| - opts.def_readwrite("allow_placeholders", &storm::exporter::DirectEncodingOptions::allowPlaceholders); |
| 194 | + opts.def_readwrite("allow_placeholders", &storm::io::DirectEncodingOptions::allowPlaceholders); |
194 | 195 | // Export
|
195 |
| - m.def("_export_to_drn", &exportDRN<double>, "Export model in DRN format", py::arg("model"), py::arg("file"), py::arg("options")=storm::exporter::DirectEncodingOptions()); |
196 |
| - m.def("_export_to_drn_interval", &exportDRN<storm::Interval>, "Export model in DRN format", py::arg("model"), py::arg("file"), py::arg("options")=storm::exporter::DirectEncodingOptions()); |
197 |
| - m.def("_export_exact_to_drn", &exportDRN<storm::RationalNumber>, "Export model in DRN format", py::arg("model"), py::arg("file"), py::arg("options")=storm::exporter::DirectEncodingOptions()); |
198 |
| - m.def("_export_parametric_to_drn", &exportDRN<storm::RationalFunction>, "Export parametric model in DRN format", py::arg("model"), py::arg("file"), py::arg("options")=storm::exporter::DirectEncodingOptions()); |
| 196 | + m.def("_export_to_drn", &exportDRN<double>, "Export model in DRN format", py::arg("model"), py::arg("file"), py::arg("options")=storm::io::DirectEncodingOptions()); |
| 197 | + m.def("_export_to_drn_interval", &exportDRN<storm::Interval>, "Export model in DRN format", py::arg("model"), py::arg("file"), py::arg("options")=storm::io::DirectEncodingOptions()); |
| 198 | + m.def("_export_exact_to_drn", &exportDRN<storm::RationalNumber>, "Export model in DRN format", py::arg("model"), py::arg("file"), py::arg("options")=storm::io::DirectEncodingOptions()); |
| 199 | + m.def("_export_parametric_to_drn", &exportDRN<storm::RationalFunction>, "Export parametric model in DRN format", py::arg("model"), py::arg("file"), py::arg("options")=storm::io::DirectEncodingOptions()); |
199 | 200 | }
|
0 commit comments