{"id":156081,"date":"2022-06-03T13:43:28","date_gmt":"2022-06-03T13:43:28","guid":{"rendered":"\/knowledge\/forums\/topic\/algorithm-choice-generic-implementation-design-a-median-with-ansys-scade-part-3-of-6\/"},"modified":"2022-06-03T13:43:28","modified_gmt":"2022-06-03T13:43:28","slug":"algorithm-choice-generic-implementation-design-a-median-with-ansys-scade-part-3-of-6","status":"publish","type":"topic","link":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/algorithm-choice-generic-implementation-design-a-median-with-ansys-scade-part-3-of-6\/","title":{"rendered":"Algorithm Choice, Generic Implementation &#8211; Design a Median with ANSYS SCADE (Part 3 of 6)"},"content":{"rendered":"<p>In the previous two videos, we have defined a generic interface for the median operator. In this video, the third in a series of six, to provide a generic implementation, we first need to find a good algorithm.The properties to look at when implementing a safety critical algorithm usually are the low complexity and the Controlled Worst Case Execution Time (WCET) to ensure good performance of our ANSYS SCADE design. We try to reduce or avoid modifications of large structures. We will use the Torben&#8217;s algorithm to create our median algorithm. We will explain it and implement it in ANSYS SCADE. For that, we will use a fold iterator.<br \/>\n<iframe loading=\"lazy\" title=\"Algorithm Choice, Generic Implementation - Design a Median with ANSYS SCADE (Part 3 of 6)\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/RBwMIA5l3X8?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n","protected":false},"template":"","class_list":["post-156081","topic","type-topic","status-publish","hentry","topic-tag-ansys","topic-tag-control-systems","topic-tag-designing-embedded-systems","topic-tag-embedded-software","topic-tag-embedded-systems","topic-tag-embedded-systems-programming","topic-tag-esterel-technologies","topic-tag-how-to","topic-tag-model-based-systems-engineering","topic-tag-safety-critical-applications","topic-tag-safety-critical-software","topic-tag-scade","topic-tag-scade-project","topic-tag-scade-tutorial"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"In the previous two videos, we have defined a generic interface for the median operator. In this video, the third in a series of six, to provide a generic implementation, we first need to find a good algorithm.The properties to look at when implementing a safety critical algorithm usually are the low complexity and the\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/algorithm-choice-generic-implementation-design-a-median-with-ansys-scade-part-3-of-6\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Ansys Knowledge | Ansys Innovation Space\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Algorithm Choice, Generic Implementation \u2013 Design a Median with ANSYS SCADE (Part 3 of 6) | Ansys Knowledge\" \/>\n\t\t<meta property=\"og:description\" content=\"In the previous two videos, we have defined a generic interface for the median operator. In this video, the third in a series of six, to provide a generic implementation, we first need to find a good algorithm.The properties to look at when implementing a safety critical algorithm usually are the low complexity and the\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/algorithm-choice-generic-implementation-design-a-median-with-ansys-scade-part-3-of-6\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2022-06-03T13:43:28+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-06-03T13:43:28+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Algorithm Choice, Generic Implementation \u2013 Design a Median with ANSYS SCADE (Part 3 of 6) | Ansys Knowledge\" \/>\n\t\t<meta name=\"twitter:description\" content=\"In the previous two videos, we have defined a generic interface for the median operator. In this video, the third in a series of six, to provide a generic implementation, we first need to find a good algorithm.The properties to look at when implementing a safety critical algorithm usually are the low complexity and the\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/algorithm-choice-generic-implementation-design-a-median-with-ansys-scade-part-3-of-6\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/topics\\\/#listItem\",\"name\":\"Topics\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/topics\\\/#listItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/topics\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic-tag\\\/ansys\\\/#listItem\",\"name\":\"ansys\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic-tag\\\/ansys\\\/#listItem\",\"position\":3,\"name\":\"ansys\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic-tag\\\/ansys\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/algorithm-choice-generic-implementation-design-a-median-with-ansys-scade-part-3-of-6\\\/#listItem\",\"name\":\"Algorithm Choice, Generic Implementation &#8211; Design a Median with ANSYS SCADE (Part 3 of 6)\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/topics\\\/#listItem\",\"name\":\"Topics\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/algorithm-choice-generic-implementation-design-a-median-with-ansys-scade-part-3-of-6\\\/#listItem\",\"position\":4,\"name\":\"Algorithm Choice, Generic Implementation &#8211; Design a Median with ANSYS SCADE (Part 3 of 6)\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic-tag\\\/ansys\\\/#listItem\",\"name\":\"ansys\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/#organization\",\"name\":\"Ansys Knowledge\",\"description\":\"Ansys Innovation Space\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/algorithm-choice-generic-implementation-design-a-median-with-ansys-scade-part-3-of-6\\\/#webpage\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/algorithm-choice-generic-implementation-design-a-median-with-ansys-scade-part-3-of-6\\\/\",\"name\":\"Algorithm Choice, Generic Implementation \\u2013 Design a Median with ANSYS SCADE (Part 3 of 6) | Ansys Knowledge\",\"description\":\"In the previous two videos, we have defined a generic interface for the median operator. In this video, the third in a series of six, to provide a generic implementation, we first need to find a good algorithm.The properties to look at when implementing a safety critical algorithm usually are the low complexity and the\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/algorithm-choice-generic-implementation-design-a-median-with-ansys-scade-part-3-of-6\\\/#breadcrumblist\"},\"datePublished\":\"2022-06-03T13:43:28+00:00\",\"dateModified\":\"2022-06-03T13:43:28+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/#website\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/\",\"name\":\"Ansys Knowledge\",\"description\":\"Ansys Innovation Space\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Algorithm Choice, Generic Implementation \u2013 Design a Median with ANSYS SCADE (Part 3 of 6) | Ansys Knowledge","description":"In the previous two videos, we have defined a generic interface for the median operator. In this video, the third in a series of six, to provide a generic implementation, we first need to find a good algorithm.The properties to look at when implementing a safety critical algorithm usually are the low complexity and the","canonical_url":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/algorithm-choice-generic-implementation-design-a-median-with-ansys-scade-part-3-of-6\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/algorithm-choice-generic-implementation-design-a-median-with-ansys-scade-part-3-of-6\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge#listItem","position":1,"name":"Home","item":"https:\/\/innovationspace.ansys.com\/knowledge","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/#listItem","name":"Topics"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/#listItem","position":2,"name":"Topics","item":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/ansys\/#listItem","name":"ansys"},"previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/ansys\/#listItem","position":3,"name":"ansys","item":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/ansys\/","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/algorithm-choice-generic-implementation-design-a-median-with-ansys-scade-part-3-of-6\/#listItem","name":"Algorithm Choice, Generic Implementation &#8211; Design a Median with ANSYS SCADE (Part 3 of 6)"},"previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/#listItem","name":"Topics"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/algorithm-choice-generic-implementation-design-a-median-with-ansys-scade-part-3-of-6\/#listItem","position":4,"name":"Algorithm Choice, Generic Implementation &#8211; Design a Median with ANSYS SCADE (Part 3 of 6)","previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/ansys\/#listItem","name":"ansys"}}]},{"@type":"Organization","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/#organization","name":"Ansys Knowledge","description":"Ansys Innovation Space","url":"https:\/\/innovationspace.ansys.com\/knowledge\/"},{"@type":"WebPage","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/algorithm-choice-generic-implementation-design-a-median-with-ansys-scade-part-3-of-6\/#webpage","url":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/algorithm-choice-generic-implementation-design-a-median-with-ansys-scade-part-3-of-6\/","name":"Algorithm Choice, Generic Implementation \u2013 Design a Median with ANSYS SCADE (Part 3 of 6) | Ansys Knowledge","description":"In the previous two videos, we have defined a generic interface for the median operator. In this video, the third in a series of six, to provide a generic implementation, we first need to find a good algorithm.The properties to look at when implementing a safety critical algorithm usually are the low complexity and the","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/innovationspace.ansys.com\/knowledge\/#website"},"breadcrumb":{"@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/algorithm-choice-generic-implementation-design-a-median-with-ansys-scade-part-3-of-6\/#breadcrumblist"},"datePublished":"2022-06-03T13:43:28+00:00","dateModified":"2022-06-03T13:43:28+00:00"},{"@type":"WebSite","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/#website","url":"https:\/\/innovationspace.ansys.com\/knowledge\/","name":"Ansys Knowledge","description":"Ansys Innovation Space","inLanguage":"en-US","publisher":{"@id":"https:\/\/innovationspace.ansys.com\/knowledge\/#organization"}}]},"og:locale":"en_US","og:site_name":"Ansys Knowledge | Ansys Innovation Space","og:type":"article","og:title":"Algorithm Choice, Generic Implementation \u2013 Design a Median with ANSYS SCADE (Part 3 of 6) | Ansys Knowledge","og:description":"In the previous two videos, we have defined a generic interface for the median operator. In this video, the third in a series of six, to provide a generic implementation, we first need to find a good algorithm.The properties to look at when implementing a safety critical algorithm usually are the low complexity and the","og:url":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/algorithm-choice-generic-implementation-design-a-median-with-ansys-scade-part-3-of-6\/","article:published_time":"2022-06-03T13:43:28+00:00","article:modified_time":"2022-06-03T13:43:28+00:00","twitter:card":"summary_large_image","twitter:title":"Algorithm Choice, Generic Implementation \u2013 Design a Median with ANSYS SCADE (Part 3 of 6) | Ansys Knowledge","twitter:description":"In the previous two videos, we have defined a generic interface for the median operator. In this video, the third in a series of six, to provide a generic implementation, we first need to find a good algorithm.The properties to look at when implementing a safety critical algorithm usually are the low complexity and the"},"aioseo_meta_data":{"post_id":"156081","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2025-10-17 17:29:28","updated":"2026-07-30 07:28:01","ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/knowledge\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/\" title=\"Topics\">Topics<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/ansys\/\" title=\"ansys\">ansys<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tAlgorithm Choice, Generic Implementation \u2013 Design a Median with ANSYS SCADE (Part 3 of 6)\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/innovationspace.ansys.com\/knowledge"},{"label":"Topics","link":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/"},{"label":"ansys","link":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/ansys\/"},{"label":"Algorithm Choice, Generic Implementation &#8211; Design a Median with ANSYS SCADE (Part 3 of 6)","link":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/algorithm-choice-generic-implementation-design-a-median-with-ansys-scade-part-3-of-6\/"}],"acf":[],"custom_fields":[{"0":{"_wp_page_template":["default"],"_bbp_last_active_time":["06-03-2022 20:20"],"_bbp_forum_id":["27825"],"_btv_view_count":["635"],"_bbp_likes_count":["2"],"_oembed_e5f428c29becb0ac4abbfba9defd1990":["<iframe title=\"Algorithm Choice, Generic Implementation - Design a Median with ANSYS SCADE (Part 3 of 6)\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/RBwMIA5l3X8?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>"],"_oembed_time_e5f428c29becb0ac4abbfba9defd1990":["1655461738"],"_oembed_344e7f1634575ff4639c654d8ab75d34":["<iframe title=\"Algorithm Choice, Generic Implementation - Design a Median with ANSYS SCADE (Part 3 of 6)\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/RBwMIA5l3X8?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>"],"_oembed_time_344e7f1634575ff4639c654d8ab75d34":["1712373323"]},"test":"watchlearnansys-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/156081","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/156081\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/media?parent=156081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}