Outils pour utilisateurs

Outils du site


dse:data_query_calcultion

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
dse:data_query_calcultion [2022/12/21 09:34] – [Map transformation of a list] nicoantodse:data_query_calcultion [2022/12/21 09:39] (Version actuelle) – nicoanto
Ligne 2: Ligne 2:
  
 ===== Map transformation of a list  ===== ===== Map transformation of a list  =====
 +The generate is configured as follow : 
 +  * Generator strategy : Iterate Over List Strategy 
 +  * List Expression :
 <code> <code>
 [ [
Ligne 36: Ligne 38:
 {matiere:"Zinc", min:0.95, max:1, average:1} {matiere:"Zinc", min:0.95, max:1, average:1}
 ] ]
 +</code>
  
 +The generator pushes into variable : yield_ratio_list
 +
 +In a 'Map' component, the @yield_ratio_list variable is transformed as a map variable :
 +<code>
 +/* Map yield ratio threshold data */
 +yield_ratio_threshold: Map<String, Tuple<matiere: String, min: Float, max: Float, average: Float>> = @yield_ratio_list.toMap(keyFunction: x => x.matiere, valueFunction: x => x);
 </code> </code>
 +
 +This new map variable is used the following way :
 +
 +<code>
 +{
 + part:input.part
 + , final_material_weight_net: evaluated_net_weight
 + , final_material_weight_net_source :input.final_material_weight_net_source
 + , final_material_weight_gross: evaluated_net_weight IS NULL
 + ? evaluated_gross_weight
 + : yield_ratio>=yield_ratio_threshold[input.rm_name].min AND yield_ratio<=yield_ratio_threshold[input.rm_name].max
 + ? evaluated_gross_weight
 + : evaluated_net_weight / yield_ratio_threshold[input.rm_name].average
 +}
 +</code>
 +
 +
 +
 +
dse/data_query_calcultion.1671615245.txt.gz · Dernière modification : (modification externe)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki