[Bug]: Error in conversion of highs.sol file
The Issue
I have run a model using Highs. But when trying to convert it to csvs using otoole i get a parsing error. I'm not sure what's exactly the issue. Potentially the format of the sol file that Highs produced.
Expected Behavior
No response
Steps To Reproduce
- Preprocess datafile `python preprocess_data.py otoole data.txt data_preprocessed.txt
- generate mps file by
glpsol -m model.txt -d data_preprocessed.txt --wmps data.mps --check - run mps with Highs using the command
highs --model_file data.mps --solution_file solution.sol --presolve on --solver simplex - convert solution using otoole: `otoole results highs csv solution.sol results_csv datafile data.txt config.yaml
Log output
otoole results highs csv .\solution_fast.sol .\results_csv\ datafile '.\data_output (1)_adjusted-for-fast.txt' .\config_COL_test.yml AmplyError: otoole results highs csv .\solution_fast.sol .\results_csv\ datafile '.\data_output (1)_adjusted-for-fast.txt' .\config_COL_test.ymlotoole) PS ParserError: Could not construct index. Requested to use 1 number of columns, but 3 left to parse. (otoole) PS C:\Users\b419842\Documents\Filkassen\Hauke Henke\Colombia\OSeMOSYS_model\20251107> otoole --verbose results highs csv .\solution_fast.sol .\results_csv\ datafile '.\data_output (1)_adjusted-for-fast.txt' .\config_COL_test.yml INFO:otoole.convert:Reading config from .\config_COL_test.yml INFO:otoole.convert:Validating config from .\config_COL_test.yml INFO:otoole.convert:Reading config from .\config_COL_test.yml INFO:otoole.convert:Validating config from .\config_COL_test.yml INFO:root:Checking datatypes for AccumulatedAnnualDemand INFO:root:dtype of column REGION does not match str for parameter AccumulatedAnnualDemand INFO:root:dtype of column FUEL does not match str for parameter AccumulatedAnnualDemand INFO:root:dtype of column YEAR does not match int64 for parameter AccumulatedAnnualDemand INFO:root:Checking datatypes for AnnualEmissionLimit INFO:root:dtype of column REGION does not match str for parameter AnnualEmissionLimit INFO:root:dtype of column EMISSION does not match str for parameter AnnualEmissionLimit INFO:root:dtype of column YEAR does not match int64 for parameter AnnualEmissionLimit INFO:root:dtype of column VALUE does not match float for parameter AnnualEmissionLimit INFO:root:Checking datatypes for AnnualExogenousEmission INFO:root:dtype of column REGION does not match str for parameter AnnualExogenousEmission INFO:root:dtype of column EMISSION does not match str for parameter AnnualExogenousEmission INFO:root:dtype of column YEAR does not match int64 for parameter AnnualExogenousEmission INFO:root:dtype of column VALUE does not match float for parameter AnnualExogenousEmission INFO:root:Checking datatypes for AvailabilityFactor INFO:root:dtype of column REGION does not match str for parameter AvailabilityFactor INFO:root:dtype of column TECHNOLOGY does not match str for parameter AvailabilityFactor INFO:root:dtype of column YEAR does not match int64 for parameter AvailabilityFactor INFO:root:Checking datatypes for CapacityFactor INFO:root:dtype of column REGION does not match str for parameter CapacityFactor INFO:root:dtype of column TECHNOLOGY does not match str for parameter CapacityFactor INFO:root:dtype of column TIMESLICE does not match str for parameter CapacityFactor INFO:root:dtype of column YEAR does not match int64 for parameter CapacityFactor INFO:root:Checking datatypes for CapacityOfOneTechnologyUnit INFO:root:dtype of column REGION does not match str for parameter CapacityOfOneTechnologyUnit INFO:root:dtype of column TECHNOLOGY does not match str for parameter CapacityOfOneTechnologyUnit INFO:root:dtype of column YEAR does not match int64 for parameter CapacityOfOneTechnologyUnit INFO:root:dtype of column VALUE does not match float for parameter CapacityOfOneTechnologyUnit INFO:root:Checking datatypes for CapacityToActivityUnit INFO:root:dtype of column REGION does not match str for parameter CapacityToActivityUnit INFO:root:dtype of column TECHNOLOGY does not match str for parameter CapacityToActivityUnit INFO:root:Checking datatypes for CapitalCost INFO:root:dtype of column REGION does not match str for parameter CapitalCost INFO:root:dtype of column TECHNOLOGY does not match str for parameter CapitalCost INFO:root:dtype of column YEAR does not match int64 for parameter CapitalCost INFO:root:Checking datatypes for CapitalCostStorage INFO:root:dtype of column REGION does not match str for parameter CapitalCostStorage INFO:root:dtype of column STORAGE does not match str for parameter CapitalCostStorage INFO:root:dtype of column YEAR does not match int64 for parameter CapitalCostStorage INFO:root:dtype of column VALUE does not match float for parameter CapitalCostStorage INFO:root:Checking datatypes for Conversionld INFO:root:dtype of column TIMESLICE does not match str for parameter Conversionld INFO:root:dtype of column DAYTYPE does not match int64 for parameter Conversionld INFO:root:Checking datatypes for Conversionlh INFO:root:dtype of column TIMESLICE does not match str for parameter Conversionlh INFO:root:dtype of column DAILYTIMEBRACKET does not match int64 for parameter Conversionlh INFO:root:Checking datatypes for Conversionls INFO:root:dtype of column TIMESLICE does not match str for parameter Conversionls INFO:root:dtype of column SEASON does not match int64 for parameter Conversionls INFO:root:Checking datatypes for DaysInDayType INFO:root:dtype of column SEASON does not match int64 for parameter DaysInDayType INFO:root:dtype of column DAYTYPE does not match int64 for parameter DaysInDayType INFO:root:dtype of column YEAR does not match int64 for parameter DaysInDayType INFO:root:dtype of column VALUE does not match float for parameter DaysInDayType INFO:root:Checking datatypes for DaySplit INFO:root:dtype of column DAILYTIMEBRACKET does not match int64 for parameter DaySplit INFO:root:dtype of column YEAR does not match int64 for parameter DaySplit INFO:root:Checking datatypes for DiscountRate INFO:root:dtype of column REGION does not match str for parameter DiscountRate INFO:root:Checking datatypes for DiscountRateStorage INFO:root:dtype of column REGION does not match str for parameter DiscountRateStorage INFO:root:dtype of column STORAGE does not match str for parameter DiscountRateStorage INFO:root:dtype of column VALUE does not match float for parameter DiscountRateStorage INFO:root:Checking datatypes for DiscountRateIdv INFO:root:dtype of column REGION does not match str for parameter DiscountRateIdv INFO:root:dtype of column TECHNOLOGY does not match str for parameter DiscountRateIdv INFO:root:dtype does not match str for set EMISSION INFO:root:Checking datatypes for EmissionActivityRatio INFO:root:dtype of column REGION does not match str for parameter EmissionActivityRatio INFO:root:dtype of column TECHNOLOGY does not match str for parameter EmissionActivityRatio INFO:root:dtype of column EMISSION does not match str for parameter EmissionActivityRatio INFO:root:dtype of column MODE_OF_OPERATION does not match int64 for parameter EmissionActivityRatio INFO:root:dtype of column YEAR does not match int64 for parameter EmissionActivityRatio INFO:root:dtype of column VALUE does not match float for parameter EmissionActivityRatio INFO:root:Checking datatypes for EmissionsPenalty INFO:root:dtype of column REGION does not match str for parameter EmissionsPenalty INFO:root:dtype of column EMISSION does not match str for parameter EmissionsPenalty INFO:root:dtype of column YEAR does not match int64 for parameter EmissionsPenalty INFO:root:dtype of column VALUE does not match float for parameter EmissionsPenalty INFO:root:Checking datatypes for EmissionToActivityChangeRatio INFO:root:dtype of column REGION does not match str for parameter EmissionToActivityChangeRatio INFO:root:dtype of column TECHNOLOGY does not match str for parameter EmissionToActivityChangeRatio INFO:root:dtype of column EMISSION does not match str for parameter EmissionToActivityChangeRatio INFO:root:dtype of column MODE_OF_OPERATION does not match int64 for parameter EmissionToActivityChangeRatio INFO:root:dtype of column YEAR does not match int64 for parameter EmissionToActivityChangeRatio INFO:root:dtype of column VALUE does not match float for parameter EmissionToActivityChangeRatio INFO:root:Checking datatypes for FixedCost INFO:root:dtype of column REGION does not match str for parameter FixedCost INFO:root:dtype of column TECHNOLOGY does not match str for parameter FixedCost INFO:root:dtype of column YEAR does not match int64 for parameter FixedCost INFO:root:dtype does not match str for set FUEL INFO:root:Checking datatypes for InputActivityRatio INFO:root:dtype of column REGION does not match str for parameter InputActivityRatio INFO:root:dtype of column TECHNOLOGY does not match str for parameter InputActivityRatio INFO:root:dtype of column FUEL does not match str for parameter InputActivityRatio INFO:root:dtype of column MODE_OF_OPERATION does not match int64 for parameter InputActivityRatio INFO:root:dtype of column YEAR does not match int64 for parameter InputActivityRatio INFO:root:Checking datatypes for InputToNewCapacityRatio INFO:root:dtype of column REGION does not match str for parameter InputToNewCapacityRatio INFO:root:dtype of column TECHNOLOGY does not match str for parameter InputToNewCapacityRatio INFO:root:dtype of column YEAR does not match int64 for parameter InputToNewCapacityRatio INFO:root:dtype of column VALUE does not match float for parameter InputToNewCapacityRatio INFO:root:Checking datatypes for InputToTotalCapacityRatio INFO:root:dtype of column REGION does not match str for parameter InputToTotalCapacityRatio INFO:root:dtype of column TECHNOLOGY does not match str for parameter InputToTotalCapacityRatio INFO:root:dtype of column YEAR does not match int64 for parameter InputToTotalCapacityRatio INFO:root:dtype of column VALUE does not match float for parameter InputToTotalCapacityRatio INFO:root:Checking datatypes for MinStorageCharge INFO:root:dtype of column REGION does not match str for parameter MinStorageCharge INFO:root:dtype of column STORAGE does not match str for parameter MinStorageCharge INFO:root:dtype of column YEAR does not match int64 for parameter MinStorageCharge INFO:root:dtype of column VALUE does not match float for parameter MinStorageCharge INFO:root:Checking datatypes for ModelPeriodEmissionLimit INFO:root:dtype of column REGION does not match str for parameter ModelPeriodEmissionLimit INFO:root:dtype of column EMISSION does not match str for parameter ModelPeriodEmissionLimit INFO:root:Checking datatypes for ModelPeriodExogenousEmission INFO:root:dtype of column REGION does not match str for parameter ModelPeriodExogenousEmission INFO:root:dtype of column EMISSION does not match str for parameter ModelPeriodExogenousEmission INFO:root:dtype of column VALUE does not match float for parameter ModelPeriodExogenousEmission INFO:root:Checking datatypes for OperationalLife INFO:root:dtype of column REGION does not match str for parameter OperationalLife INFO:root:dtype of column TECHNOLOGY does not match str for parameter OperationalLife INFO:root:Checking datatypes for OperationalLifeStorage INFO:root:dtype of column REGION does not match str for parameter OperationalLifeStorage INFO:root:dtype of column STORAGE does not match str for parameter OperationalLifeStorage INFO:root:dtype of column VALUE does not match float for parameter OperationalLifeStorage INFO:root:Checking datatypes for OutputActivityRatio INFO:root:dtype of column REGION does not match str for parameter OutputActivityRatio INFO:root:dtype of column TECHNOLOGY does not match str for parameter OutputActivityRatio INFO:root:dtype of column FUEL does not match str for parameter OutputActivityRatio INFO:root:dtype of column MODE_OF_OPERATION does not match int64 for parameter OutputActivityRatio INFO:root:dtype of column YEAR does not match int64 for parameter OutputActivityRatio INFO:root:dtype does not match str for set REGION INFO:root:Checking datatypes for REMinProductionTarget INFO:root:dtype of column REGION does not match str for parameter REMinProductionTarget INFO:root:dtype of column YEAR does not match int64 for parameter REMinProductionTarget INFO:root:dtype of column VALUE does not match float for parameter REMinProductionTarget INFO:root:Checking datatypes for ReserveMargin INFO:root:dtype of column REGION does not match str for parameter ReserveMargin INFO:root:dtype of column YEAR does not match int64 for parameter ReserveMargin INFO:root:dtype of column VALUE does not match float for parameter ReserveMargin INFO:root:Checking datatypes for ReserveMarginTagFuel INFO:root:dtype of column REGION does not match str for parameter ReserveMarginTagFuel INFO:root:dtype of column FUEL does not match str for parameter ReserveMarginTagFuel INFO:root:dtype of column YEAR does not match int64 for parameter ReserveMarginTagFuel INFO:root:dtype of column VALUE does not match float for parameter ReserveMarginTagFuel INFO:root:Checking datatypes for ReserveMarginTagTechnology INFO:root:dtype of column REGION does not match str for parameter ReserveMarginTagTechnology INFO:root:dtype of column TECHNOLOGY does not match str for parameter ReserveMarginTagTechnology INFO:root:dtype of column YEAR does not match int64 for parameter ReserveMarginTagTechnology INFO:root:dtype of column VALUE does not match float for parameter ReserveMarginTagTechnology INFO:root:Checking datatypes for ResidualCapacity INFO:root:dtype of column REGION does not match str for parameter ResidualCapacity INFO:root:dtype of column TECHNOLOGY does not match str for parameter ResidualCapacity INFO:root:dtype of column YEAR does not match int64 for parameter ResidualCapacity INFO:root:Checking datatypes for ResidualStorageCapacity INFO:root:dtype of column REGION does not match str for parameter ResidualStorageCapacity INFO:root:dtype of column STORAGE does not match str for parameter ResidualStorageCapacity INFO:root:dtype of column YEAR does not match int64 for parameter ResidualStorageCapacity INFO:root:dtype of column VALUE does not match float for parameter ResidualStorageCapacity INFO:root:Checking datatypes for RETagFuel INFO:root:dtype of column REGION does not match str for parameter RETagFuel INFO:root:dtype of column FUEL does not match str for parameter RETagFuel INFO:root:dtype of column YEAR does not match int64 for parameter RETagFuel INFO:root:dtype of column VALUE does not match float for parameter RETagFuel INFO:root:Checking datatypes for RETagTechnology INFO:root:dtype of column REGION does not match str for parameter RETagTechnology INFO:root:dtype of column TECHNOLOGY does not match str for parameter RETagTechnology INFO:root:dtype of column YEAR does not match int64 for parameter RETagTechnology INFO:root:dtype of column VALUE does not match float for parameter RETagTechnology INFO:root:Checking datatypes for SpecifiedAnnualDemand INFO:root:dtype of column REGION does not match str for parameter SpecifiedAnnualDemand INFO:root:dtype of column FUEL does not match str for parameter SpecifiedAnnualDemand INFO:root:dtype of column YEAR does not match int64 for parameter SpecifiedAnnualDemand INFO:root:dtype of column VALUE does not match float for parameter SpecifiedAnnualDemand INFO:root:Checking datatypes for SpecifiedDemandProfile INFO:root:dtype of column REGION does not match str for parameter SpecifiedDemandProfile INFO:root:dtype of column FUEL does not match str for parameter SpecifiedDemandProfile INFO:root:dtype of column TIMESLICE does not match str for parameter SpecifiedDemandProfile INFO:root:dtype of column YEAR does not match int64 for parameter SpecifiedDemandProfile INFO:root:dtype of column VALUE does not match float for parameter SpecifiedDemandProfile INFO:root:dtype does not match str for set STORAGE INFO:root:Checking datatypes for StorageLevelStart INFO:root:dtype of column REGION does not match str for parameter StorageLevelStart INFO:root:dtype of column STORAGE does not match str for parameter StorageLevelStart INFO:root:dtype of column VALUE does not match float for parameter StorageLevelStart INFO:root:Checking datatypes for StorageMaxChargeRate INFO:root:dtype of column REGION does not match str for parameter StorageMaxChargeRate INFO:root:dtype of column STORAGE does not match str for parameter StorageMaxChargeRate INFO:root:dtype of column VALUE does not match float for parameter StorageMaxChargeRate INFO:root:Checking datatypes for StorageMaxDischargeRate INFO:root:dtype of column REGION does not match str for parameter StorageMaxDischargeRate INFO:root:dtype of column STORAGE does not match str for parameter StorageMaxDischargeRate INFO:root:dtype of column VALUE does not match float for parameter StorageMaxDischargeRate INFO:root:dtype does not match str for set TECHNOLOGY INFO:root:Checking datatypes for TechnologyActivityByModeLowerLimit INFO:root:dtype of column REGION does not match str for parameter TechnologyActivityByModeLowerLimit INFO:root:dtype of column TECHNOLOGY does not match str for parameter TechnologyActivityByModeLowerLimit INFO:root:dtype of column MODE_OF_OPERATION does not match int64 for parameter TechnologyActivityByModeLowerLimit INFO:root:dtype of column YEAR does not match int64 for parameter TechnologyActivityByModeLowerLimit INFO:root:dtype of column VALUE does not match float for parameter TechnologyActivityByModeLowerLimit INFO:root:Checking datatypes for TechnologyActivityByModeUpperLimit INFO:root:dtype of column REGION does not match str for parameter TechnologyActivityByModeUpperLimit INFO:root:dtype of column TECHNOLOGY does not match str for parameter TechnologyActivityByModeUpperLimit INFO:root:dtype of column MODE_OF_OPERATION does not match int64 for parameter TechnologyActivityByModeUpperLimit INFO:root:dtype of column YEAR does not match int64 for parameter TechnologyActivityByModeUpperLimit INFO:root:dtype of column VALUE does not match float for parameter TechnologyActivityByModeUpperLimit INFO:root:Checking datatypes for TechnologyActivityDecreaseByModeLimit INFO:root:dtype of column REGION does not match str for parameter TechnologyActivityDecreaseByModeLimit INFO:root:dtype of column TECHNOLOGY does not match str for parameter TechnologyActivityDecreaseByModeLimit INFO:root:dtype of column MODE_OF_OPERATION does not match int64 for parameter TechnologyActivityDecreaseByModeLimit INFO:root:dtype of column YEAR does not match int64 for parameter TechnologyActivityDecreaseByModeLimit INFO:root:dtype of column VALUE does not match float for parameter TechnologyActivityDecreaseByModeLimit INFO:root:Checking datatypes for TechnologyActivityIncreaseByModeLimit INFO:root:dtype of column REGION does not match str for parameter TechnologyActivityIncreaseByModeLimit INFO:root:dtype of column TECHNOLOGY does not match str for parameter TechnologyActivityIncreaseByModeLimit INFO:root:dtype of column MODE_OF_OPERATION does not match int64 for parameter TechnologyActivityIncreaseByModeLimit INFO:root:dtype of column YEAR does not match int64 for parameter TechnologyActivityIncreaseByModeLimit INFO:root:dtype of column VALUE does not match float for parameter TechnologyActivityIncreaseByModeLimit INFO:root:Checking datatypes for TechnologyFromStorage INFO:root:dtype of column REGION does not match str for parameter TechnologyFromStorage INFO:root:dtype of column TECHNOLOGY does not match str for parameter TechnologyFromStorage INFO:root:dtype of column STORAGE does not match str for parameter TechnologyFromStorage INFO:root:dtype of column MODE_OF_OPERATION does not match int64 for parameter TechnologyFromStorage INFO:root:dtype of column VALUE does not match float for parameter TechnologyFromStorage INFO:root:Checking datatypes for TechnologyToStorage INFO:root:dtype of column REGION does not match str for parameter TechnologyToStorage INFO:root:dtype of column TECHNOLOGY does not match str for parameter TechnologyToStorage INFO:root:dtype of column STORAGE does not match str for parameter TechnologyToStorage INFO:root:dtype of column MODE_OF_OPERATION does not match int64 for parameter TechnologyToStorage INFO:root:dtype of column VALUE does not match float for parameter TechnologyToStorage INFO:root:dtype does not match str for set TIMESLICE INFO:root:Checking datatypes for TotalAnnualMaxCapacity INFO:root:dtype of column REGION does not match str for parameter TotalAnnualMaxCapacity INFO:root:dtype of column TECHNOLOGY does not match str for parameter TotalAnnualMaxCapacity INFO:root:dtype of column YEAR does not match int64 for parameter TotalAnnualMaxCapacity INFO:root:Checking datatypes for TotalAnnualMaxCapacityInvestment INFO:root:dtype of column REGION does not match str for parameter TotalAnnualMaxCapacityInvestment INFO:root:dtype of column TECHNOLOGY does not match str for parameter TotalAnnualMaxCapacityInvestment INFO:root:dtype of column YEAR does not match int64 for parameter TotalAnnualMaxCapacityInvestment INFO:root:dtype of column VALUE does not match float for parameter TotalAnnualMaxCapacityInvestment INFO:root:Checking datatypes for TotalAnnualMinCapacity INFO:root:dtype of column REGION does not match str for parameter TotalAnnualMinCapacity INFO:root:dtype of column TECHNOLOGY does not match str for parameter TotalAnnualMinCapacity INFO:root:dtype of column YEAR does not match int64 for parameter TotalAnnualMinCapacity INFO:root:dtype of column VALUE does not match float for parameter TotalAnnualMinCapacity INFO:root:Checking datatypes for TotalAnnualMinCapacityInvestment INFO:root:dtype of column REGION does not match str for parameter TotalAnnualMinCapacityInvestment INFO:root:dtype of column TECHNOLOGY does not match str for parameter TotalAnnualMinCapacityInvestment INFO:root:dtype of column YEAR does not match int64 for parameter TotalAnnualMinCapacityInvestment INFO:root:dtype of column VALUE does not match float for parameter TotalAnnualMinCapacityInvestment INFO:root:Checking datatypes for TotalTechnologyAnnualActivityLowerLimit INFO:root:dtype of column REGION does not match str for parameter TotalTechnologyAnnualActivityLowerLimit INFO:root:dtype of column TECHNOLOGY does not match str for parameter TotalTechnologyAnnualActivityLowerLimit INFO:root:dtype of column YEAR does not match int64 for parameter TotalTechnologyAnnualActivityLowerLimit INFO:root:Checking datatypes for TotalTechnologyAnnualActivityUpperLimit INFO:root:dtype of column REGION does not match str for parameter TotalTechnologyAnnualActivityUpperLimit INFO:root:dtype of column TECHNOLOGY does not match str for parameter TotalTechnologyAnnualActivityUpperLimit INFO:root:dtype of column YEAR does not match int64 for parameter TotalTechnologyAnnualActivityUpperLimit INFO:root:Checking datatypes for TotalTechnologyModelPeriodActivityLowerLimit INFO:root:dtype of column REGION does not match str for parameter TotalTechnologyModelPeriodActivityLowerLimit INFO:root:dtype of column TECHNOLOGY does not match str for parameter TotalTechnologyModelPeriodActivityLowerLimit INFO:root:Checking datatypes for TotalTechnologyModelPeriodActivityUpperLimit INFO:root:dtype of column REGION does not match str for parameter TotalTechnologyModelPeriodActivityUpperLimit INFO:root:dtype of column TECHNOLOGY does not match str for parameter TotalTechnologyModelPeriodActivityUpperLimit INFO:root:Checking datatypes for TradeRoute INFO:root:dtype of column REGION does not match str for parameter TradeRoute INFO:root:dtype of column FUEL does not match str for parameter TradeRoute INFO:root:dtype of column YEAR does not match int64 for parameter TradeRoute INFO:root:dtype of column VALUE does not match float for parameter TradeRoute INFO:root:Checking datatypes for VariableCost INFO:root:dtype of column REGION does not match str for parameter VariableCost INFO:root:dtype of column TECHNOLOGY does not match str for parameter VariableCost INFO:root:dtype of column MODE_OF_OPERATION does not match int64 for parameter VariableCost INFO:root:dtype of column YEAR does not match int64 for parameter VariableCost INFO:root:Checking datatypes for YearSplit INFO:root:dtype of column TIMESLICE does not match str for parameter YearSplit INFO:root:dtype of column YEAR does not match int64 for parameter YearSplit Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "C:\Users\b419842\AppData\Local\miniconda3\envs\otoole\Scripts\otoole.exe\__main__.py", line 6, in <module> sys.exit(main()) ~~~~^^ File "C:\Users\b419842\AppData\Local\miniconda3\envs\otoole\Lib\site-packages\otoole\cli.py", line 308, in main args.func(args) ~~~~~~~~~^^^^^^ File "C:\Users\b419842\AppData\Local\miniconda3\envs\otoole\Lib\site-packages\otoole\cli.py", line 75, in _result_matrix convert_results( ~~~~~~~~~~~~~~~^ args.config, ^^^^^^^^^^^^ ...<7 lines>... glpk_model=args.glpk_model, ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "C:\Users\b419842\AppData\Local\miniconda3\envs\otoole\Lib\site-packages\otoole\convert.py", line 152, in convert_results context.convert(from_path, to_path, input_data=input_data) ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\b419842\AppData\Local\miniconda3\envs\otoole\Lib\site-packages\otoole\input.py", line 115, in convert inputs, default_values = self._read(input_filepath, **kwargs) ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\b419842\AppData\Local\miniconda3\envs\otoole\Lib\site-packages\otoole\input.py", line 96, in _read return self._read_strategy.read(filepath, **kwargs) ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ File "C:\Users\b419842\AppData\Local\miniconda3\envs\otoole\Lib\site-packages\otoole\results\results.py", line 40, in read available_results = self.get_results_from_file( filepath, input_data ) # type: Dict[str, pd.DataFrame] File "C:\Users\b419842\AppData\Local\miniconda3\envs\otoole\Lib\site-packages\otoole\results\results.py", line 104, in get_results_from_file cbc = self._convert_to_dataframe(filepath) File "C:\Users\b419842\AppData\Local\miniconda3\envs\otoole\Lib\site-packages\otoole\results\results.py", line 294, in _convert_to_dataframe df = pd.read_csv( file_path, ...<3 lines>... dtype=str, ) File "C:\Users\b419842\AppData\Local\miniconda3\envs\otoole\Lib\site-packages\pandas\io\parsers\readers.py", line 1026, in File "C:\Users\b419842\AppData\Local\miniconda3\envs\otoole\Lib\site-packages\pandas\io\parsers\readers.py" File "C:\Users\b419842\AppData\ return parser.read(nrows) ~~~~~~~~~~~^^^^^^^ File "C:\Users\b419842\AppData\Local\miniconda3\envs\otoole\Lib\site-packages\pandas\io\parsers\readers.py", line 1923, in read ) = self._engine.read( # type: ignore[attr-defined] ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ nrows ^^^^^ ) ^ \parsers\c_parser_wrapper.py", line 278, in read ...<3 lines>... ) pandas.errors.ParserError: Could not construct index.
Operating System
Windows
What version of otoole are you running?
1.1.5
Possible Solution
It seems highs doesn't use the constraint names coming from OSeMOSYS but just names them C followed by a nuber.
`Model status
Optimal
Primal solution values
Feasible Objective 33162134.1854405
Columns 251396
C0000001 999999 C0000002 999999 C0000003 999999 C0000004 999999 C0000005 999999 C0000006 999999 C0000007 999999 C0000008 999999 C0000009 999999 C0000010 999999 ...`
Anything else?
I have used the validate command of otoole to check the datafile and it goes through. It only indicates that there are two isolated technologies and one isolated emission.
Hey @HauHe! Thanks for flagging! Im not super familiar with the solution formats from HiGHS, but can you please confirm you are using solution style 1? The docs here show how to set this up. This issue ticket gives some background for using this solution style as as, in case your interested! :)
Hi @trevorb1 , thanks a lot for having a look into this. I had missed to indicate the required solution style. When using an lp-file it now works.
While doing a bit of exploration I noticed that mps files, an alternative to lp-files, are usually smaller in size than lp-file. I now checked but unfortunately one can't convert the sol-file produced when running a model using mps instead of lp. For large models it could be interesting to have the option of using mps files to reduce RAM requirements. Should I perhaps create a separate issue for a potential enhancement?
Oh cool! I've never tried using .mps files before! To clarify, when you solve a model using highs with a .mps file, you get a different solution format? Like one not listed in this issue ticket?
It is like the HiHGS format, but i the name column it doesn't use constraint names from the model but C followed by a number, so I guess somewhere in the process it just numbers the constraints instead of keeping names coming from the model.
Solution file from LP file: Columns Index Status Lower Upper Primal Dual Name 0 LB 0 inf 0 201.608 NewCapacity(RE1,NE_DEMINDELCREF_HIG,2022) 1 LB 0 inf 0 192.007 NewCapacity(RE1,NE_DEMINDELCREF_HIG,2023) 2 LB 0 inf 0 185.951 NewCapacity(RE1,NE_DEMINDELCREF_HIG,2024) 3 LB 0 inf 0 174.156 NewCapacity(RE1,NE_DEMINDELCREF_HIG,2025) 4 LB 0 inf 0 203.267 NewCapacity(RE1,NE_DEMINDELCREF_HIG,2026) 5 LB 0 inf 0 192.569 NewCapacity(RE1,NE_DEMINDELCREF_HIG,2027) ...
Solution file from mps file: Columns Index Status Lower Upper Primal Dual Name 0 BS 0 inf 999999 0 C0000001 1 BS 0 inf 999999 0 C0000002 2 BS 0 inf 999999 0 C0000003 3 BS 0 inf 999999 0 C0000004 4 BS 0 inf 999999 0 C0000005 5 BS 0 inf 999999 0 C0000006 ...
I guess the mapping of the .sol column Name has an associated value in the .mps file? In that case, we would need to process in a similar way to how we do GLPK solutions; where the user provides both the .lp and the .sol.
Feel free to create a new issue! It wont be on my immediate todo list to implement this functionality, tho.