While

While

To use the While condition, follow the steps given below.

  1. Open the required workbook or create a new workbook. The selected workbook canvas is displayed.
  2. Add the reader/dataset if not already present in your workbook.
  3. Drag-and-drop or double-click the While node from Condition into the workbook canvas.

To create a workbook using the While loop, follow the steps given below.

  1. Connect the reader to the While node.
  2. Drag-and-drop or double-click the desired algorithm into the workbook canvas. Refer to Building Algorithm Flow in a Workbook Canvas.
  3. Connect the While node to the algorithm.
  4. Connect the algorithm node to the End node.

    (info)
    Note
    :

    The algorithms should always be inserted between the Condition and the End node.

  5. Click the While node and select the Properties displayed on the right-hand side. Refer to While Condition Properties
  6. Click the algorithm node and select the Properties displayed on the right-hand side. Refer to Understanding the Algorithm Properties.
  7. Click the End node and select the Properties displayed on the right-hand side. Refer to End Properties.
  8. Click the Save icon () on the Function Pane of the workbook to save the workbook.
  9. Click the Run icon () on the Function Pane of the workbook To run the workbook. A sample workbook using the While loop is shown below.


The algorithm connected to While is executed until the While condition is true.

While Condition Properties

The While Condition Properties show Task Name fields and Clause fields associated with it.



The table given below describes the functions present on the While condition.

Field Name

Description

Remarks

Task Name

It is the name of the condition selected (While).

While Tasks

It lets you select the successor algorithms which are executed while the condition evaluates to True.

Clause

It lets you create a complex condition.

You can add more than one clause.

Clause



Parameter

It lets you select the variable for the condition.

  • Refer to Adding a Variable.
  • Although you can use any type of variable, it is recommended to use only numerical variables in the While condition.

Condition

It lets you select the mathematical operator for your variable.

Value

It lets you enter the required values to test or execute the successor algorithms connected to the While condition.

This value is compared with the Current Value of the added variable to evaluate the expression.


(info)Notes:

  • Rubiscape currently supports only the value of the variable to be incremented by one. So, make sure that the Condition and the Value selected are equal to or greater than the current value.
  • The value is incremented internally and does not reflect in the current value of the variable.


The figure given below is an example of While Properties. The selected condition is While, and the successor algorithm selected to execute the While condition is Decision Tree.


In the example above, the newly added variable is Test1 with the Current Value as 10. The While condition is Test1 <12. In this example, the Decision Tree algorithm is executed twice until the current value of Test1 is less than 12. In the third iteration, the current value becomes 12, the while condition fails at this point, and the execution stops.


    • Related Articles

    • Features Used to Upload Datasets

      Filename/Wildcard There are two ways to access the files present on the server. Star – Using '{}{*}' you can access all the files. For example, using *.xlsx, you can match all the datasets with this extension. Hence, all of these datasets will be ...
    • Model Compare

      Working with Model Compare To start working with Model Compare, follow the steps given below. Go to the Home page and create a new workbook or open an existing workbook. Drag and drop the required dataset on the workbook canvas. In the Properties ...
    • AutoML

      AutoML is located under Machine Learning > AutoML in the task pane. Use the drag-and-drop method (or double-click on the node) to use the algorithm in the canvas. Click the algorithm to view and select different properties for analysis. Example of ...
    • Managing Datasets

      What is Reader In rubiscape, a reader is referred to as a dataset. Dataset is a collection of elements extracted from different sources that can be integrated into one. The datasets added can be shared across different Projects. They are used to ...
    • Creating a WorkFlow

      To create a workflow, follow the steps given below. On the home page, click the Create icon (). Hover over the Data Integrator tile and click the Create Workflow button. Create Workflow screen is displayed. Enter the Name for your workflow. Enter the ...