AseptSoft Core Documentation

Algorithm Design

Algorithm Design defines when and how the execution transitions from one Step to the next. Each Step contains an Algorithm — a sequence of Conditions that must be fulfilled before the process can move on.

💡 Think of it this way: Process Design defines what the valve positions are. Algorithm Design defines when to move from one set of positions to the next — based on sensor readings, timer expirations, operator confirmations, or any combination of these.


📋 Overview

Concept

Description

Algorithm

A sequence of conditions attached to a Step, defining the transition logic

Condition

An atomic decision point in the algorithm (e.g., wait for a sensor reading, timer, or operator input)

SFC Editor

The visual Sequential Function Chart editor for managing conditions — see SFC Editor (GRAFCET)

Key relationship: Each Step has exactly one Algorithm, and each Algorithm belongs to exactly one Step.


🎛️ Accessing the Condition Editor

https://downloads.aseptsoft.ch/documentation/images/Algorithm-Design/condition-editor.png

To open the Condition Editor, go to the Condition panel in the Module Ribbon and click the Edit button. A window opens where you can create, view, and modify conditions for the current step.

At the top left corner of the editor you will see:

Indicator

Color

Meaning

Process name

🟡 Yellow

The process you are currently working in

Step number/name

🔵 Blue

The step this condition belongs to

Condition number/name

🟢 Green

The currently selected condition within the step

💡 Tip: Click on the process, step, or condition indicator to open a dropdown and quickly switch to a different process, step, or condition.


🔧 Condition Types

Each condition has a Type that determines its behavior and which fields are available. You select the type from the icons at the top of the Condition Editor window.

Type

Symbol

Description

Key Fields

Transition

Transitions to another step when the condition is fulfilled. This is the most common type.

Description, Prompt, Condition, Success Transition

Continuous Action

A

Executes an action continuously while the step is active.

Description, Prompt, Success Action

Cont. Action + Condition

ᴶᶜ A

Executes the action only while the condition is true.

Description, Prompt, Condition, Success Action

Stored on Activation

↑ A

Executes the action once when the step first becomes active (rising edge).

Description, Prompt, Success Action

Stored on Deactivation

↓ A

Executes the action once right before the step becomes inactive (falling edge).

Description, Prompt, Success Action

Stored on Event

ᵐᴱ A

Executes the action once when a specific event occurs during the step.

Description, Prompt, Condition, Success Action

Custom

A fully customizable condition layout. All fields are available.

Description, Prompt, Condition, Success Action, Fail Action, Success Transition, Fail Transition


📝 Condition Fields

Depending on the selected condition type, different fields are available in the editor:

Field

Icon

Description

Available For

Description

📖

A human-readable explanation of the condition. This text also becomes the name of the condition.

All types

Prompt

🖥️

Text or Dialog shown to the operator during production.

All types

Condition

🧮

The formal expression that defines what must be true. Use the Condition Builder for guided construction.

Transition, Cont. Action + Condition, Stored on Event, Custom

Success Action

The action performed when the condition succeeds. Use the Action Builder for guided construction.

Continuous Action, Cont. Action + Condition, Stored on Activation, Stored on Deactivation, Stored on Event, Custom

Fail Action

The action performed when the condition fails.

Custom

Success Transition

➡️

The step to transition to when the condition is met. Uses a visual Transition Phase Picker.

Transition, Custom

Fail Transition

➡️

The step to transition to when the condition fails. Only available for Custom type.

Custom

💡 Tip: The Condition and Action fields support formal expressions. Click the builder icon to the right of each field to open the Condition Builder or Action Builder for guided expression construction.

🎯 Transition Phase Picker

https://downloads.aseptsoft.ch/documentation/images/Algorithm-Design/transition-phase-picker.png

When editing Transition or Custom condition types, the Success Transition and Fail Transition fields use a visual phase picker instead of freeform text entry.

The picker displays a scrollable list of checkboxes — one for each step in the current process. Check one or more steps to set the transition targets. Multiple selections enable fork transitions.

Feature

Details

Success Picker

Green accent color — used for the Success Transition field

Fail Picker

Rose/pink accent color — used for the Fail Transition field

Summary bar

Displays the count of selected steps and the serialized transition text

Excluded step

The step currently being edited is automatically excluded from the list


🖥️ Using the Prompt Field with Dialogs

The Prompt field is used to show information or collect input from the operator during production. You can write plain text or reference a Dialog for structured operator interaction.

Inserting a Dialog into the Prompt

  1. In the Prompt field, click the arrows icon on the right side

  2. A window opens showing all available Dialogs

  3. Click the + button to create a new dialog

  4. In the Dialog Editor, you see a live preview on the right. On the left side, you can drag and drop control types: Button, CheckBox, RadioButton, TextInput, NumericInput, FloatInput

  5. You can also use the built-in AI feature to generate a dialog layout automatically

  6. Drag and drop controls to reorder them, or drag to the trash to remove. Click directly on text labels to edit them

  7. Close the Dialog Editor when finished

Managing Dialogs

  • Right-click on a dialog to access options: Edit, Duplicate, or Remove

  • When you click a dialog to select it, the dialog name is inserted into the Prompt field

  • The selected dialog appears as a preview on the right side of the Prompt field

  • Click the dialog preview to reopen the Dialog Editor and make changes

📖 For more details on creating and managing dialogs, see the Dialog page.


🔨 Condition Editor Toolbar

At the top of the Condition Editor window, you have buttons to organize your conditions:

Button

Description

➕ Add

Creates a new condition in the current step

📋 Duplicate

Duplicates the currently selected condition. Expand for options: Duplicate in current Step, or Select Steps to Duplicate to

🗑️ Delete

Removes the currently selected condition

🖐️⬆ Move Up

Moves the selected condition up in the condition order

🖐️⬇ Move Down

Moves the selected condition down in the condition order

💡 Tip: The order of conditions matters — they define the sequence in which conditions are evaluated within a step.

Custom Fields

You can add custom fields to conditions for each project. This allows you to tailor the condition form to your specific documentation needs.


🧭 Navigating Conditions from the Ribbon

The Module Ribbon Condition panel provides quick access to conditions without opening the editor.

Step Navigation

In the Steps area of the ribbon, the Previous and Next buttons let you navigate through steps. Expand the arrows to navigate through the chain of conditions — following transitions forward and backward.


📐 Algorithm Frame on the P&ID

If you want to see condition details directly on the P&ID drawing, you can insert an Algorithm Frame:

  1. In the Module Ribbon, click Data to expand the dropdown

  2. Click Headers and Notes

  3. Click Algorithm Frame

  4. Click on a location on your P&ID to place the frame

  5. Choose a base point to scale the size, then click again to confirm

The Algorithm Frame displays condition details including: Condition number, Type, Description, Condition expression, Prompt, Success/Fail Action, and Success/Fail Transition.

💡 Tip: When you click on different conditions in the ribbon, the Algorithm Frame automatically updates to show the selected condition's details.


📊 SFC Editor (Sequential Function Chart)

The SFC Editor (GRAFCET) provides a visual flowchart view of the algorithm. Everything you do in the SFC Editor automatically updates the steps and conditions, and vice versa.


📖 Workflows

How to Create a Transition Condition

  1. Open the Condition Editor from the Module Ribbon → Condition panel → Edit

  2. Use the top-left indicators to select the correct Process and Step

  3. Click the ➕ Add button to create a new condition

  4. Select the Transition type

  5. Enter a Description — this becomes the condition's name

  6. In the Condition field, enter the expression. Use the Condition Builder for guided construction

  7. In the Success Transition field, specify which step to go to

  8. The condition is automatically saved

How to Create a Continuous Monitoring Condition

  1. Open the Condition Editor and navigate to the desired step

  2. Add a new condition and select Continuous Action type

  3. In the Success Action field, enter the assignment

  4. This will continuously execute the action for the duration of the step


🏭 Example: CIP Caustic Wash Algorithm

Here is a typical algorithm for the Caustic Wash step in a CIP process:

#

Type

Description

Condition

Success Action / Transition

1

Stored on Activation

Record batch start

Store batch ID and timestamp

2

Continuous Action

Monitor temperature

RecordedTemp = TIT-CIP-01

3

Transition

Wait for target temperature

TIT-CIP-01 >= MinCausticTemp

→ Circulation step

4

Cont. Action + Condition

Boost heater if temp drops

TIT-CIP-01 < 75

Increase heater power

5

Stored on Deactivation

Record final temperature

FinalTemp = TIT-CIP-01

This example demonstrates multiple condition types working together within a single step, which is common in pharmaceutical process design.


https://downloads.aseptsoft.ch/documentation/images/Algorithm-Design/condition-builder.png
https://downloads.aseptsoft.ch/documentation/images/Algorithm-Design/action-builder.png
https://downloads.aseptsoft.ch/documentation/images/Algorithm-Design/condition-form-filled.png