io
Module containing all import/export functionalities.
binaries_to_file(m, f, var_map)
Write out binaries of a model to a lp file.
Source code in pyoframe/io.py
bounds_to_file(m, f, var_map)
Write out variables of a model to a lp file.
Source code in pyoframe/io.py
integers_to_file(m, f, var_map)
Write out integers of a model to a lp file.
Source code in pyoframe/io.py
io_progress_bar(iterable, prefix='', suffix='', length=50, fill='█', update_every=1)
Display progress bar for I/O operations.
Source code in pyoframe/io.py
objective_to_file(m, f, var_map)
Write out the objective of a model to a lp file.
Source code in pyoframe/io.py
to_file(m, file_path=None, use_var_names=False)
Write out a model to a lp file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
m
|
Model
|
The model to write out. |
required |
file_path
|
Optional[Union[str, Path]]
|
The path to write the model to. If None, a temporary file is created. The caller is responsible for deleting the file after use. |
None
|
use_var_names
|
If True, variable names are used in the lp file. Otherwise, variable indices are used. |
False
|
Returns:
Type | Description |
---|---|
Path
|
The path to the lp file. |