LpDebugWriter class
#include <gtopt/lp_debug_writer.hpp>
Encapsulates LP debug file writing and optional async gzip compression.
Construct with a non-empty directory to activate. When compression is non-empty and not "uncompressed", each LP file written is gzip- compressed (removing the original .lp). If a pool is provided, compression runs as an async task; otherwise it runs synchronously.
Constructors, destructors, conversion operators
- LpDebugWriter() defaulted
- LpDebugWriter(std::string directory, std::string compression = {}, AdaptiveWorkPool* pool = nullptr) explicit
Public functions
- auto compress_async(const std::string& lp_path) -> void
- auto drain() -> void
- Wait for all pending async compression futures.
- auto is_active() const -> bool noexcept
- Returns true when this writer will actually write files.
- auto write(const LinearInterface& li, const std::string& filepath_stem) -> void
Function documentation
void gtopt:: LpDebugWriter:: compress_async(const std::string& lp_path)
| Parameters | |
|---|---|
| lp_path | Full path including .lp extension. |
Submit gzip compression for an already-written LP file.
void gtopt:: LpDebugWriter:: write(const LinearInterface& li,
const std::string& filepath_stem)
| Parameters | |
|---|---|
| li | LP interface whose state to dump. |
| filepath_stem | Full path stem — extension .lp is appended. |
Write LP file synchronously then optionally submit gzip async.