T3_1_PL_Ass_Calc.vb Detailed Explanation

1. Overview

This file is a Windows Forms application designed to perform design calculations for an Automated Storage and Retrieval System (AS/RS) for Pallets (PL_Ass Type). Its primary responsibility is to automatically calculate the necessary overall dimensions (width, length, height), floor area, virtual floor area, and the required number of firewalls based on input parameters such as pallet dimensions, number of tiers, and columns. This provides the foundational data necessary for layout design.

It is implemented as a trial version with an expiration date check feature, verifying the expiration date upon form load.

2. Main Classes / Modules

2.1. PL_Ass_CalcF Class

Purpose

The main form class that performs design calculations for the Pallet AS/RS (PL_Ass Type). It accepts various input parameters and automatically calculates the necessary dimensions, areas, and tier configurations of the warehouse.

Key Properties

This class inherits from System.Windows.Forms.Form and holds numerous UI controls such as TextBoxes (Tb), Labels (L), Buttons (Bt), and Panels (Panel). The main variables are as follows:

  • PL Dimensions: PL Width, PL Depth, PL Total Height, PL Thickness, Load Height
  • Warehouse Configuration: Units (Aisles), Bays, Tiers, Columns, PL Storage Capacity
  • Space Clearances: Adjacent C, Rack C, Pillar Width
  • Calculation Results: Rack Total Width, Rack Total Length, Rack Total Height, Required Width, Required Length, Required Height
  • Tier Configuration: Top Tier, Tiers with Reinforcement, Tiers without Reinforcement, Minimum Height
  • Area Calculations: Total Floor Area, Total Virtual Floor Area, Layout Area, Number of Firewalls

Key Methods / Functions

  • PL_Ass_Calc_Load - Form initialization and startup of main processes
  • ReadTb - Reads data from TextBoxes
  • PL_Ass_Calc - Main calculation logic
  • CalcStartBt_Click - Processing when the calculation button is clicked
  • CoverPb_Click / StartBt_Click - Tab switching processing
  • CloseBt_Click - Form close processing

3. Details of Main Functions / Subroutines

3.1. PL_Ass_Calc_Load

Function Description

Event handler executed when the form loads. It sets the copyright and expiration date displays, performs the expiration check, loads initial data, and executes the initial calculation.

Arguments

Argument Name Type Description
sender Object The source object of the event
e EventArgs Event arguments

Return Value

Type: None (Sub)
Description: No return value as it is an event handler

Processing Flow

  1. Set text for the copyright label and expiration date label.
  2. Get the current date and compare it with the trial version's expiration date.
  3. If expired, display a message box and close the form.
  4. If within the valid period, call ReadTb() to load data.
  5. Call PL_Ass_Calc() to execute the initial calculation.
Special Notes:
An expiration date check is implemented as a trial version feature. The application terminates immediately if expired.

3.2. ReadTb

Function Description

Reads the values entered in each TextBox and stores them in variables. It also performs some preliminary calculations (such as calculating the Load Height).

Arguments

None

Return Value

Type: None (Sub)
Description: Only sets values to internal variables

Processing Flow

  1. Read PL Width, PL Depth, PL Total Height, and PL Thickness from TextBoxes.
  2. Calculate Load Height = PL Total Height - PL Thickness, and display it in the TextBox.
  3. Read Units, Bays, and Tiers.
  4. Read Adjacent Clearance (C).
Special Notes:
This method acts as a preparation step before calculation, converting UI input values into internal variables. Some TextBoxes (like PLDepth2Tb, LoadHeightTb) will re-display the read values or calculated results.

3.3. PL_Ass_Calc

Function Description

The main process that calculates various dimensions and areas of the Pallet AS/RS. It sequentially calculates storage capacity, rack dimensions, bay pitch, tier configuration, required spaces, floor area, virtual floor area, number of firewalls, layout area, etc.

Arguments

None (uses variables within the class)

Return Value

Type: None (Sub)
Description: Calculation results are displayed in respective TextBoxes

Processing Flow

  1. Storage Capacity Calculation:
    • Columns = Units × 2
    • PL Storage Capacity = Columns × Bays × Tiers
  2. Rack Total Width Calculation:
    • Crane Aisle Width = PL Width + 200
    • Rack Total Width = (PL Width + 100) × 2 + Crane Aisle Width
    • Required Width = Rack Total Width + Adjacent C × 2
  3. Bay Pitch Calculation:
    • Bay Pitch = Pillar Width + PL Depth + Rack C × 2
  4. Rack Length Calculation:
    • Rack Total Length = Bay Pitch × Bays + Rack C
  5. Required Length Calculation:
    • Required Length = Rack Total Length + Rack Rear Length + Maint. Aisle + I/O Conveyor Length + Handling Aisle
  6. Tier Configuration Calculation:
    • Top Tier = PL Total Height + Lift C + Reinforcement Thickness + 220 (Minimum value 1600)
    • Tier With Reinforcement = PL Total Height + Lift C + Reinforcement Thickness + Lift C + Cantilever Thickness
    • Number of Tiers With Reinforcement = Int(Tiers / 3)
    • Tier Without Reinforcement = PL Total Height + Lift C + Cantilever Thickness
    • Number of Tiers Without Reinforcement = Tiers - Number of Tiers With Reinforcement - 1
  7. Rack Total Height / Required Height Calculation:
    • Rack Total Height = Minimum Height + (Tier With Reinforcement × Number of Tiers With Reinforcement) + (Tier Without Reinforcement × Number of Tiers Without Reinforcement) + Top Tier
    • Required Height = Rack Total Height + Ceiling C
  8. Required Area Per Unit Calculation:
    • Required Area Per Unit = Int(Required Width × Required Length / 1000²)
  9. Virtual Floor Calculation:
    • Top Tier Cantilever Upper Surface Height = Rack Total Height - Top Tier
    • Virtual Floors = Int(Top Tier Cantilever Upper Surface Height / 5000)
    • Virtual Floor Area = Virtual Floors × (Rack Total Width × Rack Total Length)
    • Virtual Floor Area Per Unit = Int(Virtual Floor Area / 1000²)
  10. Layout Area Calculation:
    • Layout Width = (Rack Total Width + Adjacent C) × Units + Adjacent C
    • Total Floor Area = ((Layout Width × Required Length) × Units) / 1000²
    • Total Virtual Floor Area = Virtual Floor Area Per Unit × Units
  11. Firewall Calculation:
    • Area for Firewall Judgement = Total Floor Area + Total Virtual Floor Area
    • Number of Firewalls = Int(Area for Firewall Judgement / 1500)
    • Firewall Thickness = 150
    • Layout Area = ((Layout Width + Number of Firewalls × (Firewall Thickness + 200)) × Required Length) / 1000²
Special Notes:
This function is the core of the logistics equipment space calculation. It also automatically calculates the required number of firewalls based on building standards. Intermediate results are displayed in TextBoxes at each calculation stage, allowing the designer to verify the calculation process.

3.4. CalcStartBt_Click

Function Description

Event handler executed when the "Start Calculation" button is clicked. It reloads the data, executes the recalculation, and toggles the background color of the result display area to provide visual feedback.

Arguments

Argument Name Type Description
sender Object The button that triggered the event
e EventArgs Event arguments

Return Value

Type: None (Sub)
Description: No return value as it is an event handler

Processing Flow

  1. Reload data using ReadTb().
  2. Execute recalculation using PL_Ass_Calc().
  3. Toggle the background color of the main result TextBoxes based on the CalcStart_Chk flag (Yellow ⇔ Aquamarine).
  4. Toggle the background color of Panel1 based on the CalcStart_Chk2 flag (LightYellow ⇔ PowderBlue).
Special Notes:
Toggling background colors is a UI enhancement designed to let users visually confirm that results have been updated every time the calculation button is pressed.

3.5. CoverPb_Click / StartBt_Click

Function Description

Switches the tab control to the "PL Automated Warehouse Tp" tab when the cover image (Pb) or the start button is clicked.

Arguments

Argument Name Type Description
sender Object The control that triggered the event
e EventArgs Event arguments

Return Value

Type: None (Sub)
Description: No return value as it is an event handler

Processing Flow

  1. Set the SelectedTab property of TabControl1 to PLAutomatedWarehouseTp.
Special Notes:
Provides application navigation, transitioning from the cover screen to the calculation screen.

3.6. CloseBt_Click

Function Description

Closes the form when the "Close" button is clicked.

Arguments

Argument Name Type Description
sender Object The button that triggered the event
e EventArgs Event arguments

Return Value

Type: None (Sub)
Description: No return value as it is an event handler

Processing Flow

  1. Close the form using Me.Close().
Special Notes:
A simple form closing process.

4. Dependencies

  • System.Windows.Forms - For basic Windows Forms application functionality
  • System.Drawing - For UI color settings (Color type)
  • System - For basic types and DateTime processing
  • Global Variable Module (Assumed) - To reference global variables such as copyright, company name, and trial expiration date
Note:
Variables referenced within the code (Company, Copyright, TrialExpirationDate, CalcStart_Chk, etc.) are assumed to be defined in another module or a common configuration file.

5. Revision History

Revision Date Version Revision Details Author
2025 1.0 Initial creation of detailed explanation document -

6. Calculation Formula Summary

Storage Capacity

  • Columns = Units × 2
  • PL Storage Capacity = Columns × Bays × Tiers

Rack Dimensions

  • Load Height = PL Total Height - PL Thickness
  • Crane Aisle Width = PL Width + 200
  • Rack Total Width = (PL Width + 100) × 2 + Crane Aisle Width
  • Required Width = Rack Total Width + Adjacent C × 2
  • Bay Pitch = Pillar Width + PL Depth + Rack C × 2
  • Rack Total Length = Bay Pitch × Bays + Rack C
  • Required Length = Rack Total Length + Rack Rear Length + Maint. Aisle + I/O Conveyor Length + Handling Aisle

Tier Configuration

  • Top Tier = PL Total Height + Lift C + Reinforcement Thickness + 220 (Minimum 1600)
  • Tier With Reinforcement = PL Total Height + Lift C + Reinforcement Thickness + Lift C + Cantilever Thickness
  • Number of Tiers With Reinforcement = Int(Tiers / 3)
  • Tier Without Reinforcement = PL Total Height + Lift C + Cantilever Thickness
  • Number of Tiers Without Reinforcement = Tiers - Number of Tiers With Reinforcement - 1

Height

  • Rack Total Height = Minimum Height + (Tier With Reinforcement × Number of Tiers With Reinforcement) + (Tier Without Reinforcement × Number of Tiers Without Reinforcement) + Top Tier
  • Required Height = Rack Total Height + Ceiling C

Area

  • Required Area Per Unit = Int(Required Width × Required Length / 1000²) [m²]
  • Top Tier Cantilever Upper Surface Height = Rack Total Height - Top Tier
  • Virtual Floors = Int(Top Tier Cantilever Upper Surface Height / 5000)
  • Virtual Floor Area = Virtual Floors × (Rack Total Width × Rack Total Length)
  • Virtual Floor Area Per Unit = Int(Virtual Floor Area / 1000²) [m²]
  • Layout Width = (Rack Total Width + Adjacent C) × Units + Adjacent C
  • Total Floor Area = ((Layout Width × Required Length) × Units) / 1000² [m²]
  • Total Virtual Floor Area = Virtual Floor Area Per Unit × Units [m²]

Firewalls

  • Area for Firewall Judgement = Total Floor Area + Total Virtual Floor Area [m²]
  • Number of Firewalls = Int(Area for Firewall Judgement / 1500)
  • Layout Area = ((Layout Width + Number of Firewalls × (150 + 200)) × Required Length) / 1000² [m²]
Note on Units:
Input values are generally handled in millimeters (mm) and are converted to square meters (m²) by dividing by 1000² during area calculations.