Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » Output based on current and previous input values
Output based on current and previous input values [message #776473] Sun, 08 January 2012 14:06 Go to next message
André van Schoubroeck is currently offline André van SchoubroeckFriend
Messages: 1
Registered: January 2012
Junior Member
What I have now is a simple transformation where one object in the source corresponds with one object in the destination, and this is rather straight forwards.

However, I wish to keep a memory of the previous input, as I wish to convert an absolute input to a relative output. I have been googling around the website but I haven't found any clue how to do this yet.


I will write a small example to clarify the meaning of my question

Simplified example input
<object value="5"/>
<object value="6"/>
<object value="8"/>
<object value="16"/>


Simplified example output
<difference value ="5"/>
<difference value ="1"/>
<difference value ="2"/>
<difference value ="8"/>


So... I wish to use the current and the previous object (input) to calculate the difference (output)

Re: Output based on current and previous input values [message #776514 is a reply to message #776473] Sun, 08 January 2012 16:43 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4189
Registered: July 2009
Senior Member
Hi

Use a two input transformation, one new, one old.

Regards

Ed Willink


On 08/01/2012 14:06, André van Schoubroeck wrote:
> What I have now is a simple transformation where one object in the
> source corresponds with one object in the destination, and this is
> rather straight forwards.
>
> However, I wish to keep a memory of the previous input, as I wish to
> convert an absolute input to a relative output. I have been googling
> around the website but I haven't found any clue how to do this yet.
>
>
> I will write a small example to clarify the meaning of my question
>
> Simplified example input
>
> <object value="5"/>
> <object value="6"/>
> <object value="8"/>
> <object value="16"/>
>
>
> Simplified example output
>
> <difference value ="5"/>
> <difference value ="1"/>
> <difference value ="2"/>
> <difference value ="8"/>
>
>
> So... I wish to use the current and the previous object (input) to
> calculate the difference (output)
>
>
Previous Topic:[QVTo] Unit not found while executing qvto in own application
Next Topic:Plugin For Qvto Transformation
Goto Forum:
  


Current Time: Tue Dec 23 04:36:15 GMT 2014

Powered by FUDForum. Page generated in 0.01560 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software