Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Child] covmat to docplex binary variables #28

Closed
gcattan opened this issue Jan 27, 2022 · 1 comment
Closed

[Child] covmat to docplex binary variables #28

gcattan opened this issue Jan 27, 2022 · 1 comment
Assignees
Milestone

Comments

@gcattan
Copy link
Collaborator

gcattan commented Jan 27, 2022

No description provided.

@gcattan
Copy link
Collaborator Author

gcattan commented Feb 17, 2022

@toncho11
this is a good follow-up based on your previous PR.
First step, would probably be to create a docplex.py file inside the utils folder.
Inside this file you can report here the method you created in docplex_test.py to create continuous variable matrices, except it should accept a docplex problem as a parameter.

def covmat_var(prob, channels, name='cont_covmat'):
        ContinuousVarType.one_letter_symbol = lambda _: 'C'
        return prob.continuous_var_matrix(keys1=channels, keys2=channels,
                                          name=name, lb=-prob.infinity)

We can then think about how to create a similar method for integer and binary variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant