We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.

Ansys Learning Forum Forums Discuss Simulation Embedded Software Does mapfoldwi need matching input and output accumulators on both sides? Reply To: Does mapfoldwi need matching input and output accumulators on both sides?

mmeiler
Subscriber
Hi as depicted below you need to have a certain inputs and outputs to your inner operator for a MapFoldwi iterator depending on the number of acculumators specified. (default: 1 accumulator)

In this example sketched above it is assumed that you want to have
2 accumulators and
2 input arrays as well as
1 output array
for your MapFoldwi iterator.
Then your inner operator needs to have the following inputs and outputs:
Inputs
i (index) integer-type
acc1_in (1st accumulator) pre or user defined datatype 1
acc2_in (2nd accumulator) pre or user defined datatype 2
Element (1st input array) pre or user defined datatype 3
Element (2nd input array) pre or user defined datatype 4
Outputs
continue (continue condition) bool
acc1_out (1st accumulator output) pre or user defined datatype 1
acc2_out (2nd accumulator output) pre or user defined datatype 2
Element (1st output array) pre or user defined datatype 5
I think that there might be a mismatch of your input/output structure of the inner operator. But in order to check this more information would need to be provided by you, at least the input/output structure of you inner operator.
Please also refer to the SCADE User Manual -> Designing with Iterators -> Definition for MapFoldwi Iteration Pattern.
Best regards
Martin