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

Demand Queries for Generic Domains #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

beyeler
Copy link

@beyeler beyeler commented Feb 11, 2024

This PR adds full support for generic domains in PySats including demand queries. When creating an instance of MRVM or SRVM you may set the "generic" parameter to true to create a generic domain (analogous to the original SATS).

The generic model provides the same functionality as the PySats SimpleModel by representing a bundle as an array of integers instead of an array of {0,1}. Additionally, it provides the following functions and properties:

  • licence_to_good: dictionary that maps each licence id of the non-generic model to the id of the generic good. This allows to transform a bundle from a non-generic model into a generic model bundle.
  • good_to_licence: dictionary that maps each good id to the corresponding lists of non-generic licences. This allows to transform a bundle from a generic model into a non-geric model bundle.
  • get_capacities() dictionary that maps each good it to the corresponding supplied quantity of this good

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