AnyLogic model time only from 06:00-22:00 - time

is there a way that my model runs only for 16 hours a day instead of 24 hours?
My goal is to skip the time between 22:00 and 06:00.
I tried to change the model times properties -> nothing found to change
Another idea is that an event occurs every evening and changes the model time to the next morning, but I could not find a function to change the model time :(

You cannot simply exclude some time. You can:
fast forward through time at 10pm (but model events will still be simulated if you have them --> your responsibility to not have anything happen)
switch to your own time mode where you convert time() steps into your frame of reference (i.e. your model is in HOUR time units and after the first 22 hours, you assume implicitly that the next hour would be 6am again)
just model 16 hrs in 1 model run but re-run that several times via a (freerun) parameter-variation experiment (where each run is a new day) and you accumulate results via the experiment

Related

How to handle DST correctly in Airflow 2.0+ for different regions?

I am trying to get execution date using
execution_dt = f"{{{{execution_date.in_timezone('{timezone}').strftime('{date_partition_format}')}}}}"
but the issue that I am facing is that the polling is happening for the previous hour right when DST is taking over, but is able to correct itself for subsequent runs.
So for example if the DST takes place and the clock has gone from 7th->8th hour, it would still try to poll for 7th hour, but in the subsequent run which is done after 2 hours, it will poll for 10th hour (in accordance with previous 8th hour).

Laravel - Delay Job then update to delay further

I have a Laravel project that receives session data via an API.
A client will send data to the API for storage every 30 seconds during a session.
If the client does not send data for say 2 minutes, then I would like to trigger a job to process the session data with the assumption that the session has finished.
My initial thought was to dispatch a queue job with a 2 minute delay every time the data comes in with some sort of reference to the client/session. However, I seems that once I dispatch the job, there is no way of updating the delay again when new data comes in within the 30 seconds.
Is there an easy way to achieve this or does anyone have any other suggestions on how this may be achieved another way?
I hope this is clear.
EDIT
To provide an example:
Let's say game players are accumulating points every 30 seconds, their database record gets updated with this score every 30 seconds.
There is no way of knowing that this player has stopped accumulating points, in other words finished the game and can be processed, eg. get's an email notification, etc.

How to run a job on specific times every day from Monday to Friday in Rundeck?

Is there any way to run the job every day from Monday to Friday at 45 mins time interval from 2.45 pm to 5 pm. (The job should run at 2.45pm , 3.30pm, 4.15, 5.00). Please help.
Thank you.
I know of two ways:
One way is to create four jobs scheduled at a single time every Mon-Fri. Give each a single step, which is a job reference to the real job. For example, the first job would be scheduled to run at 2.45pm every Mon-Fri, the second at 3.30pm, etc. You're not making copies of the existing job, just single-step jobs that reference the original.
That approach lets you manage each scheduled time individually.
Another way is to schedule it every 15 minutes from 2.00pm to 5.45pm, and add an initial step that fails if the time is before 2.45pm or after 5.01pm. If you don't want to see these failures, you could add an error step to that first step which marks the job succeeded even if it's really skipping all the real steps.
Paul M. Lambert
Platform Solutions Architect
Rundeck, Inc.

Jfxtras Agenda - Better Support for Non-overlapping Appointments

How do I make the Jfxtras Agenda component treat the following two appointments as non-overlapping? Also, is there a way to increase the snap-to-grid granularity of the grid from 5 minutes to 30 minutes, to mimic Outlook? With the 5 minutes precision, it is very difficult to create back-to-back appointments, without making them overlap, or creating gaps between them.
Appointment 1
Start: 2pm
End: 5pm
Appointment 2
Start: 5pm
End: 9PM
I fixed the consecutive appointments rendering issue, the new snapshot should work ok. As for the rounding, I will add a CSS stylable property where this can be set later today.
I simply modified the appointment callback. To make it so that only 15 minute segments could be used to make appointments I used dateTimeRange.getStartLocalDateTime().minusMinutes(dateTimeRange.getStartLocalDateTime().getMinute()%15)
You can use this for the end time as well, and from then on you will only get appointments made with 15 min intervals. Just change the 15 to change the interval. The only potential downfall is that you could frustrate users if they shoot too low when dragging, but that could be solved as well with a simple if statement.

Daylight Saving and postdated times

We recently changed our application in an attempt to support displaying times in the timezone that the time was recorded in. We have run into a problem with getting times correct on Daylight Saving changes.
We implemented it by storing the offset separately but the UTC time for each time. Then when displaying the time, we add the static offset to the UTC time to show the time the user entered.
The issue we are running into is entering times that occurred before the time change. We are converting the entered time to UTC, but the conversion back is typically an hour off.
Obviously the problem is we are storing the offset of the "current" local time and not the offset of the time that the user entered time represents. But most of our users do not follow thru with the time change during the course of the event. So if they are documenting times at 1:55 and they need to document a time 10 minutes later they would put 2:05 instead of 3:05.
This would seem to preclude the use of using IsDaylightSavingTime and altering the display time with using the "appropriate" offset.
So I am kinda stuck on what to do to display the time that the user entered despite what the offset "should be".

Resources