|
@@ -29,7 +29,7 @@ class model:
|
|
|
except KeyError:
|
|
|
return 's'
|
|
|
|
|
|
- def bind(self,src,target,qName,pcName,useVolume=0):
|
|
|
+ def bind(self,src,target,qName,pcName):
|
|
|
|
|
|
|
|
|
#establish a flow from source compartment to the target
|
|
@@ -37,7 +37,7 @@ class model:
|
|
|
#the source equation (where we subtract the current)
|
|
|
#in fact, this is the diagonal element
|
|
|
#get volume names
|
|
|
- srcVName=self.getVolumePar(src,useVolume)
|
|
|
+ srcVName=self.getVolumePar(src)
|
|
|
#generate coupling object (w/derivatives)
|
|
|
pSrc=self.couplingObject(-1,qName,pcName,srcVName)
|
|
|
#this includes derivatives and value!
|
|
@@ -49,7 +49,7 @@ class model:
|
|
|
|
|
|
#the target equation (where we add the current)
|
|
|
#get volume names
|
|
|
- targetVName=self.getVolumePar(target,useVolume)
|
|
|
+ targetVName=self.getVolumePar(target)
|
|
|
#generate coupling object
|
|
|
pTarget=self.couplingObject(1,qName,pcName,targetVName)
|
|
|
#equation is for target compartment, but binding for source
|
|
@@ -98,11 +98,9 @@ class model:
|
|
|
#derivatives is the combination of the above
|
|
|
|
|
|
|
|
|
- def getVolumePar(self,compartment,useVolume=1):
|
|
|
+ def getVolumePar(self,compartment):
|
|
|
#returnis volume name, if found and useVolume is directed,
|
|
|
#or a standard parameter one
|
|
|
- if not useVolume:
|
|
|
- return "one"
|
|
|
try:
|
|
|
return self.mod["volumes"][compartment]
|
|
|
#parV=self.mod["parameters"][parVName]
|
|
@@ -286,7 +284,6 @@ class model:
|
|
|
for b in self.mod['bindings']['diffusion']:
|
|
|
#whether to scale transfer constants to organ volume
|
|
|
#default is true, but changing here will assume no scaling
|
|
|
- useVolume=1
|
|
|
comps=b.split('->')
|
|
|
try:
|
|
|
pcParName=self.mod['partitionCoefficients'][b]
|
|
@@ -295,7 +292,7 @@ class model:
|
|
|
|
|
|
kParName=self.mod['bindings']['diffusion'][b]
|
|
|
#operate with names to allow for value/function/derived infrastructure
|
|
|
- self.bind(comps[0],comps[1],kParName,pcParName,useVolume)
|
|
|
+ self.bind(comps[0],comps[1],kParName,pcParName)
|
|
|
|
|
|
for q in self.mod['bindings']['flow']:
|
|
|
comps=q.split('->')
|
|
@@ -318,7 +315,7 @@ class model:
|
|
|
flowParName=self.mod['flows'][qName]
|
|
|
#flowPar=pars[flowParName]
|
|
|
|
|
|
- self.bind(cs,ct,flowParName,pcParName,1)
|
|
|
+ self.bind(cs,ct,flowParName,pcParName)
|
|
|
|
|
|
self.build()
|
|
|
|