Skip to content

[FileFormats] support other number types other than Float64 #2765

@hdavid16

Description

@hdavid16

Hi, I am trying to read this model file so that it uses Int in order to use it with MiniZinc/Chuffed. However, I get an error on the types. Is it possible to use MOI.read_from_file so that values are not converted from Int to Float?

feasibility.mof.json

m = MOI.Utilities.Model{Int}()
MOI.read_from_file(m, "feasibility.mof.json")

ERROR: UnsupportedConstraint: `MathOptInterface.ScalarAffineFunction{Float64}`-in-`MathOptInterface.EqualTo{Float64}` constraints are not supported by the
solver you have chosen, and we could not reformulate your model into a
form that is supported.

To fix this error you must choose a different solver.
pkg> st JuMP
Status `~/Documents/rai-supply-chain-demo/Project.toml`
  [4076af6c] JuMP v1.26.0

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