AnyLogic Select Output Issue - anylogic

I'm pretty new to AnyLogic and I want to know how I formulate my condition in the Select Output block. Regarding my queue, I have a maximum capacity of 2, and if the queue is full, the new arriving customer has to leave, and therefore does not wait, so this would be a lost customer. Can anyone help me out here?
Thank you.
enter image description here

Simply use queue.size()<2
Please first try to work through the step-by-step tutorials as this is, indeed, very basic ;)

Related

Creating a dataset from queue size in service block

I am a newbie to anylogic simulations. In my project, I want to take out queue size at every time step from a service block and create a dataset. Similarly, I also want to take out the mean queue size from the same after every replication and create a dataset of that as well. Can anyone help me with how to do it?
Welcome to SOF and AnyLogic. Best post separate issues for separate questions, see this intro to SOF for AnyLogic users.
But for now:
I want to take out queue size at every time step from a service block and create a dataset.
Use a cyclic event that calls myDataSet.add(myServiceBlock.queue.size())
I also want to take out the mean queue size from the same after every replication and create a dataset of that as well.
In your experiment, add a DataSet myMeanResults. In the "On Simulation end" code box of your experiment, call myMeanResults.add(root.myDataSet.getYMean())
Make sure your Datasets can keep enough values!
Also, always check the AnyLogic help and example models. Very often, these basics are covered there already. Else, tell us what you already tried :)

Adding labor cost as the model simulates on AnyLogic?

I created a variable, called labour cost. And I want this to increase, for example by 40 every 900s that the simulation is run. Can this be done?
Add an event with the following properties:
Instead of variable, use the name of your total cost variable of course.
Anything can be done with AnyLogic ;)
Use a recurring event that triggers this code every 900s:
myVariable+=40;
This is very basic so I also suggest you dig into all step-by-step tutorials that come with the help :)

Open date strategy variable

sorry my english. Im not native speaker.
Hi all, i have a dude about stops in Pine-script.
I'm tring to make a specific trail stop in my strategy script.
I want to make a for loop to evaluate all candless from open strategy date until today.
Has pine-script any variable which contains open position date or number of days or similar thing ?
thank you very much.
There is no variable that I know of that records the date of entries, but since it's your strategy, you should know when it's entering/exiting trades, so you should be able to save the time when those events occur.
Also, rather than waiting for a number of bars to elapse and go back over them with a for loop, it will be much more efficient for you to start tracking whatever info you need from the moment your condition triggers. For most needs, this should allow you to forego using a for loop.
I was just reading this thread: Strategy with sample code
And noticed that it has some work with trailing stop in it. Basically, you should be able to find some pine scripts that work with trailing stops and tailor it to your needs.

Azure Batch: Do I get charged after deleting job but still keep pool?

I found it takes a few minutes to create pool and prepare the job, I am thinking to keep the pool to get rid of the overhead.
Thanks
Lidong
I can try and answer this but folks can correct me, AFAIK: refer to this document: https://azure.microsoft.com/en-us/pricing/details/batch/
In batch as doc states: “Virtual machines are billed per-second rounded down to the last minute.”
Most of the pricing structure is well document and seems like it’s just few cents per hour.
One general suggestion could be that once you are done with your compute you can always re-scale your pool back to 0.
You probably want to add more to your question if you are keen to discuss any specific scenario so that right folks can answer in detail.
Hope this helps, but add more most o the content above is general purpose. Thanks
Update https://azure.microsoft.com/en-us/pricing/details/virtual-machines/linux/

MS Access 2007 Form Logic

This is my first post on Stack. I've been reading for a while and learned a lot. Thanks to all those who share on this site.
My office runs still runs MS Access 2007 and I was tasked with creating a database even though I had no experience doing so. I read "The Missing Manual for Access 2007", another book that I can't remember the name of, multiple posts on this site and Microsoft's and can't find the solution to what I need to do.
Issue: I want to have two fields on a form referring to the same table, each with look ups but want the second field's options to be dependent on the first. For example, I want the first field for "Region" to list options to select 1 2 3 or 4. If someone chooses 1, I want the second field only listed offices that are in Region 1. This doesn't seem like it should wildly complicated but I cannot figure out how to do it.
I have tried using the expression builder to create nested IIf functions, filtering queries, macros and a few other things but don't have the depth of knowledge to make any of them accomplish what I'm looking to do.
Is there a way to accomplish this easily without VBA? Or if VBA is the only way, can someone point me to a good code that I hopefully figure out and edit for this purpose?
Thank you for any help and advice. Please let me know if I left out any useful information
Steve
enter image description here