AnyLogic
Expand
anyLogistix
Search
Font size
Toggle Sidebar
AnyLogic Help
Introduction
AnyLogic activation
Activating AnyLogic with the key
Activating AnyLogic with USB dongle
Activating AnyLogic with Team License Server
Team License Server
AnyLogic editions comparison
AnyLogic Professional
AnyLogic support services
System requirements
Release notes
Style conventions
Demo models
Basic concepts
Models
Creating a new model
Opening a model
Saving models
Automatic backup and recovery of models
Closing models
Model file formats
Renaming model elements
Managing model elements
File resources
Documenting a model
Hierarchical models
Modeling approaches
Discrete Event modeling
System Dynamics modeling
Agent Based modeling
Dynamic Systems modeling
Multimethod modeling
Combining modeling methods
AnyLogic user interface
AnyLogic UI
Welcome page
Graphical editor
Graphical editor
Visible area and coordinates
Frame
Diagram grid
Working with shapes and elements
Moving and zooming the diagram UI
Layers
Graphical editor: hotkeys and mouse shortcuts
Simultaneous work with several diagrams
Projects view
Palette view
AnyLogic palettes
Properties view
Problems view
Console view
Working with views
AnyLogic toolbars
AnyLogic status bar
AnyLogic menu
Undo and redo
Code Completion Master
Text search
Keyboard and mouse shortcuts
AnyLogic preferences
Perspectives
Icon modifiers
Java editor
Using relative and absolute paths
Running a model
Running a model
Controlling the model execution
Running the model for a certain time period
Model window
Control panel
Developer panel
Customizing model window
Navigating through a running model
Model time
Model execution logs
Saving and restoring the model snapshot
Model execution order
Export models to Java applications
Engine API
Agent-based modeling
Agent
Creating a population of agents
Creating an agent population based on DB data
Agent population properties
Adding and removing agents from population
Space in agent-based models
GIS space
Continuous space
Discrete space
Agent movement
Movement in continuous space
Movement in discrete space
Movement in GIS space
Agents movement inside and outside network
Agent movement speed
Agent animation rotation
Agent action on arrival
Agent interaction
Communication between agents
Standard agent contacts network
Environment
Link to agents: custom agent connections
Collecting statistics on agents
Agent API
Functions to collect statistics on agent population
Select an agent or agents from a population
Sorted list of agents within a population
Using agents in a process flow
Agent inheritance
Agent synchronization
Optimizing the performance of an agent population
Inspecting agents
System dynamics
Stock
Flow
Dynamic variable
Link
Loop
Shadow
Dimensions
Arrays
System dynamics functions
delay
delay1
delay3
delayInformation
delayMaterial
forecast
npv
npve
pulse
pulseTrain
ramp
smooth
smooth3
step
trend
Units and unit checking
Changing values of flows and dynamic variables
Importing Vensim® models
Multimethod models with SD
Layout of large SD models
Connecting SD variables
Hierarchical SD modeling
Numerical solvers for SD
Defining model logic
Events
Event
Dynamic event
Events in simulation engine
Managing event queue
Statecharts
Statecharts
Statechart entry point
State
Initial state pointer
Transition
Branch
History state
Final state
Execution order. Example
Statechart declaration rules
Checking the agent’s state
Statechart functions
Highlighting statechart activities
Animating behavior defined by a statechart
Parameters vs. variables: what to use?
Parameters
Parameter
Dynamic parameters
Altering parameters of embedded agents
Altering parameters of experiment’s top-level agent
Generic parameters
Parameter propagation
Variable
Collections
Collection
Working with collection contents
Functions to collect statistics on a collection
Select element(s) from a collection
Sorted list of elements within a collection
Option list
Viewing values and charts of variables at runtime
Modifying variables and parameters at runtime
Function
Schedule
Weekly schedule
Calendar schedule
Schedule with no calendar mapping
Exceptions
Schedule preview
Loading schedule from DB
Schedule API
Table function
GIS models
GIS map
GIS markup shapes
GIS point
GIS route
GIS region
GIS network
Finding locations on GIS map
Placing agents in GIS space
Defining routes on GIS map
Movement in GIS space
Scaling agent animations on GIS map
GIS agents in flowcharts
Alternative route providers for cars and trains
Create GIS network by code
Converting GIS shapefiles to space markup shapes
Taking GIS models offline
Comparison table of the routing options
2D and 3D animation
Presentation shapes
Line
Polyline
Curve
Rectangle
Rounded rectangle
Oval
Arc
Text
Image
Canvas
Group
3D animation
3D window
3D object
Camera
Light
Omniverse connector
Moving, rotating, and zooming 3D scene
Standard 3D objects
Painting standard and imported 3D objects
Clipping 3D scene
Importing 3D objects into a model
View area
CAD drawing
Pictures palette
Editing presentation shapes
Levels
Layers
Scale
Agent presentation
Icon
Colors
Textures
Shape replication
Animating replicated objects
Creating a navigation bar
Accessing the presentation
Controls
Button
Check box
Edit box
Radio buttons
Slider
Combo box
List box
File chooser
Progress bar
Linking controls to parameters
Setting up parameters prior to model execution
Replicated controls
Working with model data
Data analysis items
Data set
Statistics
Histogram data
Histogram 2D data
Output
Updating data sets
Viewing and copying collected data
Visualizing data using charts
Charts
Bar chart
Stack chart
Pie chart
Plot
Time plot
Time stack chart
Time color chart
Histogram
Histogram 2D
Chart area
Time window
Scaling charts
Chart legend
Chart grid and labels
Updating charts
Changing chart appearance at runtime
Databases and external data sources
AnyLogic database
AnyLogic database
Creating database tables
Importing database tables
Exporting data to MS Excel file
Use cases
Creating an agent population based on DB data
Source generates agents according to timestamps in DB
Source generates agents with parameters read from DB
Reading parameter value from DB
Reading data from AnyLogic DB. Use cases
Model execution logs
Database view
Group of tables
Database table editor
Back up and restore database
Writing queries
Query Constructor
Writing database queries
Executing functions from the database
SelectQuery API
AnyLogic DB data types
External database
Database element
Database API
Query
Insert
Update
Key value table
Excel file
Text file
Experiments framework
Experiments
Simulation
Optimization
Parameter variation
Calibration
Compare runs
Monte Carlo
Sensitivity analysis
Reinforcement Learning
Custom experiment
Stochastic modeling
Reproducible model runs
Probability distributions
Choose Probability Distribution wizard
Custom distribution
Random number generator
How to select a random...
FAQ
How to...
Troubleshooting
Tutorials
Job Shop (Process Modeling Library)
Phase 1. Creating a simple model
Phase 2. Adding resources
Phase 3. Creating 3D animation
Phase 4. Modeling pallet delivery by trucks
Phase 5. Modeling CNC machines
Lead Acid Battery Production (Material Handling Library)
1. Creating electrode batches
2. Modeling forklifts
3. Electrodes wrapping and group assembly
4. Battery assembly
5. Battery treatment and QA
6. Delivery to charging location
7. Separating cathode and anode preparation
8. Modeling electrodes production from lead rolls
Supply Chain GIS (Agents)
1. Creating a distributor
2. Creating retailers
3. Adding trucks
4. Modeling product orders
5. Further model development
Bank Office (Queuing system)
1. Creating a simple model
2. Creating model animation
3. Adding tellers
4. Collecting utilization statistics
Bass Diffusion (System Dynamics)
0. Analyzing the model
1. Creating a new model
2. Adding stocks
3. Adding adoption flow
4. Adding constants
5. Initial values of stocks
6. Adding variables
7. Configuring simulation
8. Running the model
9. Adding charts
10. Replacement purchases
11. Demand cycle
12. Promotion strategy
13. Optimizing the strategy
Intersection (Road Traffic Library)
1. Drawing a road
2. 3D animation
3. Drawing an intersection
4. Adding a parking lot
5. Adding buses
6. Adding traffic lights
Subway Entrance (Pedestrian Library)
1. Simple pedestrian flow
2. Adding fare gates
3. Pedestrian density map
4. Adding ticket vending machines
Hump Yard (Rail Library)
1. Drawing a rail yard
2. Defining logic
3. Creating rail car types
4. Rail car classification
Wind Turbine Maintenance (Agents)
1. Creating agent types
2. Defining transport base
3. Defining Transport logic
4. Maintenance Center logic
5. Turbine logic
6. Finalizing Transport logic
7. Exploring the model
Air Defense System (Agents)
1. Creating assets
2. Creating bombers
3. Creating bombs
4. Adding air defense system
Library Reference Guides
Process Modeling Library
Blocks
Source
Source generates agents according to timestamps in DB
Source generates agents with parameters read from DB
Sink
Delay
Queue
SelectOutput
SelectOutput5
Hold
Match
Split
Combine
Assembler
MoveTo
ResourcePool
Seize
Release
Service
ResourceSendTo
ResourceTaskStart
ResourceTaskEnd
Downtime
Enter
Exit
Batch
Unbatch
Dropoff
Pickup
RestrictedAreaStart
RestrictedAreaEnd
TimeMeasureStart
TimeMeasureEnd
ResourceAttach
ResourceDetach
RackSystem
RackStore
RackPick
Conveyor
PML Settings
Auxiliary blocks
Wait
SelectOutputIn
SelectOutputOut
PlainTransfer
Space markup
Network
Path
Nodes
Rectangular node
Point node
Polygonal node
Attractor
Pallet rack
Create network by code
Functions of an agent residing in a network
Custom agent types
Resources
Custom resource types
Resource functions
Using agents in a process flow
Color animation of a running flowchart
Pull vs. Push agent flow protocol
Material Handling Library
Blocks
Convey
ConveyorEnter
ConveyorExit
MoveByCrane
SeizeCrane
ReleaseCrane
TransporterFleet
MoveByTransporter
SeizeTransporter
ReleaseTransporter
TransporterControl
Store
Retrieve
StorageSystem
Markup for material handling models
Conveyor network
Conveyor
Reversible conveyor
Conveyor spur
Transfer table
Turntable
Turn station
Station
Position on conveyor
Custom station
Conveyor point node
Jib crane
Overhead crane
Bridge
Storage
Lift
Path
Rectangular node
Point node
Polygonal node
Attractor
Wall
Rectangular wall
Circular wall
Network port
Level gate
Density map
Create network by code
Create conveyor network by code
Creating custom material item types
Material item dimensions
Material item API
Transporters
About transporters
Free space navigation
Path-guided navigation
Creating custom transporter types
Transporter API
Custom routing
RouteData API
CraneProgram API
Simulating a spiral conveyor
Pedestrian Library
Blocks
PedSource
PedSink
PedGoTo
PedService
PedWait
PedSelectOutput
PedEnter
PedExit
PedEscalator
PedElevator
PedChangeLevel
PedGroupAssemble
PedGroupChangeFormation
PedGroupDisassemble
PedSettings
PedAreaDescriptor
Markup for pedestrian simulation
Walls
Wall
Rectangular wall
Circular wall
Target line
Services
Service with lines
Service shape
Queue line
Serpentine queue
Service with area
Service shape
Polygonal node
Network nodes in pedestrian models
Rectangular node
Polygonal node
Attractors
Sloped nodes
Escalator group
Escalator
Elevator
Pathway
Pedestrian flow statistics
Density map
Selecting markup shapes
Flowchart animation
Creating custom pedestrian types
Animating pedestrians
Pedestrian groups
Separating pedestrian counterflows
Modeling stairs
Modeling a shuttle train
Simulating a pedestrian crossing
Pedestrian API
Rail Library
Blocks
TrainSource
TrainDispose
TrainMoveTo
TrainCouple
TrainDecouple
TrainEnter
TrainExit
RailSettings
Rail yard topology
Railway network
Track
Position on track
Switch
Converting GIS shapefiles to rail markup shapes
Create rail yard by code
Route
Train
RailCar
Modeling a shuttle train
Preventing train collisions
Color animation of the running flowchart
Road Traffic Library
Blocks
CarSource
CarDispose
CarMoveTo
CarEnter
CarExit
TrafficLight
RoadNetworkDescriptor
Drawing roads
Road network
Road
Intersection
Stop line
Bus stop
Parking lot
Converting GIS shapefiles to a road network
Create road network by code
Flowchart animation
Controlled intersection
Displaying traffic jams
Custom car types
Creating cars of different colors and types
Simulating a pedestrian crossing
Car API
Car route
Fluid Library
Blocks
FluidSource
FluidDispose
Tank
Valve
Pipeline
FluidSelectOutput
FluidSelectInput
FluidSplit
FluidMerge
ProcessTank
MixTank
BulkConveyor
FluidConvert
FluidExit
FluidEnter
AgentToFluid
FluidToAgent
FluidPickup
FluidDropoff
Drawing animation for fluid models
Storage tank
Pipe
Bulk conveyor belt
Batches
Fluid Library statistics
Color animation of the running flowchart
Fluid Library ports
Connecting flowchart blocks
Static, dynamic, and code parameters
Accessing agent parameters from a flowchart
Counting agents passed through the block
Copying and moving flowchart blocks
Measuring time in system
Creating a custom flowchart block
Replicated blocks
Advanced Modeling with Java
Java basics for AnyLogic
Java in AnyLogic
Primitive data types
Classes
Variables (local variables and class fields)
Functions (methods)
Expressions
Arithmetic expressions
Relations and equality
Logical expressions
String expressions
Conditional operator ? :
Statements
Statements
Variable declaration
Function call
Assignment
If-then-else
Switch
For loop
While loop
Block {...} and indentation
Return statement
Java arrays and collections
Arrays
Collections
Comments
Naming conventions
Accessing model elements from code
AnyLogic functions
Mathematical functions
Probability distributions
Custom distribution
bernoulli
beta
beta (truncated)
binomial
binomial (truncated)
cauchy
chi2
erlang
exponential
exponential (truncated)
gamma
gamma (truncated)
geometric
gumbel1
gumbel2
hypergeometric
laplace
logarithmic
logistic
lognormal
negativeBinomial
negativeBinomial (truncated)
normal
normal (truncated)
pareto
pert
poisson
poisson (truncated)
randomFalse
randomTrue
rayleigh
triangular
triangular (truncated)
triangularAV
uniform
uniform_discr
uniform_pos
weibull
weibull (truncated)
Time functions
addToDate
date
dateToTime
day
differenceInCalendarUnits
dropTime
getAmPm
getDateWithTimeNextTo
getDayOfMonth
getDayOfWeek
getDayOfYear
getHour
getHourOfDay
getMillisecond
getMinute
getMonth
getSecond
getTimeoutToNextTime
getYear
hour
millisecond
minute
second
time
timeToDate
toDate
toDateInMillis
toModelTime
toTimeoutInCalendar
toTimeUnits
week
System dynamics functions
delay
delay1
delay3
delayInformation
delayMaterial
forecast
gammaLog
npv
npve
pulse
pulseTrain
ramp
smooth
smooth3
step
trend
Print operators
traceToDB
traceln
trace
copyToClipboard
Database functions
Error signaling functions
Information functions
Formatting functions
Functions working with arrays (type[ ])
AnyLogic constants
Mathematical constants
Constants for units
AnyLogic class reference
Debugging a model
Checking model syntax
Runtime errors
Keeping track of a simulation
Locating the error log file
Custom error handler
Launching in debug mode
Breakpoints
Evaluating expressions
Inspecting values
Stepping execution
Debug view
Expressions view
Variables view
Memory analyzer
Creating custom AnyLogic libraries
Creating a library
Library editor
Exporting a library
Managing libraries
Agent's icon
Adding library blocks into a model
Adding libraries to model dependencies
Library developer mode
Ports
Connecting ports at runtime
Implementing agent flow in custom libraries
Connector
Creating Java classes
Adding Java classes
Adding Java interfaces
Adding external Java classes
Team development
Git
About Git in AnyLogic
Working with Git repositories
Making changes with commits
Branching
Collaborating with other developers
SVN
Typical SVN work cycle
Checkout from SVN
Importing a new project into an SVN repository
Updating from SVN
Committing to SVN
Action charts. Defining algorithms visually
Creating action charts. Tutorial
Action chart
Code
Decision
Local variable
While loop
Do while loop
For loop
Return
Break
Editing action chart blocks
Code formatting
Integration
External applications
Native code: JNI and JNA
Python: The Pypeline library
Omniverse
Prerequisites
Setup
API
API Reference
AnyLogic Cloud Help
About Cloud
AnyLogic Cloud options
AnyLogic Private Cloud
Release notes
Cloud subscription
About
Management
Creating and editing models
Administrator guide
Private Cloud: System requirements
Installing Private Cloud
Updating Private Cloud
Administrator panel
Authorization options
LDAP and AD authentication
OAuth 2.0
Architecture
Configuration files
Backing up and restoring
Custom localization
Troubleshooting
Installer reference
Uninstalling Private Cloud
Cloud API
REST API
JavaScript API
Python API
Java API
Data conversion
Custom UI
AnyLogic Cloud: Tutorial
Sign up and log in
Exporting a model to AnyLogic Cloud
Run configuration
Title screen
AnyLogic Cloud toolbar
Model screen
Model versions
Sharing your model
Experiments
About experiments
Dashboard
Experiment screen
Charts
Comparing results
Exporting data
Completed runs
About
View
Export to Excel
User profile
Embedding model animation
Home
Advanced Modeling with Java
AnyLogic functions
Time functions
date
date()
Model time
Time functions
API reference - Utilities class
date()
Description
Returns the current model date with respect to the start time/date and the model time unit.
Result
Type
Description
java.util.Date
Current model date.
How can we improve this article?
Send
date()
Model time
Time functions
API reference - Utilities class
We use cookies to give you the best online experience, including personalized content, advertising, and web analytics. You can reject cookies by changing your browser settings. To learn more about the cookies we use, see our
Cookie Policy
.