Skip to content

division in objective: given coefficients are neither Expr or number but ProdExpr #387

@cnglen

Description

@cnglen

How to add objective which including division expression, such as:

a=model.addVar("a")
b=model.addVar("b")
c=model.addVar("c")

In [354]: model.setObjective((a+b)/c)

AssertionError Traceback (most recent call last)
in
----> 1 model.setObjective((a+b)/c)

src/pyscipopt/scip.pyx in pyscipopt.scip.Model.setObjective()

AssertionError: given coefficients are neither Expr or number but ProdExpr

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