Observed since 21 Oct, 09:26 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
agriPolaris
A priority-queue-driven crop supply monitoring engine.
A Structured Redistribution Engine for Crop Supply Monitoring and Agricultural Logistics
POLARIS a Domain-specific supply-balancing framework is an agricultural logistics system built to monitor the supply conditions of various crops across Local Government Units (LGUs).
It uses:
POLARIS aims to support logistics balancing:
matching oversupplied regions with undersupplied regions efficiently for sustainable food distribution.
🔹 Signed Priority System
POLARIS computes supply difference as:
priority = curr_supply - ideal_supply
The Priority Queue System is max-based, so the largest shortage (most negative) gets paired up with the highest priority.
🔹 Per-Crop Architecture (Dynamic Tables)
Each crop automatically creates its own table inside the SQLite database:
rice(_lgu TEXT UNIQUE, key INTEGER)
corn(_lgu TEXT UNIQUE, key INTEGER)
onion(_lgu TEXT UNIQUE, key INTEGER)
...
This avoids cross-crop contamination and keeps the database clean and scalable.
🔹 2D Priority Queue Structure
POLARIS maintains:
"Rice": PQ_of_Rice
"Corn": PQ_of_Corn
"Onion": PQ_of_Onion
...
This acts like a 2D priority system, where each crop has its own queue sorted by imbalance severity. 🔹 Automatic Oversupply → Undersupply Matching
Because priorities are signed:
PQ[crop][0] → LGU with worst shortage
PQ[crop][-1] → LGU with worst oversupply
This enables logistics pairing:
Send oversupply → to undersupply region
🔹 SQLite Integration
Data persists through:
Use POLARIS through simple commands:
| Command | Description |
|---|---|
| --add | Add or update LGU crop supply |
| --list | Show all PQs and DB tables |
| --cget | Retrieve the most critical imbalance |
| --flush=true | Clear all crop tables |
Given:
curr_supply
ideal_supply
Priority = signed difference:
priority = curr_supply - ideal_supply
Examples:
| Curr | Ideal | Difference(key) | Meaning |
|---|---|---|---|
| 500 | 300 | +200 | Oversupply |
| 100 | 300 | -200 | Undersupply |
| 200 | 200 | 0 | Balanced |
Clone the repository:
git clone https://github.com/dejely/Polaris.git
cd src
or
pip install Polaris
No Dependencies Needed.
➕ Add a new supply record
python main.py --add --lgu your_lgu --crop your_crop --curr 500 --ideal 300
📋 List all queues and database content
python main.py --list
Download counts and popularity will appear here as the collector receives them.
Declarations describe requirements; they are not a resolved dependency graph.
bdist_wheel · 12.37 KB · Python py3
sdist · 12.63 KB · Python source
Observed since 21 Oct, 09:26 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:cc80124ae19c42c5ec31d4c25153c1926d7afaf11dcd996593d40223ba76525e