### AnyLogic Cloud Installation Script Source: https://anylogic.help/9/cloud/release-notes Provides a simple installation script for easy deployment of Private Cloud instances. This script automates the setup process, making it easier to get started with AnyLogic Cloud. ```Shell #!/bin/bash # Example AnyLogic Cloud installation script (conceptual) # This script would typically handle: # 1. Downloading AnyLogic Cloud components # 2. Setting up necessary dependencies (e.g., Java, Docker) # 3. Configuring the instance (e.g., database, network settings) # 4. Starting the AnyLogic Cloud services echo "Starting AnyLogic Cloud installation..." # Placeholder for download and setup commands # e.g., wget https://anylogic.com/downloads/cloud/latest/anylogic-cloud.tar.gz # e.g., tar -xzf anylogic-cloud.tar.gz # e.g., cd anylogic-cloud # e.g., ./setup.sh --configure --user admin --password secret echo "AnyLogic Cloud installation script executed." # Placeholder for starting services # e.g., ./start.sh echo "AnyLogic Cloud setup complete." ``` -------------------------------- ### Run Simulation and Get Outputs (Java) Source: https://anylogic.help/9/cloud/api/java This example demonstrates how to run a simulation using the AnyLogic Cloud API and retrieve its outputs. It initializes the client, selects a model and version, sets input parameters, starts the simulation, and prints the output value. The `getOutputsAndRunIfAbsent` function handles both starting the run and fetching results. ```Java String API_KEY = "e05a6efa-ea5f-4adf-b090-ae0ca7d16c20"; String DOUBLE_INPUT = "Server capacity"; String DOUBLE_OUTPUT = "Utilization|Server utilization"; AnyLogicCloudClient client = new AnyLogicCloudClient(API_KEY); Model model = client.getModelByName("Service System Demo"); ModelVersion version = client.getLatestModelVersion(model); Inputs inputs = client.createDefaultInputs(version); inputs.setInput(DOUBLE_INPUT, 20); SimulationRun simulation = client.createSimulation(inputs); SingleRunOutputs outputs = simulation.getOutputsAndRunIfAbsent(); // will exit upon run completion System.out.println(outputs.value(DOUBLE_OUTPUT)); ``` -------------------------------- ### Run Simulation and Get Outputs (Java) Source: https://anylogic.help/cloud/api/java This example demonstrates how to run a simulation using the AnyLogic Cloud API and retrieve its outputs. It initializes the client, selects a model and version, sets input parameters, starts the simulation, and prints the output value. The `getOutputsAndRunIfAbsent` function handles both starting the run and fetching results. ```Java String API_KEY = "e05a6efa-ea5f-4adf-b090-ae0ca7d16c20"; String DOUBLE_INPUT = "Server capacity"; String DOUBLE_OUTPUT = "Utilization|Server utilization"; AnyLogicCloudClient client = new AnyLogicCloudClient(API_KEY); Model model = client.getModelByName("Service System Demo"); ModelVersion version = client.getLatestModelVersion(model); Inputs inputs = client.createDefaultInputs(version); inputs.setInput(DOUBLE_INPUT, 20); SimulationRun simulation = client.createSimulation(inputs); SingleRunOutputs outputs = simulation.getOutputsAndRunIfAbsent(); // will exit upon run completion System.out.println(outputs.value(DOUBLE_OUTPUT)); ``` -------------------------------- ### Display Help for AnyLogic Cloud Installer Source: https://anylogic.help/9/cloud/installer-reference This command displays a list of all available options and commands for the AnyLogic Cloud installer script. It is useful for understanding the full range of configuration parameters. ```bash ./install.sh --help ``` -------------------------------- ### Display Help for AnyLogic Cloud Installer Source: https://anylogic.help/cloud/installer-reference This command displays a list of all available options and commands for the AnyLogic Cloud installer script. It is useful for understanding the full range of configuration parameters. ```bash ./install.sh --help ``` -------------------------------- ### Get Snapshot File Name Source: https://anylogic.help/anylogic/experiments/optimization Returns the name of the snapshot file from which the experiment is configured to start the simulation. ```Java String getSnapshotFileName() ``` -------------------------------- ### Implementing ExperimentSimulation in Java Source: https://anylogic.help/api/com/anylogic/engine/ExperimentSimulation This Java code demonstrates how to extend the `ExperimentSimulation` class to create a custom experiment. It shows the implementation of `createRoot()` to define the main agent and `setup()` for configuring the simulation engine and presentation. The `main` method illustrates how to instantiate and run the experiment. ```Java public class MyExperiment extends ExperimentSimulation { public Agent createRoot( Engine engine ) { MyMain root = new MyMain( engine, null, null ); //set parameters of root if needed ... return root; } public void setup() { Engine eng = getEngine(); //set engine stop time, time mode, etc. ... Presentation p = new Presentation( ex, null ); p.start(); //set presentation size, configure toolbar, etc. ... } public static void main( String[] args ) { MyExperiment ex = new MyExperiment(); ex.setName( "My Experiment" ); ex.setup( null ); } } ``` -------------------------------- ### RoadLanesConnector Get Methods Source: https://anylogic.help/api/com/anylogic/engine/markup/RoadLanesConnector Methods to retrieve information about the RoadLanesConnector, including the start and end roads, their lane numbers, and the guide line segments. ```Java public Road getStartRoad() Returns the road this connector starts at ``` ```Java public int getStartRoadLane() Returns the lane number on the road this connector starts at ``` ```Java public Road getEndRoad() Returns the road this connector ends at ``` ```Java public int getEndRoadLane() Returns the lane number on the road this connector ends at ``` ```Java public List getGuideLine() Returns the guide line, in the form of segments list ``` -------------------------------- ### Setup Method for Experiment Host Source: https://anylogic.help/api/com/anylogic/engine/IRunConfiguration The setup method is called after the experiment is constructed and is intended for initial setup of the simulation engine and presentation. It's a user extension point. ```Java @AnyLogicInternalCodegenAPI void setup(IExperimentHost experimentHost) ``` -------------------------------- ### Get Statistics Start Time for Conveyor Station Source: https://anylogic.help/api/com/anylogic/engine/markup/ConveyorSimpleStation Gets the start time for statistics collection in a conveyor station. Marked with @AnyLogicInternalAPI. ```Java @AnyLogicInternalAPI public double getStatisticsStartTime() ``` -------------------------------- ### AnyLogic Initial Experiment Setup (Java) Source: https://anylogic.help/anylogic/experiments/simulation-experiment Provides a space for experiment initialization code in Java, executed when the experiment and its UI are created. This is useful for setting up initial states or configurations. ```Java // Experiment initialization code // Executed when the experiment is created and its UI is created. ``` -------------------------------- ### Display Installer Help and Options Source: https://anylogic.help/cloud/install Displays the full list of supported flags and options for the AnyLogic Private Cloud installer script. ```bash sudo ./install.sh --help ``` -------------------------------- ### Display Installer Help and Options Source: https://anylogic.help/9/cloud/install Displays the full list of supported flags and options for the AnyLogic Private Cloud installer script. ```bash sudo ./install.sh --help ``` -------------------------------- ### Get Segment Start Position Source: https://anylogic.help/api/com/anylogic/engine/markup/AbstractMarkupSegment Abstract method to get the location of the segment's start position. Implementations must provide the specific logic. ```Java public abstract Position getStart(Position out) Returns the location of the start position of the segment Parameters: out - output object to write to, may be null Returns: the Position object with coordinates of the segment start ``` -------------------------------- ### Launch Experiment with Options Source: https://anylogic.help/api/com/anylogic/engine/AutotestExperimentHost Launches an experiment, with options to start the server and the experiment itself. This method is part of the IExperimentHost interface. ```Java public void launch(boolean startServer, boolean startExperiment) ``` -------------------------------- ### Get Second from Model Time (AnyLogic Java) Source: https://anylogic.help/advanced/functions/getsecond Retrieves the second within the minute of the current model date. The result is based on the model's start time/date and time unit. For example, at 10:04:15.250 PM, the function returns 15. ```Java int second = getSecond(); ``` -------------------------------- ### Get Conveyor Start Position Source: https://anylogic.help/api/com/anylogic/engine/markup/ConveyorPath Returns the start position of the conveyor. ```Java Position getStartPosition() ``` ```Java Position getStartPosition(Position out) ``` -------------------------------- ### Run Optimization Experiment in AnyLogic Source: https://anylogic.help/anylogic/experiments/optimization This snippet outlines the steps to initiate an optimization experiment within the AnyLogic software. It involves right-clicking the experiment in the Projects view and selecting 'Run', or using the main menu and toolbar options. The process opens the model window where the optimization can be started via a control panel button. ```AnyLogic 1. In the **Projects** view, right-click (macOS: Ctrl + click) your optimization experiment and choose **Run** from the context menu. 2. Alternatively, choose **Model > Run** from the main menu, or click the arrow to the right of the **Run** toolbar button and choose the experiment you want to run from the drop-down list. 3. This opens the model window, displaying the experiment’s UI. If you have created the default UI for the experiment, start the optimization by clicking the **Run** button in the control panel at the bottom of the model window. The optimization process will be started. ``` -------------------------------- ### Get Start Switch of Track Source: https://anylogic.help/api/com/anylogic/engine/markup/RailwayTrack Retrieves the RailwaySwitch object located at the start of the track. ```Java RailwaySwitch getStartSwitch() ``` -------------------------------- ### AnyLogic: Build and Run Model Source: https://anylogic.help/tutorials/road-traffic/1-drawing-road Instructions for building the AnyLogic model and running the simulation. Includes steps for checking for errors after building and starting the simulation experiment. ```AnyLogic 1. Click the 'Build model' toolbar button. 2. If errors occur, fix them in the 'Problems' view. 3. Click the 'Run' toolbar button and choose the experiment. ``` -------------------------------- ### Get Start Position Source: https://anylogic.help/api/com/anylogic/engine/markup/QueuePath Returns the position (location and orientation) at the start of the QueuePath. ```Java public Position getStartPosition() ``` -------------------------------- ### Get Start Point Location Source: https://anylogic.help/api/com/anylogic/engine/markup/QueuePath Retrieves the coordinates of the starting point of the QueuePath. ```Java public Point getStartPoint() ``` -------------------------------- ### Setup Engine Method Source: https://anylogic.help/api/com/anylogic/engine/IRunConfiguration The setupEngine method is part of the IRunConfiguration interface and is used to set up the simulation engine. ```Java @AnyLogicInternalAPI void setupEngine(Engine engine) ``` -------------------------------- ### Creating and Running a Simple AnyLogic Simulation Source: https://anylogic.help/api/com/anylogic/engine/ExperimentCustom This Java code snippet illustrates the basic steps to create and run a simulation using AnyLogic's Engine. It covers engine creation, setting stop time, initializing the root agent, starting the simulation, and stopping the engine. ```Java Engine engine = createEngine(); engine.setStopTime( 100 ); Main root = new Main(engine, null, null); root.myParameter = 10; engine.start( root ); engine.runFast(); traceln( root.myResult ); engine.stop(); ``` -------------------------------- ### Get Conveyor Statistics Start Time Source: https://anylogic.help/api/com/anylogic/engine/markup/ConveyorPath Retrieves the start time for conveyor statistics. ```Java double getStatisticsStartTime() ``` -------------------------------- ### Download AnyLogic Private Cloud Installation Script (Linux) Source: https://anylogic.help/9/cloud/update This command downloads the installation script for AnyLogic Private Cloud Lite or Pro editions using wget on a Linux terminal. Ensure you have superuser privileges. ```bash sudo wget https://cloud.anylogic.com/files/anylogic-private-cloud-lite.tar.gz ``` ```bash sudo wget https://cloud.anylogic.com/files/anylogic-private-cloud-pro.tar.gz ``` -------------------------------- ### Create Transporter Network by Code Example Source: https://anylogic.help/anylogic/introduction/release-notes Provides an example model demonstrating how to create a transporter network programmatically, including an example of a network port created via code. ```Java // Code snippet from the 'Create Transporter Network by Code' model // ... (specific code for network port creation would be here) ... ``` -------------------------------- ### Get Conveyor Start Point Source: https://anylogic.help/api/com/anylogic/engine/markup/ConveyorPath Returns the location of the conveyor's start point. ```Java Point getStartPoint() ``` ```Java Point getStartPoint(Point out) ``` -------------------------------- ### Get Statistics Start Time Source: https://anylogic.help/api/com/anylogic/engine/markup/ConveyorSimpleStation Returns the start time for collecting station statistics. ```Java double getStatisticsStartTime() ``` -------------------------------- ### AnyLogic Java Actions for Experiment Setup Source: https://anylogic.help/anylogic/experiments/compare-runs-experiment This snippet outlines the Java code execution points within an AnyLogic experiment lifecycle. It covers actions performed during initial setup, before each run, before simulation start, and after simulation completion. ```Java Initial experiment setup: Code executed on experiment setup. Before each experiment run: Code executed before each simulation run. Before simulation run: Code executed before simulation run. This code is run on setup of the model. At this moment the top-level agent of the model is already created, but the model is not started yet. You may perform here some actions with elements of the top-level agent, e.g assign actual parameter values here. After simulation run: Code executed after simulation run. This code is executed when simulation engine finishes the model execution (Engine.finished() function is called). This code is not executed when you stop your model by clicking the Terminate execution button. ``` -------------------------------- ### Download AnyLogic Team License Server Installer Source: https://anylogic.help/license-server/windows This snippet provides the direct download link for the AnyLogic Team License Server installer executable for Windows. Ensure you have administrator privileges to run the installer. ```bash https://www.anylogic.com/files/ls/anylogic-team-license-server-3.3.0.exe ``` -------------------------------- ### Java - Get Start of Day Source: https://anylogic.help/api/com/anylogic/engine/database/UtilitiesDatabaseBasic Calculates the start of the day (midnight) for a given Timestamp. ```Java @AnyLogicInternalAPI public static LocalDateTime getStartOfDay(Timestamp t) ``` -------------------------------- ### AnyLogic ExperimentTest setupEngine_xjal Method Source: https://anylogic.help/api/com/anylogic/engine/ExperimentTest Sets up the engine for the experiment. This method is internal and should not be called by users, overriding a similar method in ExperimentCustom. ```Java public void setupEngine_xjal(Engine engine) Description copied from class: ExperimentCustom _This method should not be called by user_ ``` -------------------------------- ### Get Start Position Source: https://anylogic.help/api/com/anylogic/engine/markup/MarkupSegmentArc Returns the starting position of the segment. The method populates a provided Position object with the coordinates of the segment's start. ```Java public Position getStart(Position out) ``` -------------------------------- ### Setup AnyLogic Experiment Source: https://anylogic.help/api/com/anylogic/engine/Experiment User extension point called in the static main() method after experiment construction. It's intended for initial setup of the simulation engine and presentation. The default implementation does nothing. ```Java @AnyLogicInternalCodegenAPI public void setup(IExperimentHost experimentHost) ``` -------------------------------- ### AnyLogic IPath: Get Start Point Source: https://anylogic.help/api/com/anylogic/engine/markup/IPath Returns the location of the start point of the path. ```Java Point getStartPoint() // Returns the location of the start point // the Point object with coordinates of the first point ``` ```Java Point getStartPoint(Point out) // Returns the location of the start point // Parameters: out - output object to write to, may be null // the Point object with coordinates of the first point ``` -------------------------------- ### Get Simulation Start Time Source: https://anylogic.help/anylogic/running/engine-api Retrieves the simulation's start time in model time units or specified units. The default start time is 0. ```java double getStartTime() ``` ```java double getStartTime(TimeUnits units) ``` -------------------------------- ### Building and Running AnyLogic Models Source: https://anylogic.help/tutorials/system-dynamics/8-running-model This section outlines the process of building a project in AnyLogic, addressing potential errors, and initiating a simulation experiment. It also describes how to use the 'Run' toolbar button to start previously executed experiments. ```AnyLogic Build your project by clicking the **Build model** toolbar button. If there are some errors in your model, the building fails and the **Problems** view appears listing all the errors found in your model. Double-click an error in the list to open the location of the error and fix it. After the model is successfully built, you can start it. Running the simulation, you automatically bring the current model up to date. Choose the experiment you want to run from the drop-down list of the **Run** toolbar button. Your simulation experiment is called **Bass Diffusion/Simulation**. Later on you can use the **Run** toolbar button to start the previously run experiment. ``` -------------------------------- ### Get Path Segment Start Y Coordinate Source: https://anylogic.help/api/com/anylogic/engine/markup/MarkupSegment Returns the y-coordinate of the start point of the path segment. ```Java public final double getStartY() ``` -------------------------------- ### Compare 2D and 3D Views in AnyLogic Source: https://anylogic.help/tutorials/air-defense/1-creating-assets Demonstrates switching between 2D and 3D views during model runtime. ```AnyLogic 1. Run the model. 2. Open the developer panel. 3. In the **select view area to navigate** list, select **[window3d]**. ``` -------------------------------- ### Get GIS Path Start Point Source: https://anylogic.help/api/com/anylogic/engine/markup/GISRoute Returns the coordinates of the start point of a GIS path. ```Java public Point getStartPoint() ``` -------------------------------- ### Initialize and Export with JSON in AnyLogic Source: https://anylogic.help/anylogic/introduction/release-notes New example models in AnyLogic 8.9.1 illustrate initializing simulations and exporting data using JSON format. This facilitates data exchange and configuration management with external systems. ```Python import json # Example of exporting simulation data to JSON sim_data = { "step": 10, "value": 150.5 } with open("output.json", "w") as f: json.dump(sim_data, f) ``` -------------------------------- ### Execute AnyLogic Cloud Installer Script Source: https://anylogic.help/9/cloud/installer-reference This command demonstrates the general syntax for executing the AnyLogic Cloud installation script with specified actions and options. The script must be run with superuser privileges from a Linux terminal. ```bash ./install.sh _action_ _options_ ``` -------------------------------- ### Get Start Point of Segment Source: https://anylogic.help/api/com/anylogic/engine/markup/GISMarkupSegmentLine Retrieves the starting point of a markup segment. The 'out' parameter is an object where the result (the start point) will be stored. This method is specified in the IMarkupSegment interface. ```Java public Point getStart(Point out) ``` -------------------------------- ### Setup AnyLogic Simulation Engine Source: https://anylogic.help/api/com/anylogic/engine/Experiment Configures the simulation engine. This method is called when the simulation engine instance is created. ```Java void setupEngine(Engine engine) ``` -------------------------------- ### Get Start Position of Path Source: https://anylogic.help/api/com/anylogic/engine/markup/ConveyorPath Returns the start position of the path as a Position object, representing absolute coordinates. ```Java public Position getStartPosition() ``` -------------------------------- ### Get Path Segment Start Z Coordinate Source: https://anylogic.help/api/com/anylogic/engine/markup/MarkupSegment Returns the z-coordinate of the start point of the path segment. ```Java public final double getStartZ() ``` -------------------------------- ### Install AnyLogic Cloud Python Client Source: https://anylogic.help/cloud/api/python Installs the AnyLogic Cloud client library using pip. This is the first step to using the API for interacting with AnyLogic Cloud models. ```bash pip install https://cloud.anylogic.com/files/api-8.5.0/clients/anylogiccloudclient-8.5.0-py3-none-any.whl ``` -------------------------------- ### Install AnyLogic Cloud Python Client Source: https://anylogic.help/9/cloud/api/python Installs the AnyLogic Cloud client library using pip. This command downloads and installs the necessary package to interact with the AnyLogic Cloud API. ```bash pip install https://cloud.anylogic.com/files/api-8.5.0/clients/anylogiccloudclient-8.5.0-py3-none-any.whl ``` -------------------------------- ### Get Path Segment Start X Coordinate Source: https://anylogic.help/api/com/anylogic/engine/markup/MarkupSegment Returns the x-coordinate of the start point of the path segment. ```Java public final double getStartX() ``` -------------------------------- ### ExperimentRunFast setupRootParameters Method Source: https://anylogic.help/api/com/anylogic/engine/ExperimentCompareRuns Sets up the parameters for the top-level agent of the simulation. This abstract method must be implemented by subclasses to configure the root agent and optionally trigger 'onChange' actions. ```Java abstract void setupRootParameters(ROOT root, boolean callOnChangeActions) ``` -------------------------------- ### Get Blocked Zone Start Angle Source: https://anylogic.help/api/com/anylogic/engine/markup/Robot Retrieves the starting angle of the robot's blocked zone in radians. ```Java public double getBlockedZoneStartAngle() ``` -------------------------------- ### Setup Commands for AnyLogic Private Cloud Installation Source: https://anylogic.help/9/cloud/system-requirements These commands are essential during the Private Cloud installation process and must be permitted by the system. They cover user management, file operations, and remote access. ```bash sudo visudo cp scp useradd passwd usermod ssh-copy-id ``` -------------------------------- ### Crane Get Statistics Start Time Source: https://anylogic.help/api/com/anylogic/engine/markup/Crane Returns the start time for crane statistics collection. This is an abstract method. ```Java abstract double getStatisticsStartTime() ``` -------------------------------- ### Create New AnyLogic Model Source: https://anylogic.help/tutorials/air-defense/1-creating-assets Steps to create a new AnyLogic model, including naming, setting location, and defining time units. ```AnyLogic 1. Click the **New** toolbar button. 2. Specify the model name (e.g., Air Defense System). 3. Set Model time units to **seconds**. 4. Click **Finish**. ``` -------------------------------- ### Setup AnyLogic Engine Source: https://anylogic.help/api/com/anylogic/engine/Experiment Called when the simulation engine is created to perform its setup. ```Java @AnyLogicInternalCodegenAPI public void setupEngine(Engine engine) ``` -------------------------------- ### Start Docker Service Source: https://anylogic.help/9/cloud/troubleshooting Starts the Docker system service after it has been stopped. This is necessary to re-initialize the Docker daemon. ```bash systemctl docker start ``` -------------------------------- ### Setup Root Parameters Source: https://anylogic.help/api/com/anylogic/engine/ExperimentSimulation An abstract method that must be implemented by subclasses to set up the parameters of the top-level agent. It allows specifying whether parameter change actions should be invoked. ```Java @AnyLogicInternalCodegenAPI public abstract void setupRootParameters(ROOT root, boolean callOnChangeActions) ``` -------------------------------- ### Get Reverse Start Position Source: https://anylogic.help/api/com/anylogic/engine/markup/ServiceLine Retrieves a Position object representing the start point of a queue path with a reversed orientation. This method is useful for operations that require starting from the end of the path. ```Java public Position getReverseStartPosition(Position out) ``` -------------------------------- ### Setup AnyLogic Experiment Host Source: https://anylogic.help/api/com/anylogic/engine/Experiment Initializes the experiment host. This method is invoked within the static main() method of applications after the experiment object has been constructed. ```Java void setup(IExperimentHost experimentHost) ``` -------------------------------- ### Get Conveyor Belt Start Point Source: https://anylogic.help/api/com/anylogic/engine/markup/BulkConveyorBelt Returns the coordinates of the conveyor belt's start point. This method creates and returns a new Point object containing the start coordinates. ```java public Point getStartPoint() ``` -------------------------------- ### AnyLogic Path: Get Start Point and Position Source: https://anylogic.help/api/com/anylogic/engine/markup/Path Retrieves the start point and position of a path, with options for output parameters. ```Java Point getStartPoint() Point getStartPoint(Point out) Position getStartPosition() Position getStartPosition(Position out) ``` -------------------------------- ### setupRootParameters Method Source: https://anylogic.help/api/com/anylogic/engine/ExperimentCompareRuns Sets up the parameters for the top-level agent of the experiment. This abstract method must be implemented by subclasses. It takes the root agent instance and a boolean indicating whether to call 'onChange' actions. ```Java @AnyLogicInternalCodegenAPI public abstract void setupRootParameters(ROOT root, boolean callOnChangeActions) ``` -------------------------------- ### Setup Root Parameters Method Source: https://anylogic.help/api/com/anylogic/engine/IRunConfiguration The setupRootParameters method sets agent parameters for the simulation run. It includes parameters for agent, callOnChangeActions, and parameterSource. ```Java @AnyLogicInternalAPI void setupRootParameters(T agent, boolean callOnChangeActions, IRunValueAccessor parameterSource) ``` -------------------------------- ### Get Start Position (Output Parameter) Source: https://anylogic.help/api/com/anylogic/engine/markup/QueuePath Returns the position at the start of the QueuePath, storing the result in the provided Position object. ```Java public Position getStartPosition(Position out) ``` -------------------------------- ### Get Arc Start Angle (Java) Source: https://anylogic.help/api/com/anylogic/engine/markup/MarkupSegmentArc Retrieves the starting angle of an arc segment. This method is marked as internal to AnyLogic. ```Java @AnyLogicInternalAPI public double getStartArcStartAngle() ``` -------------------------------- ### Run AnyLogic Experiment Source: https://anylogic.help/anylogic/ui/menu Executes the selected experiment for the AnyLogic model. This command initiates the simulation process. ```AnyLogic Run ``` -------------------------------- ### Get Start Angle Source: https://anylogic.help/api/com/anylogic/engine/markup/MarkupSegmentArc Retrieves the angle of the tangent to the segment at its starting point. This is useful for understanding the orientation of the arc at its beginning. ```Java public double getStartAngle() ``` -------------------------------- ### Configure Optimization Experiment in AnyLogic Cloud Source: https://anylogic.help/9/tutorials/oil-supply/6-automatization This outlines the steps to configure an optimization experiment within the AnyLogic Cloud environment. It includes creating a new experiment, setting its type to 'Optimization', and configuring input parameters (Smin, Smax) and output requirements. ```AnyLogic Cloud Experiment Name: Optimization Experiment Type: Optimization Input Parameters: Smin: Discrete range Smax: Discrete range Stop time: Visible Requirements: Max percent out of oil: Visible Outputs: Select input Smin Select input Smax ``` -------------------------------- ### Get Path Start Position Source: https://anylogic.help/api/com/anylogic/engine/markup/IPath Returns the starting position of the path. An output Position object can be provided to store the result. ```Java Position getStartPosition(Position out) ``` -------------------------------- ### Get GIS Route Start Point Coordinates Source: https://anylogic.help/markup/gis-route Returns a Point object containing the coordinates of the starting point of the GIS route. ```Java Point getStartPoint() ``` -------------------------------- ### Run AnyLogic Private Cloud Installer Script Source: https://anylogic.help/cloud/install Executes the main installation script for AnyLogic Private Cloud. It can be run with default settings or customized using flags. ```bash sudo ./install.sh ``` -------------------------------- ### Run Model in AnyLogic Source: https://anylogic.help/tutorials/air-defense/1-creating-assets Initiates the simulation model execution. ```AnyLogic 1. Click the **Run** toolbar button. ``` -------------------------------- ### Get Blocked Zone Start Angle Source: https://anylogic.help/markup/crane Returns the starting angle of the crane's blocked zone in the specified angular units. ```Java double getBlockedZoneStartAngle(AngleUnits units) ``` -------------------------------- ### Get Statistics Start Time Source: https://anylogic.help/api/com/anylogic/engine/markup/OverheadCrane An internal API method to retrieve the start time for statistics collection, as specified in the Crane class. ```Java @AnyLogicInternalAPI public double getStatisticsStartTime() ``` -------------------------------- ### AnyLogic Advanced Java Configuration Source: https://anylogic.help/anylogic/experiments/optimization Details advanced Java configurations for AnyLogic experiments, including import statements, additional class code for custom members, Java machine arguments, and command-line arguments. ```Java // Imports section // import statements needed for correct compilation of the experiment class’ code. ``` ```Java // Additional class code // Arbitrary member variables, nested classes, constants, and methods. // These are inserted into the experiment class definition and accessible anywhere within the experiment. ``` ```Java // Java machine arguments // Specify Java machine arguments for launching the model. ``` ```Java // Command-line arguments // Specify command-line arguments to pass to the model. // Access values using String[] getCommandLineArguments() method. ``` -------------------------------- ### Get Railway Track Start Switch Source: https://anylogic.help/api/com/anylogic/engine/markup/RailwayTrack Retrieves the railway switch located at the start of the track. This is essential for understanding track connectivity and control. ```Java public RailwaySwitch getStartSwitch() ``` -------------------------------- ### Setup Root Parameters Source: https://anylogic.help/api/com/anylogic/engine/ExperimentSimulation Abstract method to set up parameters for the top-level agent of the simulation model. This method must be implemented by subclasses to define how the root agent's parameters are configured. ```Java abstract void setupRootParameters(ROOT root, boolean callOnChangeActions) // Is called to setup parameters of top-level agent. ``` -------------------------------- ### Prepare Experiment Start Source: https://anylogic.help/api/com/anylogic/engine/Utilities Internal method for preparing experiment start. Not intended for user calls and may be removed in future releases. ```Java static void prepareBeforeExperimentStart_xjal(Class experimentClass) ``` -------------------------------- ### Get Statistics Start Time Source: https://anylogic.help/api/com/anylogic/engine/markup/OverheadCraneBridge Internal API method to retrieve the start time for crane statistics. Specified in the Crane class. ```Java @AnyLogicInternalAPI public double getStatisticsStartTime() ``` -------------------------------- ### Run AnyLogic Private Cloud Installer Script Source: https://anylogic.help/9/cloud/install Executes the main installation script for AnyLogic Private Cloud. It can be run with default settings or customized using flags. ```bash sudo ./install.sh ``` -------------------------------- ### Get Start Path - AnyLogic Java Source: https://anylogic.help/api/com/anylogic/engine/markup/PathConnector Retrieves the starting path of the PathConnector. This method returns a reference to the path from which the connection originates. ```Java public P getStartPath() ``` -------------------------------- ### Get Ratio Start to End Source: https://anylogic.help/api/com/anylogic/engine/markup/MarkupSegmentArc Returns the ratio between the start and end angles of the arc. This parameter influences how the arc is drawn or interpreted. ```Java public double getRatioStartToEnd() ``` -------------------------------- ### Download AnyLogic Private Cloud Installation Script (Linux) Source: https://anylogic.help/cloud/update This snippet shows how to download the installation scripts for different editions of AnyLogic Private Cloud using wget in a Linux terminal. Ensure you have the correct URL for the edition you need. ```bash sudo wget https://cloud.anylogic.com/files/anylogic-private-cloud-lite.tar.gz ``` ```bash sudo wget https://cloud.anylogic.com/files/anylogic-private-cloud-pro.tar.gz ``` -------------------------------- ### Run Installer with Custom Installation Directory Source: https://anylogic.help/9/cloud/install Installs AnyLogic Private Cloud in a specified directory using the '--alc_home' flag. ```bash sudo ./install.sh --alc_home /<_some directory_ > ``` -------------------------------- ### Get Start Point of Path Source: https://anylogic.help/api/com/anylogic/engine/markup/ConveyorPath Retrieves the location of the path's starting point as a Point object. This method is specified by the IPath interface. ```Java public Point getStartPoint() ``` -------------------------------- ### Execute AnyLogic Private Cloud Installer Script Source: https://anylogic.help/cloud/installer-reference This is the general syntax for executing the AnyLogic Private Cloud installation script with specified actions and options. The script must be run with superuser privileges from a Linux terminal. ```bash ./install.sh **_action_** **_options_** ``` -------------------------------- ### Get Start Position of Path Source: https://anylogic.help/api/com/anylogic/engine/markup/GISRoute Returns the starting position and orientation of the path. An optional output object can be provided to store the result. ```Java public Position getStartPosition(Position position) ``` -------------------------------- ### Get Start Point of Segment - Java Source: https://anylogic.help/api/com/anylogic/engine/markup/IMarkupSegment Retrieves the starting point of the markup segment. The result is stored in the provided Point object. ```Java Point getStart(Point out) ``` -------------------------------- ### Run Installer with Custom Installation Directory Source: https://anylogic.help/cloud/install Installs AnyLogic Private Cloud in a specified directory using the '--alc_home' flag. ```bash sudo ./install.sh --alc_home /<_some directory_ > ``` -------------------------------- ### Create New Experiment Server Source: https://anylogic.help/api/com/anylogic/engine/gui/ExperimentServerSupport A static method to create a new experiment server instance. It requires an IExperimentHost object as input and returns an IExperimentServer. ```Java public static IExperimentServer newServer(IExperimentHost host) ``` -------------------------------- ### Get Y Coordinate of Segment Start Point Source: https://anylogic.help/api/com/anylogic/engine/Segment2D Retrieves the y-coordinate of the starting point of the 2D segment. This method is specified by the Locatable2D interface. ```Java double getY() Returns the y coordinate of the start segment point. Specified by: getY in interface Locatable2D Returns: the y coordinate of the start segment point ``` -------------------------------- ### Get Z Coordinate of Start Point Source: https://anylogic.help/api/com/anylogic/engine/Segment3D Retrieves the z coordinate of the start segment point. This method is specified by the Locatable3D interface. ```Java double getZ() Returns the z coordinate of the start segment point. Specified by: getZ in interface Locatable3D Returns: the z coordinate of the start segment point ``` -------------------------------- ### Set Start Date Source: https://anylogic.help/9/cloud/api/java Sets the simulation's start date using a Java Date object. ```Java void setStartDate(Date date) ``` -------------------------------- ### AnyLogic Cloud Private Cloud Installation Script Source: https://anylogic.help/cloud/release-notes A simple installation script was introduced in Cloud 2.1.1 to facilitate the easy deployment of Private Cloud instances. This script automates the setup process for users managing their own AnyLogic Cloud environments. ```Shell #!/bin/bash # AnyLogic Cloud Private Cloud Installation Script echo "Starting AnyLogic Cloud installation..." # Placeholder for installation commands # e.g., downloading components, configuring services, setting up database echo "Downloading AnyLogic Cloud components..." # curl -O echo "Configuring services..." # ./configure_services.sh echo "Setting up database..." # ./setup_database.sh echo "AnyLogic Cloud installation complete." ``` -------------------------------- ### Set Start Time Source: https://anylogic.help/9/cloud/api/java Sets the simulation's start time, specifying the value and its corresponding TimeUnits. ```Java void setStartTime(double value, TimeUnits units) ``` -------------------------------- ### Create a New Optimization Experiment in AnyLogic Source: https://anylogic.help/anylogic/experiments/optimization This snippet outlines the steps to create a new optimization experiment within the AnyLogic software. It involves navigating the project view and selecting the optimization experiment type. ```AnyLogic 1. In the **Projects** view, right-click (macOS: Ctrl + click) the model item and choose **New > Experiment**. 2. Choose the **Optimization** option from the **Experiment Type** list. 3. Type the experiment name in the **Name** edit box. 4. Choose the top-level agent of the experiment from the **Top-level agent** drop-down list. 5. Optionally, select **Copy model time settings from** and choose an experiment. 6. Click **Finish**. ``` -------------------------------- ### Get Command Line Arguments Source: https://anylogic.help/anylogic/experiments/optimization Returns an array of command-line arguments passed to the experiment upon model startup. Returns an empty array if no arguments are provided. ```Java String[] getCommandLineArguments() ``` -------------------------------- ### Get Arc Start Angle Source: https://anylogic.help/api/com/anylogic/engine/presentation/ShapeArc Retrieves the current starting angle of the arc. The angle is in radians, measured clockwise from the 3 o'clock position. ```Java public double getAngleStart() ``` -------------------------------- ### Get Statistics Start Time (Java) Source: https://anylogic.help/api/com/anylogic/engine/markup/Robot Retrieves the start time for robot statistics. This method is marked with @AnyLogicInternalAPI and is specified by the IRobotDescriptor interface. ```Java @AnyLogicInternalAPI public double getStatisticsStartTime() ``` -------------------------------- ### Download AnyLogic Private Cloud Pro Source: https://anylogic.help/cloud/install This command downloads the latest version of AnyLogic Private Cloud Pro using wget. It requires superuser privileges (sudo) and fetches the compressed tarball from the specified URL. ```bash sudo wget https://cloud.anylogic.com/files/anylogic-private-cloud-pro.tar.gz ``` -------------------------------- ### Get Start Point Location (Output Parameter) Source: https://anylogic.help/api/com/anylogic/engine/markup/QueuePath Retrieves the coordinates of the starting point of the QueuePath, storing the result in the provided Point object. ```Java public Point getStartPoint(Point out) ``` -------------------------------- ### Create AnyLogic Model Documentation Source: https://anylogic.help/anylogic/ui/menu Opens a dialog to generate documentation for the selected AnyLogic model in various formats like PDF, DOCX, and HTML. ```AnyLogic Create Documentation... ``` -------------------------------- ### Launch Experiment Source: https://anylogic.help/api/com/anylogic/engine/AutotestExperimentHost Creates and optionally runs an experiment, and starts frame collection. This is the primary method for initiating a simulation run. ```Java void launch(boolean startServer, boolean startExperiment) ``` -------------------------------- ### Get Pipe Start Position Source: https://anylogic.help/api/com/anylogic/engine/markup/Pipe Retrieves the position (coordinates and orientation) of the pipe's starting point. The 'out' parameter is for object reuse. ```Java Position getStartPosition() ``` ```Java Position getStartPosition(Position out) ``` -------------------------------- ### Get End Arc Start Angle (Java) Source: https://anylogic.help/api/com/anylogic/engine/markup/MarkupSegmentArc Retrieves the starting angle of the end arc of a segment. This method is marked as internal to AnyLogic. ```Java @AnyLogicInternalAPI public double getEndArcStartAngle() ``` -------------------------------- ### AnyLogic: Launch Experiment Source: https://anylogic.help/api/com/anylogic/engine/gui/ExperimentHost Creates and optionally runs an experiment, and starts frame collection. This is the primary method for initiating a simulation run. ```Java void launch(boolean startServer, boolean startExperiment) ``` -------------------------------- ### AnyLogic Cloud Client Initialization Source: https://anylogic.help/cloud/api/custom-ui Shows the initial step in the main.js file for creating an AnyLogic Cloud client instance. This requires providing the API key and host URL for authentication and connection to the Cloud instance. ```JavaScript // Creation of the Cloud client instance, given the API key and host URL. // const cloudClient = new AnyLogicCloudClient(apiKey, hostUrl); ``` -------------------------------- ### Get X Coordinate of Segment Start Point Source: https://anylogic.help/api/com/anylogic/engine/Segment2D Retrieves the x-coordinate of the starting point of the 2D segment. This method is specified by the Locatable2D interface. ```Java double getX() Returns the x coordinate of the start segment point. Specified by: getX in interface Locatable2D Returns: the x coordinate of the start segment point ``` -------------------------------- ### Create Directory (Linux) Source: https://anylogic.help/9/cloud/install Creates a new directory in the Linux file system for downloading the Private Cloud installation package. ```bash mkdir _directory_ ``` -------------------------------- ### Start Controller Docker Container Source: https://anylogic.help/9/cloud/troubleshooting Starts the Docker container named 'controller'. This is typically done after stopping and restarting the Docker service. ```bash docker start controller ``` -------------------------------- ### Initialize AnyLogicCloudClient for Public Cloud Source: https://anylogic.help/cloud/api/java Demonstrates how to create an instance of the AnyLogicCloudClient for the public AnyLogic Cloud service. It requires an API key obtained from the AnyLogic Cloud UI. ```Java String apiKey = ""; AnyLogicCloudClient client = new AnyLogicCloudClient( apiKey ); ``` -------------------------------- ### Get Position at Offset from Start Source: https://anylogic.help/api/com/anylogic/engine/markup/QueuePath Calculates and returns the position along the markup element at a specified distance from the start point. An output object can be provided. ```Java public final Position getPositionAtOffset(double offset, Position out) ``` -------------------------------- ### Get Start Position of Markup Element Source: https://anylogic.help/api/com/anylogic/engine/markup/QueuePath Retrieves the start position, including orientation, of the markup element. An optional output object can be used for the result. ```Java public Position getStartPosition(Position out) ``` ```Java public Position getStartPosition() ``` -------------------------------- ### Start Statechart Source: https://anylogic.help/api/com/anylogic/engine/Statechart Initializes and activates the statechart. This method should be called when the owning agent starts, triggering initial transitions and entry actions. ```Java @AnyLogicInternalCodegenAPI public void start() ``` -------------------------------- ### Get Start Point of Markup Element Source: https://anylogic.help/api/com/anylogic/engine/markup/QueuePath Returns the coordinates of the start point of the markup element. An optional output object can be provided to store the result. ```Java public Point getStartPoint(Point out) ``` ```Java public Point getStartPoint() ``` -------------------------------- ### Create New AnyLogic Model Source: https://anylogic.help/tutorials/pedestrian/1-simulating-simple-pedestrian-flow Steps to create a new AnyLogic model, including naming the project, specifying the save location, and setting model time units. This process initializes the simulation environment. ```AnyLogic 1. Click the **New** toolbar button. The **New Model** wizard appears. 2. Specify the name of the new project. In the **Model name** edit box, type: Subway Entrance Hall. 3. Specify the location where you want to store your model files. Browse for the existing folder using the **Browse** button, or type the name of the folder you want to create in the **Location** edit box. 4. Select **minutes** as the **Model time units**. 5. Click **Finish** to complete the process. ``` -------------------------------- ### Initialize AnyLogicCloudClient for Public Cloud Source: https://anylogic.help/9/cloud/api/java Demonstrates how to create an instance of the `AnyLogicCloudClient` for connecting to the public AnyLogic Cloud. It requires an API key obtained from the AnyLogic Cloud UI. ```Java String apiKey = ""; AnyLogicCloudClient client = new AnyLogicCloudClient( apiKey ); ``` -------------------------------- ### Get Pipe Start Point Coordinates Source: https://anylogic.help/api/com/anylogic/engine/markup/Pipe Returns the coordinates of the pipe's starting point. The 'out' parameter is used for efficient object reuse. ```Java Point getStartPoint() ``` ```Java Point getStartPoint(Point out) ``` -------------------------------- ### Create Default Optimization UI Source: https://anylogic.help/anylogic/experiments/optimization Generate a default user interface for an AnyLogic optimization experiment. This UI provides visual feedback on the optimization process, including current and best solutions. ```AnyLogic 1. Select the optimization experiment in the **Projects** view. 2. Go to the **Properties** view. 3. Click the **Create default UI** button. ```