eoq3 - EOQ3 core implementation for python
This implements EOQ3 domains, values, queries and commands in python. It is the central module of the EOQ3 implementation for python. It contains a ready-to-use domainwithmdb for programmatic model interactions.
Getting started example
This example implements the "Why EOQ?" example and some additional prints of model information.
from eoq3.domainwithmdb import DomainWithMdb
from eoq3.command import Crt, Get,Set #commands
from eoq3.query import Cls,Pth #queries
from eoq3.concepts import * #import constants as CONCEPTS, ....
from eoq3.examples.warehouse import CreateWarehouseM1Model, CreateWarehouseM2Model #creation of example models
# currently PyecoreMdb is the only local domain. eoq3pyecoremdb must be installed.
from eoq3pyecoremdb import PyEcoreMdb #requres pyecoremdb to be installed
# Initialize a local domain
mdb = PyEcoreMdb()
domain = DomainWithMdb(mdb)
# Init warehouse meta and user model
CreateWarehouseM2Model(domain) #open function to see model creation commands
CreateWarehouseM1Model(domain) #open function to see model creation commands
# Would you like to get a list of articles?
articles = domain.Do( Get( Cls('Article') ) )
print("Articles: %s"%(articles))
# Would you like to know which one is sold less than 3-times?
badArticles = domain.Do( Get( Cls('Article').Sel(Pth('sells').Les(3)) ) )
print("Bad articles: %s"%(badArticles))
# You might want to reduce their price by 10%?
nameAndPrice = domain.Do( Get( Cls('Article').Zip([Pth('name'),Pth('price')])))
print("Article prices: %s"%(nameAndPrice))
domain.Do( Set(
Cls('Article').Sel(Pth('sells').Les(3)),
'price',
Cls('Article').Sel(Pth('sells').Les(3)).Pth('price').Mul(0.9)
) )
nameAndPrice = domain.Do( Get( Cls('Article').Zip([Pth('name'),Pth('price')])))
print("Article prices: %s"%(nameAndPrice))
# Would you like to see a list of the names of the categories of the badly selling articles sorted by ascendingly?
badCategories = domain.Do( Get( Cls('Article').Sel(Pth('sells').Les(3)).Met('PARENT').Pth('name').Uni([]).Idx('SORTASC') ) )
print(badCategories)
This example is available as https://gitlab.com/eoq/py/pyeoq/Examples/Eoq3/WhyWarehouseExample.py
Documentation
For more information see EOQ3 documentation: https://eoq.gitlab.io/doc/eoq3/
pyeoq repository
Pyeoq module's source can be found here: https://gitlab.com/eoq/py/pyeoq
Author
2024 Bjoern Annighoefer
Release files for eoq3 3.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| eoq3-3.1.0.tar.gz | 119.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| eoq3-3.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 265.2 kB
Release files / eoq3-3.1.0.tar.gz
| Download URL | eoq3-3.1.0.tar.gz |
|---|---|
| Size | 119.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5b9847936ea74505828252a2da5284cac950b80b96741cfdcb6ee7cced985126
|
|
BLAKE2b-256 checksum How to use checksums |
74c23d3af9e43b5649b9b85730a727465518b43ed4a360eec393e2fafeef25c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / eoq3-3.1.0-py3-none-any.whl
| Download URL | eoq3-3.1.0-py3-none-any.whl |
|---|---|
| Size | 146.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
99b9f2242fa9a110ad1f30db87feae20aebbe3b0a9cd550771f9f71ebb976d0f
|
|
BLAKE2b-256 checksum How to use checksums |
661fd86b592c3b46046b0c163de1446a065fd1aff596faad39f8db916e21ed93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|