We are modeling various industrial component blocks, with each having CAPEX, labour cost, maintenance cost, total OPEX, etc. We would like to have 1 block, in the best case not wired to the other blocks, to account for the total OPEX, total CAPEX, total labour costs, etc. induced by the blocks present in a model : the number of blocks is not fixed. Is there a way of not connecting the blocks with a wire ?
In case there is no way, we found the solution of using the RealOutput y vector, as defined in Modelica.Blocks.Interfaces.MO : nout is defined as the number of actual variables we would like to add up (e.g. if CAPEX, OPEX and maintenance are of interest, then nout = n = 3). However, we struggle for 2 points :
- How can we pass a matrix through this RealOutput ? This would be useful for instance when the CAPEX has 3 values : estimated, optimistic and pessimistic.
- How can we take up this y in only 1 block ? For now we managed to use n Modelica.Blocks.Math.MultiSum blocks to take up each variable separately, but is there a way of adding them up respectively, but in the same block ?
Thank you already for your much appreciated help and answers !