Skip to content

Number of integer variables in Model #4340

@joziering

Description

@joziering

Hello all,

I am implementing an optimization problem in Java using Google OR Tools.
As part of the evaluation, I would like to access the number of constraints and binary variables in the model. MPSolver has methods "numConstraints()" and "numVariables()".

"numVariables()" seems to return the total number of variables (i.e., continuous and integer). However, I would like to obtain the number of integer variables only. Is there any way to do this?

Thanks in advance!

Best,
Jo

Metadata

Metadata

Assignees

Labels

Help NeededModeling/Usage problemSolver: Linear SolverRelated to all Linear Solver (GLOP, BOP, CBC etc...)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions