nexedi issueshttps://lab.nexedi.com/groups/nexedi/-/issues2020-04-01T06:32:33Zhttps://lab.nexedi.com/nexedi/dream/-/issues/4Dynamic version of JobShop without specific routes2020-04-01T06:32:33ZGhost UserDynamic version of JobShop without specific routesHi,
I am trying to model a JobShop similar system, where the jobs do not belong to a route, but to technologies. These technologies are implemented in a customized machine class (called FlexibleMachine in the code). The jobs are implemented through a class called CustomJob.
Before each machine, a (custom) queue is linked to the machine (so that a queue is always the predecessor of a machine). Now, all jobs are of type 'part', because the ManPy JobShop Jobs cannot be used for my purpose and I do not want to change something in the source code of ManPy to add a new type of objects. Every job has a list of technologies that the job needs and a list of remaining technologies. (See class CustomJob)
The main difference to the ManPy source code are the updateNext methods of the custom machine and the custom queue classes (class names: FlexibleMachine and FlexibleQueue). In the update next method, the custom machine is looking if the activeEntity (a job) needs to fulfill remaining technologies through the remainingTechnologies list. If yes, the current machine is looking for machines that can provide the needed technologies. If the machine has found one, the linked queue is appended to the next list.
If not, all technologies were fulfilled and the Exit (realized through FlexibleExit) is appended to the next list.
In the FlexibleQueues updateNext-method, only the machine that is linked to the preceding queue is appended to the next list.
Now my problem: If I change the capacity of a queue, so that it is "full" at a specific time, the system and the simulation stop working, when a job, which has just been created in the source, wants to get in this specific full queue. At this moment, the source falls into a continuous loop in the run method of the EntityGenerator until the maxSimTime is reached.
I attached the code, maybe you can find the error in my custom code.
[CustomJobShop_v09_ms_wip_minimal.py](/uploads/9c62c3aebfdad3c1ca3f7f04cdda8306/CustomJobShop_v09_ms_wip_minimal.py)Hi,
I am trying to model a JobShop similar system, where the jobs do not belong to a route, but to technologies. These technologies are implemented in a customized machine class (called FlexibleMachine in the code). The jobs are implemented through a class called CustomJob.
Before each machine, a (custom) queue is linked to the machine (so that a queue is always the predecessor of a machine). Now, all jobs are of type 'part', because the ManPy JobShop Jobs cannot be used for my purpose and I do not want to change something in the source code of ManPy to add a new type of objects. Every job has a list of technologies that the job needs and a list of remaining technologies. (See class CustomJob)
The main difference to the ManPy source code are the updateNext methods of the custom machine and the custom queue classes (class names: FlexibleMachine and FlexibleQueue). In the update next method, the custom machine is looking if the activeEntity (a job) needs to fulfill remaining technologies through the remainingTechnologies list. If yes, the current machine is looking for machines that can provide the needed technologies. If the machine has found one, the linked queue is appended to the next list.
If not, all technologies were fulfilled and the Exit (realized through FlexibleExit) is appended to the next list.
In the FlexibleQueues updateNext-method, only the machine that is linked to the preceding queue is appended to the next list.
Now my problem: If I change the capacity of a queue, so that it is "full" at a specific time, the system and the simulation stop working, when a job, which has just been created in the source, wants to get in this specific full queue. At this moment, the source falls into a continuous loop in the run method of the EntityGenerator until the maxSimTime is reached.
I attached the code, maybe you can find the error in my custom code.
[CustomJobShop_v09_ms_wip_minimal.py](/uploads/9c62c3aebfdad3c1ca3f7f04cdda8306/CustomJobShop_v09_ms_wip_minimal.py)https://lab.nexedi.com/nexedi/neoppod/-/issues/2Python 3 support2020-03-17T10:38:28ZGhost UserPython 3 supportHello.
My company is looking for performant ZEO alternatives, but we cannot give NEO a try because of its lack of python 3 support. So I wanted to ask you: is python 3 support is planed?
Cheers,
ÉloiHello.
My company is looking for performant ZEO alternatives, but we cannot give NEO a try because of its lack of python 3 support. So I wanted to ask you: is python 3 support is planed?
Cheers,
Éloihttps://lab.nexedi.com/nexedi/wendelin.core/-/issues/2just created ZBigArray cannot be used before transaction.commit()2023-01-02T19:14:11ZIvan Tyagovjust created ZBigArray cannot be used before transaction.commit()I tried fresh new tutorial (in same machine as NEO install, https://www.nexedi.com/wendelin-Core.Tutorial.2016)
It fails now with this below.
```
ivan@neo:~$ virtualenv test
ivan@neo:~$ . test/bin/activate
(test) ivan@neo:~$ pip list
pip (8.1.2)
setuptools (24.0.3)
wheel (0.29.0)
(test) ivan@neo:~$ pip install 'ZODB<4.4.0dev' wendelin.core
(test) ivan@neo:~$ pip list
BTrees (4.3.1)
futures (3.0.5)
numpy (1.11.1)
persistent (4.2.1)
pip (8.1.2)
psutil (4.3.0)
setuptools (24.0.3)
six (1.10.0)
transaction (1.6.1)
trollius (2.1)
wendelin.core (0.7)
wheel (0.29.0)
zc.lockfile (1.2.1)
ZConfig (3.1.0)
zdaemon (4.1.0)
ZEO (5.0.0a0)
ZODB (4.3.1)
ZODB3 (3.11.0)
zodbpickle (0.6.0)
zope.interface (4.2.0)
(test) ivan@neo:~$ pip install ipython
(test) ivan@neo:~$ pip install neoppod[client]
(test) ivan@neo:~$ ipython
Python 2.7.9 (default, Mar 1 2015, 12:57:24)
Type "copyright", "credits" or "license" for more information.
IPython 5.0.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: from wendelin.bigarray.array_zodb import ZBigArray
...: from wendelin.lib.zodb import dbopen, dbclose
...: import transaction
...: import numpy as np
In [2]: root = dbopen('neo://XXXX@[XXXXX]:2051')
In [3]: root['A'] = A = ZBigArray((10,), np.int)
In [4]: for i in range(2):
...: A.append( np.arange(4*1024*1024) )
...: print i, A.shape
...: transaction.commit()
...:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-4-d270ca8db4df> in <module>()
1 for i in range(2):
----> 2 A.append( np.arange(4*1024*1024) )
3 print i, A.shape
4 transaction.commit()
5
/home/ivan/test/local/lib/python2.7/site-packages/wendelin/bigarray/__init__.pyc in append(self, values)
230 delta_idx = [slice(None)] * len(self.shape)
231 delta_idx[M] = slice(-delta, None)
--> 232 self[tuple(delta_idx)] = values
233 except:
234 # in case of error - rollback the resize and re-raise
/home/ivan/test/local/lib/python2.7/site-packages/wendelin/bigarray/__init__.pyc in __setitem__(self, idx, v)
423
424 # represent changed area by ndarray via getitem, then leverage ndarray assignment
--> 425 a = self.__getitem__(idx)
426 a[:] = v
427
/home/ivan/test/local/lib/python2.7/site-packages/wendelin/bigarray/__init__.pyc in __getitem__(self, idx)
394
395 # ~~~ mmap file part corresponding to full major slice into memory
--> 396 vmaM = self._fileh.mmap(pageM_min, pageM_max-pageM_min+1)
397
398
/home/ivan/test/local/lib/python2.7/site-packages/wendelin/bigarray/array_zodb.pyc in _fileh(self)
87 def _fileh(self):
88 if self._v_fileh is None:
---> 89 self._v_fileh = self.zfile.fileh_open()
90 return self._v_fileh
/home/ivan/test/local/lib/python2.7/site-packages/wendelin/bigfile/file_zodb.pyc in fileh_open(self)
512 # bigfile-like
513 def fileh_open(self):
--> 514 fileh = _ZBigFileH(self)
515 self._v_filehset.add(fileh)
516 return fileh
/home/ivan/test/local/lib/python2.7/site-packages/wendelin/bigfile/file_zodb.pyc in __init__(self, zfile)
599
600 # IDataManager requires .transaction_manager
--> 601 self.transaction_manager = zfile._p_jar.transaction_manager
602
603 # when connection will be reopened -> txn_manager.registerSynch(self)
AttributeError: 'NoneType' object has no attribute 'transaction_manager'
(test) ivan@neo:~$ pip list
backports.shutil-get-terminal-size (1.0.0)
BTrees (4.3.1)
decorator (4.0.10)
futures (3.0.5)
ipython (5.0.0)
ipython-genutils (0.1.0)
neoppod (1.6.3)
numpy (1.11.1)
pathlib2 (2.1.0)
persistent (4.2.1)
pexpect (4.2.0)
pickleshare (0.7.2)
pip (8.1.2)
prompt-toolkit (1.0.3)
psutil (4.3.0)
ptyprocess (0.5.1)
Pygments (2.1.3)
setuptools (24.0.3)
simplegeneric (0.8.1)
six (1.10.0)
traitlets (4.2.2)
transaction (1.6.1)
trollius (2.1)
wcwidth (0.1.7)
wendelin.core (0.7)
wheel (0.29.0)
zc.lockfile (1.2.1)
ZConfig (3.1.0)
zdaemon (4.1.0)
ZEO (5.0.0a0)
ZODB (4.3.1)
ZODB3 (3.11.0)
zodbpickle (0.6.0)
zope.interface (4.2.0)
```I tried fresh new tutorial (in same machine as NEO install, https://www.nexedi.com/wendelin-Core.Tutorial.2016)
It fails now with this below.
```
ivan@neo:~$ virtualenv test
ivan@neo:~$ . test/bin/activate
(test) ivan@neo:~$ pip list
pip (8.1.2)
setuptools (24.0.3)
wheel (0.29.0)
(test) ivan@neo:~$ pip install 'ZODB<4.4.0dev' wendelin.core
(test) ivan@neo:~$ pip list
BTrees (4.3.1)
futures (3.0.5)
numpy (1.11.1)
persistent (4.2.1)
pip (8.1.2)
psutil (4.3.0)
setuptools (24.0.3)
six (1.10.0)
transaction (1.6.1)
trollius (2.1)
wendelin.core (0.7)
wheel (0.29.0)
zc.lockfile (1.2.1)
ZConfig (3.1.0)
zdaemon (4.1.0)
ZEO (5.0.0a0)
ZODB (4.3.1)
ZODB3 (3.11.0)
zodbpickle (0.6.0)
zope.interface (4.2.0)
(test) ivan@neo:~$ pip install ipython
(test) ivan@neo:~$ pip install neoppod[client]
(test) ivan@neo:~$ ipython
Python 2.7.9 (default, Mar 1 2015, 12:57:24)
Type "copyright", "credits" or "license" for more information.
IPython 5.0.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: from wendelin.bigarray.array_zodb import ZBigArray
...: from wendelin.lib.zodb import dbopen, dbclose
...: import transaction
...: import numpy as np
In [2]: root = dbopen('neo://XXXX@[XXXXX]:2051')
In [3]: root['A'] = A = ZBigArray((10,), np.int)
In [4]: for i in range(2):
...: A.append( np.arange(4*1024*1024) )
...: print i, A.shape
...: transaction.commit()
...:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-4-d270ca8db4df> in <module>()
1 for i in range(2):
----> 2 A.append( np.arange(4*1024*1024) )
3 print i, A.shape
4 transaction.commit()
5
/home/ivan/test/local/lib/python2.7/site-packages/wendelin/bigarray/__init__.pyc in append(self, values)
230 delta_idx = [slice(None)] * len(self.shape)
231 delta_idx[M] = slice(-delta, None)
--> 232 self[tuple(delta_idx)] = values
233 except:
234 # in case of error - rollback the resize and re-raise
/home/ivan/test/local/lib/python2.7/site-packages/wendelin/bigarray/__init__.pyc in __setitem__(self, idx, v)
423
424 # represent changed area by ndarray via getitem, then leverage ndarray assignment
--> 425 a = self.__getitem__(idx)
426 a[:] = v
427
/home/ivan/test/local/lib/python2.7/site-packages/wendelin/bigarray/__init__.pyc in __getitem__(self, idx)
394
395 # ~~~ mmap file part corresponding to full major slice into memory
--> 396 vmaM = self._fileh.mmap(pageM_min, pageM_max-pageM_min+1)
397
398
/home/ivan/test/local/lib/python2.7/site-packages/wendelin/bigarray/array_zodb.pyc in _fileh(self)
87 def _fileh(self):
88 if self._v_fileh is None:
---> 89 self._v_fileh = self.zfile.fileh_open()
90 return self._v_fileh
/home/ivan/test/local/lib/python2.7/site-packages/wendelin/bigfile/file_zodb.pyc in fileh_open(self)
512 # bigfile-like
513 def fileh_open(self):
--> 514 fileh = _ZBigFileH(self)
515 self._v_filehset.add(fileh)
516 return fileh
/home/ivan/test/local/lib/python2.7/site-packages/wendelin/bigfile/file_zodb.pyc in __init__(self, zfile)
599
600 # IDataManager requires .transaction_manager
--> 601 self.transaction_manager = zfile._p_jar.transaction_manager
602
603 # when connection will be reopened -> txn_manager.registerSynch(self)
AttributeError: 'NoneType' object has no attribute 'transaction_manager'
(test) ivan@neo:~$ pip list
backports.shutil-get-terminal-size (1.0.0)
BTrees (4.3.1)
decorator (4.0.10)
futures (3.0.5)
ipython (5.0.0)
ipython-genutils (0.1.0)
neoppod (1.6.3)
numpy (1.11.1)
pathlib2 (2.1.0)
persistent (4.2.1)
pexpect (4.2.0)
pickleshare (0.7.2)
pip (8.1.2)
prompt-toolkit (1.0.3)
psutil (4.3.0)
ptyprocess (0.5.1)
Pygments (2.1.3)
setuptools (24.0.3)
simplegeneric (0.8.1)
six (1.10.0)
traitlets (4.2.2)
transaction (1.6.1)
trollius (2.1)
wcwidth (0.1.7)
wendelin.core (0.7)
wheel (0.29.0)
zc.lockfile (1.2.1)
ZConfig (3.1.0)
zdaemon (4.1.0)
ZEO (5.0.0a0)
ZODB (4.3.1)
ZODB3 (3.11.0)
zodbpickle (0.6.0)
zope.interface (4.2.0)
```Kirill Smelkovkirr@nexedi.comKirill Smelkovkirr@nexedi.com