Skip to content

Commit a9d049b

Browse files
committed
Ensure the unknown component exception is deterministic
1 parent ebd031f commit a9d049b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pyomo/contrib/solver/solvers/gurobi_direct_minlp.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,11 @@ def write(self, model, **options):
468468
% (
469469
model.name,
470470
"\n\t".join(
471-
"%s:\n\t\t%s" % (k, "\n\t\t".join(map(attrgetter('name'), v)))
472-
for k, v in unknown.items()
471+
sorted(
472+
"%s:\n\t\t%s"
473+
% (k, "\n\t\t".join(sorted(map(attrgetter('name'), v))))
474+
for k, v in unknown.items()
475+
)
473476
),
474477
)
475478
)

0 commit comments

Comments
 (0)