Skip to content

Conversation

@G-Carneiro
Copy link
Contributor

Summary

  • Introduced LpBinaryVariable and LpIntegerVariable classes to extend functionality.
  • Enabled setting initial values for LpVariable during its creation.
  • Refactored fromDataclass to include varValue for convenience and clarity during variable instantiation.
  • Added test cases for all the changes.

Motivation

I’ve been working on problems where most variables are binary or integer. It’s a bit annoying having to specify cat for each one, so I created subclasses to handle this.
Along the same lines, I added the option to specify varValue when creating the variable.

Introduce new classes for binary and integer variables, extending LpVariable. Added related tests to ensure correct behavior, including bounds handling for integer variables.
Previously, LpVariable did not allow specifying an initial value directly. Corresponding test cases have been added to ensure correct functionality.
Updated the variable instantiation to set `varValue` directly in the constructor.
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.

1 participant