Search Results for

    Show / Hide Table of Contents

    Class Unrolling

    Implements the unrolling algorithm. See https://doi.org/10.4230/LIPIcs.SAND.2026.11.
    The unrolling of a spiral into a line, which preserves the order of the amoebots.

    The algorithm repeatedly executes the shearing primitive, starting on the outermost segment and going inward to unroll the spiral into a line. The algorithm requires O(c) rounds, where c is the number of corners in the spiral.

    Inheritance
    object
    Suboracle<Unrolling>
    Unrolling
    Namespace: AS2.Suboracles.Reconfiguration
    Assembly: .dll
    Syntax
    public class Unrolling : Suboracle<Unrolling>

    Constructors

    | Edit this page View Source

    Unrolling(Particle)

    Declaration
    public Unrolling(Particle rep)
    Parameters
    Type Name Description
    Particle rep

    Fields

    | Edit this page View Source

    anchor

    Declaration
    private ParticleAlgorithm anchor
    Field Value
    Type Description
    ParticleAlgorithm
    | Edit this page View Source

    clockwise

    Declaration
    private bool clockwise
    Field Value
    Type Description
    bool
    | Edit this page View Source

    count

    Declaration
    private int count
    Field Value
    Type Description
    int
    | Edit this page View Source

    currentPos

    Declaration
    private ParticleAlgorithm currentPos
    Field Value
    Type Description
    ParticleAlgorithm
    | Edit this page View Source

    directionIn

    Declaration
    private Direction directionIn
    Field Value
    Type Description
    Direction
    | Edit this page View Source

    directionOut

    Declaration
    private Direction directionOut
    Field Value
    Type Description
    Direction
    | Edit this page View Source

    first

    Declaration
    private bool first
    Field Value
    Type Description
    bool
    | Edit this page View Source

    hideBonds

    Declaration
    private List<ParticleAlgorithm> hideBonds
    Field Value
    Type Description
    List<ParticleAlgorithm>
    | Edit this page View Source

    id

    Declaration
    private int id
    Field Value
    Type Description
    int
    | Edit this page View Source

    line

    Declaration
    private List<ParticleAlgorithm> line
    Field Value
    Type Description
    List<ParticleAlgorithm>
    | Edit this page View Source

    lineDir

    Declaration
    private Direction lineDir
    Field Value
    Type Description
    Direction
    | Edit this page View Source

    round

    Declaration
    private int round
    Field Value
    Type Description
    int
    | Edit this page View Source

    shearSuboracle

    Declaration
    private Shear shearSuboracle
    Field Value
    Type Description
    Shear
    | Edit this page View Source

    x

    Declaration
    private int x
    Field Value
    Type Description
    int
    | Edit this page View Source

    y

    Declaration
    private int y
    Field Value
    Type Description
    int

    Methods

    | Edit this page View Source

    Init(List<Unrolling>, Direction, ParticleAlgorithm, bool, int)

    Declaration
    public void Init(List<Unrolling> memberParticles, Direction startDir = Direction.NONE, ParticleAlgorithm anchor = null, bool clockwise = false, int count = 0)
    Parameters
    Type Name Description
    List<Unrolling> memberParticles
    Direction startDir
    ParticleAlgorithm anchor
    bool clockwise
    int count
    | Edit this page View Source

    OnActivate()

    Virtual method that derived suboracles override to implement their subtask logic. Called once per round by Activate().

    Declaration
    protected override bool OnActivate()
    Returns
    Type Description
    bool

    true if the subtask is complete and the suboracle should deactivate; false if more rounds are needed.

    Overrides
    Suboracle<Unrolling>.OnActivate()
    | Edit this page View Source

    removeBonds()

    Helper function to release all bonds except for the spiral structure bonds (bonds to predecessor and successor in the spiral)

    Declaration
    private void removeBonds()
    • Edit this page
    • View Source
    In this article
    Back to top AmoebotSim 2.0 Documentation v1.12
    Copyright © 2025 AmoebotSim 2.0 Authors
    Generated by DocFX