Skip to content

Printing models with parameters #2762

Open
@joaquimg

Description

@joaquimg

Consider:

model = Model()
@variable(model, y == 18)
@variable(model, p in Parameter(1.3))
@constraint(model, c1, 2y + 3p >= 0)
@objective(model, Min, 5y + 6p)

write_to_file(model, "test_param.mps")

print(read("test_param.mps", String))

The resulting file is:

NAME
ROWS
 N  OBJ
 G  c1
COLUMNS
    y         c1        2
    y         OBJ       5
    x2        c1        3
    x2        OBJ       6
RHS
    rhs       c1        0
RANGES
BOUNDS
 FX bounds    y         18
 FX bounds    x2        1.3
ENDATA

It seems that, once the parameter goes to the ParameterToEqualToBridge the name information is lost

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions