pyaugmecon icon indicating copy to clipboard operation
pyaugmecon copied to clipboard

Check if user-provided model component names conflict with pyaugmecon-added component names

Open npaterakis opened this issue 1 year ago • 1 comments

Method convert_prob in class Model modifies the user-provided pyomo model by adding new components. If the model of interest contains a component with the same name as one of the components that are added by the convert_prob method it will be "overwritten" resulting in errors that are hard to trace.

Thus, there are some reserved component names against which the component names in the user-provided model must be checked and, in case of conflict, guide the user to fix them.

@wouterbles I already have a solution for this. It appears that there are only 4 components ({'Os', 'Slack', 'e', 'con_list'}) added to the model, but it would be good to rename them first.

npaterakis avatar Feb 24 '24 00:02 npaterakis

A (temporary) solution was included in 1.0.8. However, it still makes sense to rename the reserved component names.

npaterakis avatar Feb 26 '24 15:02 npaterakis