memilio icon indicating copy to clipboard operation
memilio copied to clipboard

Add support for reading templated SECIR models from JSON data

Open julianlitz opened this issue 3 months ago • 0 comments

Feature description

For the parameter optimization we require a function that returns the templated model:

template <typename FP>
mio::osecirvvs::Model<FP> create_model();
template <typename FP>
mio::Graph<mio::SimulationNode<FP, mio::Simulation<FP, mio::osecirvvs::Model<FP>>>, mio::MobilityEdge<FP>> create_graph_model();

At the moment, models can only be read as double. Casting a double-based model to a generic FP type isn’t feasible, as it would require significant effort and complex metaprogramming, especially within the graph structure.

To address this, we will template the remaining I/O files, enabling models to be read directly with the appropriate template parameter (FP).

Additional context

No response

Checklist

  • [ ] Attached labels, especially loc:: or model:: labels.
  • [ ] Linked to project.

julianlitz avatar Sep 04 '25 11:09 julianlitz