I haven’t looked into this before now, but when I read an LP file into a JuMP model as e.g.
m = JuMP.read_from_file("model_test.lp")
then the docs tell me that the constraints or variable names in the LP file will not be registered or available for accessing as m[:SomeName]. Fair enough, but if I don’t really know how the original model is represented in the file, then how should I best work with the model after solving to access variable values?
I can get all the global information on constraint or variable names using
m.moi_backend.model_cache.model.name_to_con
or
m.moi_backend.model_cache.model.name_to_var
but this seems like too much relying on internals? Is there a functional way to pull out sets of variables or constraints (maybe after using some text pattern matching)?