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

updating the file to use cplex correctly #64

Closed
wants to merge 4 commits into from
Closed

Conversation

ceserz2
Copy link

@ceserz2 ceserz2 commented Sep 5, 2024

This PR updates the capacity expansion tutorial to incorporate the correct usage of cplex. This PR changes how cplex is called in the file from 'cplex' to 'cplex_direct'

@samgdotson
Copy link
Collaborator

Thanks for the PR @ceserz2. Typically, a pull request is made to resolve a particular issue and includes a description of the changes that were made to achieve this fix.

If there is an issue or bug, please create a descriptive “issue” explaining the issue or bug, what steps you took before the issue occurred, and what steps you took to try resolving it. Along with other information like the version and platform you’re using. Please see the contributing.md file, or the contributing page on the documentation for more info.

Copy link
Collaborator

@samgdotson samgdotson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ceserz2, this PR is still missing some information!

What issues are associated with this PR? How do you know this is the "correct" string for CPLEX? Are there other places for the documentation to be improved as well? Perhaps you could add guidance for installing CPLEX on macos?

A couple of general tips:

  1. It's not a good idea to change default behavior based on an operating system you haven't tested your code on. E.g., the docs specify installing the optional dependencies with pip install -e .[doc] for a windows or unix machine, but on macos you have to do pip install -e .'[doc]' -- which may not work on the other two operating systems. Make sense?
  2. Reviewers and assignees are not the same entity! An assignee is typically the person(s) responsible for working with the maintainers to adjust their PRs. A reviewer is typically one of the maintainers that have been asked to review a pull request. In this case, I should be a reviewer rather than an assignee.

@@ -54,9 +54,11 @@
"\n",
"# set the solver based on operating system -- assumes glpk or cbc is installed.\n",
"if \"win32\" in sys.platform:\n",
" solver = 'cplex'\n",
" solver = 'cplex_direct'\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you know this line needs to be changed? Have you tested this on a windows computer? (I have and it seems to work fine).

Comment on lines +60 to +61
"elif \"darwin\" in sys.platform:\n",
" solver = \"cplex_direct\"\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know this will always be necessary or does it depend on how you installed CPLEX?

@samgdotson samgdotson removed their assignment Sep 15, 2024
@samgdotson
Copy link
Collaborator

Thanks for the PR, @ceserz2! I'm going to close this PR since I don't think cplex needs to be an available option in the example notebooks. However, I would welcome a future PR with a docs page that guides users to install CPLEX on their computers.

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

Successfully merging this pull request may close these issues.

2 participants