Skip to content

dat file empty 2d set error #258

@DLWoodruff

Description

@DLWoodruff

empty2d.zip
The attached files have an example of an AMPL-format dat file with an empty 2 dimensional set that results in an error. A potential fix that seems like it might work is as follows: in PyomoModel.py in _tupelize add
if len(list(data.keys())) == 1 and list(data.keys())[0] is None and len(data[None]) == 0:
return None
right before
ans = {}
but there is probably something better.
To see the error, use something like:
pyomo solve 2dDAT.py empty2d.dat --solver=cplex

Metadata

Metadata

Labels

bugnot plannedpyomo.dataAny issues related to data portals and data file parsing

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions