For context, I just started using AnyLogic a week ago and am quite new at this. I am trying to make a simple process model of a specific logistics process and I want to be able to find the optimal total cost of the process (which is calculated by the time taken of each sub process multiplied by the cost of each worker used) by limitng the total amount of the time the whole process takes.
I made my objective function the summation of the costs from the 3 different resources that I use and I wanted to put the total time taken for the process as a constraint, however I am struggling to find a way to do this.
On the optimization experiment, I will assume you already know and have the objective function configured.
However, you also want some constraint on the maximum processing time - however, in AnyLogic experiment the constraints are only pre-conditions.
What you are describing is a Requirement. These are evaluated post-simulation, and they can have any expression.
For example, if you have an output you could add root.total_time <= 10
as a requirement (a post-simulation evaluated constraint).