Skip to content

build_model_size_report not include variables in objective function #1712

Open
@ZedongPeng

Description

@ZedongPeng

In the build_model_size_report function, the activated_vars only includes the variables in activated_constraints and activated_disjuncts.
Should the variables in the objective function also be included in activated_vars? Although all variables included in all_vars.

The models that have no constraint motivated me to ask this question.

In the cvxnonsep_psig30.py example, there is no constraint. When I use build_model_size_report(model), the output is like the following:

activated:
    binary_variables: 0
    constraints: 0
    continuous_variables: 0
    disjunctions: 0
    disjuncts: 0
    integer_variables: 0
    nonlinear_constraints: 0
    variables: 0
overall:
    binary_variables: 0
    constraints: 0
    continuous_variables: 15
    disjunctions: 0
    disjuncts: 0
    integer_variables: 15
    nonlinear_constraints: 0
    variables: 30
warning:
    unassociated_disjuncts: 0

I can use the information in overall, but I am wondering should the activated_vars also includes the variables in the objective function.

Btw, the information of the objective function is not collected here. Should this also be included?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions