Skip to content

Solver Refactor: separate available and acquire/release license #3516

Open
@michaelbynum

Description

@michaelbynum

Summary

Based on recent discussions, we think it makes more sense to separate the semantics of available from whether a license can be used at that time. Here are my suggestions:

  • Remove FullLicense and LimitedLicense from the Availability enum and add Installed or something similar with a value > 0. Availability.__bool__ should return True for the new Installed member of Availability.
  • Add acquire_license and release_license functions or methods. acquire_license should optionally wait a specified amount of time for a license to be available. Right now, I'm thinking these should be separate from any class/instance.
  • Remove the __del__ logic that releases licenses. This should be done explicitly with release_license.
  • These changes may impact how we test solvers. Checking available may not be sufficient.

There are a lot of subtleties here with different types of licenses and different solvers. I'm sure I have not thought through everything yet.

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions