Skip to content

Commit

Permalink
Merge branch 'climateinteractive#377' into eps
Browse files Browse the repository at this point in the history
  • Loading branch information
ToddFincannonEI committed Dec 5, 2023
2 parents 2e8c05e + cdf24d7 commit 806b3be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/compile/src/model/equation-reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ export default class EquationReader extends ModelReader {
// that Vensim requires for ALLOCATE AVAILABLE. This is required to get correct dependencies.
let ptypeRefId = this.expandedRefIds[0]
let { subscripts } = Model.splitRefId(ptypeRefId)
let ptypeIndexName = subscripts[1]
// The priority subscript is the last one in the profile argument.
let ptypeIndexName = subscripts[subscripts.length - 1]
let profileElementsDimName = sub(ptypeIndexName).family
let profileElementsDim = sub(profileElementsDimName)
let priorityRefId = ptypeRefId.replace(ptypeIndexName, profileElementsDim.value[1])
Expand Down

0 comments on commit 806b3be

Please sign in to comment.