Demand

Demand#

The Demand submodule of polaris-studio uses the same database management layer as the Supply module but is significantly less sophisticated in terms of its capabilities for manipulation of the database and for ensuring consistency. This is because, in general, the demand database is generated and populated by the POLARIS simulation and the main interactions the user will have with the Demand database are to extract data from it.

The Demand class provides the same high-level interface to this file as the Supply module:

.. code-block:: python

demand = Demand.create(path_to_new_demand_db) # Create a new demand database demand = Demand.from_file(path_to_demand_db) # Or open an existing one

demand.upgrade() # Upgrade the database to the latest data structure

demand.checker.execute() # Perform critical consistency checks