Skip to main content

General Constraint error: Invalid general function options or missing closing brackets

Answered

Comments

2 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?.
  • Silke Horn
    • Gurobi Staff

    Hi Tanuj,

    We don't recommend writing LP files by hand. Why don't you use an API to create the LP file?

    There are multiple issues with your file. E.g.:

    • You can only model univariate polynomials (i.e., you cannot use two variables x and y).
    • You should order the terms in the polynomial decreasingly by degree.
    • The attribute for controlling piece length is called FuncPieceLength. (This might be wrong in the LP format documentation.)
    • Bounds should go before the general constraints.

    I would really recommend building the model using one of our APIs!

    Silke

    1

Post is closed for comments.