elpee.yaml_handler
Note
The functionalities of this module are moved to the elpee.data_handler module. Check elpee.data_handler for its implementation.
A module for reading & writing LP problem configurations with yaml files.
Import
from elpee import yaml_handler
Methods
Read the standardized problem configuration from the yaml file
Parameters
- yaml_pathstr
File path to the yaml file containing LP problem to be read
Return
elpee.StandardProblem object of the LP problem in the yaml file
Example Code
from elpee import yaml_handler
yaml_handler.read_yaml("file/path/to/elpee/problem.yaml")
Save the standardized problem configurations to yaml file
Parameters
- problemelpee.StandardProblem
Standardized LP problem to be saved into yaml file
- yaml_pathstr
File path of yaml file to be written
Example Code
from elpee import yaml_handler
# let lp_solution be the solution obtained from an elpee problem
yaml_handler.write(lp_solution, "file/path/to/save/solution.yaml")
A function to print the elpee.StandardProblem from the yaml
Parameters
- yaml_pathstr
File path to the yaml file containing LP problem to be read
- show_interpreterbool (default = True)
Provides interpretation of values in simplex table when True
Example Code
from elpee import yaml_handler
# let lp_solution be the solution obtained from an elpee problem
yaml_handler.print_lp_problem_from_yaml("file/path/to/save/solution.yaml")