ModelFlowIb 2.59__tar.gz → 2.61__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {modelflowib-2.59 → modelflowib-2.61}/ModelFlowIb.egg-info/PKG-INFO +1 -1
- {modelflowib-2.59 → modelflowib-2.61}/PKG-INFO +1 -1
- {modelflowib-2.59 → modelflowib-2.61}/model_latex_class.py +6 -6
- {modelflowib-2.59 → modelflowib-2.61}/modelclass.py +5 -3
- {modelflowib-2.59 → modelflowib-2.61}/modeldashsidebar.py +3 -3
- {modelflowib-2.59 → modelflowib-2.61}/modelreport.py +3 -2
- {modelflowib-2.59 → modelflowib-2.61}/pyproject.toml +1 -1
- {modelflowib-2.59 → modelflowib-2.61}/ModelFlowIb.egg-info/SOURCES.txt +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/ModelFlowIb.egg-info/dependency_links.txt +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/ModelFlowIb.egg-info/requires.txt +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/ModelFlowIb.egg-info/top_level.txt +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modelBLfunk.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/model_Excel.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/model_cvx.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/model_doable.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/model_dynare.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/model_financial_stability.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/model_ifrs9.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/model_latex.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/model_run_numba.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modelclass2.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modeldash.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modeldashboot.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modeldekom.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modeldiff.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modeldisplay.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modelfeedback.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modelgrab.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modelgrabwf2.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modelhelp.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modelinvert.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modeljupyter.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modeljupytermagic.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modelmacrograb.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modelmanipulation.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modelmf.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modelnet.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modelnewton.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modelnormalize.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modelpattern.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modelpatternrev.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modelsandbox.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modelsandbox_Mixin.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modeltodo.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modeluserfunk.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modeluserfunk_old.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modelvis.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modelwidget.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modelwidget_input.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/modelwidget_shinypy.py +0 -0
- {modelflowib-2.59 → modelflowib-2.61}/setup.cfg +0 -0
|
@@ -185,7 +185,7 @@ def defunk(funk, subs , streng,startp='{',slutp='}'):
|
|
|
185
185
|
def findindex(ind):
|
|
186
186
|
''' find the index variables on the left hand side. meaning variables braced by {} '''
|
|
187
187
|
lhs=ind.split('=')[0]
|
|
188
|
-
return re.findall('\{([A-Za-z][\w]*)\}',lhs ) # all the index variables
|
|
188
|
+
return re.findall(r'\{([A-Za-z][\w]*)\}',lhs ) # all the index variables
|
|
189
189
|
|
|
190
190
|
def doableold(ind,show=False):
|
|
191
191
|
''' find all dimensions in the left hand side of = and and decorate with the nessecary do .. enddo '''
|
|
@@ -230,7 +230,7 @@ def findallindex(ind0):
|
|
|
230
230
|
|
|
231
231
|
this function find frmlname and index variables on the left hand side. meaning variables braced by {} '''
|
|
232
232
|
if ind0.startswith('<'):
|
|
233
|
-
frmlname = re.findall('\<.*?\>',ind0)[0]
|
|
233
|
+
frmlname = re.findall(r'\<.*?\>',ind0)[0]
|
|
234
234
|
ind = ind0[ind0.index('>')+1:].strip()
|
|
235
235
|
else:
|
|
236
236
|
frmlname='<>'
|
|
@@ -247,7 +247,7 @@ def findallindex(ind0):
|
|
|
247
247
|
rest = ind.strip()
|
|
248
248
|
|
|
249
249
|
lhs=rest.split('=')[0]
|
|
250
|
-
do_indicies = re.findall('__\{([A-Za-z][\w]*)\}',lhs ) # all the index variables
|
|
250
|
+
do_indicies = re.findall(r'__\{([A-Za-z][\w]*)\}',lhs ) # all the index variables
|
|
251
251
|
|
|
252
252
|
do_indicies_dict = {ind : all_do_condition.get(ind) for ind in do_indicies}
|
|
253
253
|
|
|
@@ -446,12 +446,12 @@ Raises:
|
|
|
446
446
|
r'\s*\\times\s*':'*' ,
|
|
447
447
|
r'\s*\\cdot\s*':'*' ,
|
|
448
448
|
r'\\text{\[([\w+-,.]+)\]}' : r'[\1]',
|
|
449
|
-
r'\\sum_{('+pt.namepat+')}\(' : r'sum(\1,',
|
|
449
|
+
r'\\sum_{('+pt.namepat+r')}\(' : r'sum(\1,',
|
|
450
450
|
r"\\sum_{([a-zA-Z][a-zA-Z0-9_]*)=([a-zA-Z][a-zA-Z0-9_]*)}\(": r'sum(\1 \2=1,',
|
|
451
451
|
|
|
452
|
-
r'\\max_{('+pt.namepat+')}\(' : r'lmax(\1,',
|
|
452
|
+
r'\\max_{('+pt.namepat+r')}\(' : r'lmax(\1,',
|
|
453
453
|
r"\\max_{([a-zA-Z][a-zA-Z0-9_]*)=([a-zA-Z][a-zA-Z0-9_]*)}\(": r'lmax(\1 \2=1,',
|
|
454
|
-
r'\\min_{('+pt.namepat+')}\(' : r'lmin(\1,',
|
|
454
|
+
r'\\min_{('+pt.namepat+r')}\(' : r'lmin(\1,',
|
|
455
455
|
r"\\min_{([a-zA-Z][a-zA-Z0-9_]*)=([a-zA-Z][a-zA-Z0-9_]*)}\(": r'lmin(\1 \2=1,',
|
|
456
456
|
|
|
457
457
|
}
|
|
@@ -3426,14 +3426,16 @@ class Graph_Mixin():
|
|
|
3426
3426
|
this = self.endograph.copy()
|
|
3427
3427
|
|
|
3428
3428
|
while True:
|
|
3429
|
-
new = [v for v, indegree in this.in_degree() if indegree == 0]
|
|
3429
|
+
new = sorted( [v for v, indegree in this.in_degree() if indegree == 0])
|
|
3430
3430
|
if len(new) == 0:
|
|
3431
3431
|
break
|
|
3432
|
+
# print(f'new = {new}')
|
|
3432
3433
|
self._prevar = self._prevar+new
|
|
3433
3434
|
this.remove_nodes_from(new)
|
|
3434
|
-
|
|
3435
|
+
# print(f'self._prevar = {self._prevar}')
|
|
3436
|
+
|
|
3435
3437
|
while True:
|
|
3436
|
-
new = [v for v, outdegree in this.out_degree() if outdegree == 0]
|
|
3438
|
+
new = sorted([v for v, outdegree in this.out_degree() if outdegree == 0])
|
|
3437
3439
|
if len(new) == 0:
|
|
3438
3440
|
break
|
|
3439
3441
|
self._epivar = new + self._epivar
|
|
@@ -123,14 +123,14 @@ def app_run(app,jupyter=False,debug=False,port=5000,inline=False):
|
|
|
123
123
|
# print(f'{jupyter=} {inline=}')
|
|
124
124
|
if jupyter:
|
|
125
125
|
if inline:
|
|
126
|
-
xx = app.
|
|
126
|
+
xx = app.run(debug=debug,port=port,mode='inline')
|
|
127
127
|
else:
|
|
128
128
|
if first_call or 1:
|
|
129
129
|
Timer(1, open_browser).start()
|
|
130
130
|
first_call = False
|
|
131
131
|
# print('ko')
|
|
132
132
|
|
|
133
|
-
xx =app.
|
|
133
|
+
xx =app.run(debug=debug,port=port,jupyter_mode='external')
|
|
134
134
|
# print('gris')
|
|
135
135
|
|
|
136
136
|
# print(f'{xx=}')
|
|
@@ -138,7 +138,7 @@ def app_run(app,jupyter=False,debug=False,port=5000,inline=False):
|
|
|
138
138
|
else:
|
|
139
139
|
Timer(1, open_browser).start()
|
|
140
140
|
|
|
141
|
-
xx = app.
|
|
141
|
+
xx = app.run(debug=debug,port=port,mode="external")
|
|
142
142
|
|
|
143
143
|
|
|
144
144
|
|
|
@@ -556,8 +556,9 @@ class DisplayDef:
|
|
|
556
556
|
try:
|
|
557
557
|
repo = LatexRepo(self.latex ,name=self.name)
|
|
558
558
|
return repo.pdf(pdfopen,show,width,height,typesetter)
|
|
559
|
-
except:
|
|
560
|
-
|
|
559
|
+
except Exception as e:
|
|
560
|
+
print(f"⚠️ Warning: PDF generation failed: {e}")
|
|
561
|
+
return None
|
|
561
562
|
|
|
562
563
|
def __add__(self, other):
|
|
563
564
|
"""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|