メインコンテンツへスキップ

How to save a model file in memory rather than disk?

回答済み

コメント

2件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support.
  • Mario Ruthmair
    • Gurobi Staff

    Hi Jin,

    Since it is usually not allowed to access the memory of a different process, here are some suggestions:

    • If you have enough memory, you could create a RAM-disk in your operating system, i.e., an area in your memory that behaves like a normal disk and has a path. Then you can write/read the MPS file to this RAM-disk.
    • You could communicate between the C++ and the Python process via REST (or something else) to send the model details from C++ to Python.
    • It might make sense to construct the whole model either in C++ or Python and just transfer the data needed for the model formulation.

    Best regards,
    Mario

    0

投稿コメントは受け付けていません。