Runtime and Model time is not in sync in Anylogic - anylogic

I am working on car workshop model which is similar to assembly line. I have setup a model time in properties as 8:00 AM. But when I run the simulation the model start working from 10:30 AM. I am not sure why this is happening. Could anybody help me to understand why these two time are not in sync.
Regards
[1]: https://i.stack.imgur.com/slFYw.png
[2]: https://i.stack.imgur.com/TVMxU.png

your simulation is running correctly, it starts at 8:00 am, and after 6.5 hours, it's 14:30
8+6.5 = 14.5
That means, that what you are printing on the console is wrong, and if you check that AWST is a particular timezone... check if you are using the correct timezone

Related

how to schedule a prefect flow that runs on first Tuesday of each month at 18:00 IST in prefect 1.x?

I want to set a schedule in prefect 1.x so that it starts the flow only on 1st Tuesday of each Monday, using code, I'd also like to see a way of doing this if I have a set of custom dates I want to run it on.
I couldn't do it since cron does not allow me to set it. Can you suggest a way , please be sure to suggest a solution that works with prefect 1.x
in Prefect v1, you could solve it by using a combination of schedules, clocks, filters and adjustments. in v2, you could do that using RRule schedule

JasperServer: Schedule report at last day of month?

How to schedule report in JasperServer every last day of the month ?
I am trying to schedule a report, but I didn't find any option to get last day of the month like it would be variable eg in Feb it would be 29 or 28 and other may be 30 or 31. But How to specify this at the time of scheduling the report ?
Help me out..
Thanks in Advance...
That's not possible in the JasperReports Server UI today. The Quartz scheduler supports this, so it's certainly possible to get it working via customization (or possible to run the report via web services as Alex K suggests).
Often the reason for running a report on the last day of the month is to include the results from the past month. So it makes sense to schedule the report to run at a minute past midnight on the first of the month. Maybe you can get what you need like that.

Exclude time blocks on particular day [Quartz Schedular]

I am using Quart Scheduler. I want to trigger to in such a fashion so as it excludes timing from xx:xx:xx to yy:yy:yy on day specified (monday, friday. sunday). I know how to exclude particular day. but don't know how not to trigger on given time block on given day?
Can anybody know anything about it?
Please make use of Calendar and HolidayCalendar available in Quartz to achieve this. The Cron expression in Cron-Trigger can also be written smartly to achieve this as well.
Looking at http://www.quartz-scheduler.org/docs/examples/Example3.html, it seems that one can create different job set to do the same task. For each job one can attach a schedule.
If you dont want to run a particular task on say sunday between 1pm and 10pm, but want it to run on sunday the remainder of the day, then you can create two jobs [set to do the same task]. For one give the schedule with time restrictions 00:00 to 13:00. And for the second give time restriction of 22:00 to 23:59.
I hope I understood your problem correctly ...

Submitting a dba_job at a clock change

A quick query, I'm submitting an oracle job via dbms_job.submit(). However I am in the middle of a clock change BST->GMT and I want my job to execute at 1:30 GMT. Given that DBA Jobs tends to deal with dates, at what time would my job actually run?
1:30 BST (an hour too early)
or
1:30 GMT (just right thanks)
and if it's the former, is there a way to make it work as I'm expecting?
Thanks
CJC
DBMS_JOB doesn't support time zones or daylight savings time for scheduled runs.
The clock change happens at 02h00 when 02h00 becomes 03h00 (but also in this case 02h00 GMT becomes 02h00 BST). This means your job will run at 01h30 GMT because the clocks won't change until 02h00, however following the daylight saving change (so from the next morning) your job will run at 01h30 BST (00h30 GMT) since DBMS_JOB doesn't know any better, an hour earlier than you might want.
Move to DBA_SCHEDULER instead if you want schedules that always run in GMT or want to have DST support, where the you can specify the time as 01h30 GMT +0 and have it always execute then regardless of anything else.

How do I handle date and time in different time zone?

I'm developing an international software that act as a simple project management software and I'm facing a problem. This problem is about date/hour and time zone.
When a message is sent from one time zone to another time zone I can store the UTC (GMT) time in my database and then have it displayed differently according to the user's time zone. But this can't be done when I only work with date.
If I say a task is due to the 21st of March. Should I consider that this date can be 20 or 22 in some other countries ? What are your advices on this problem ?
Let's say a user in New York sets a due date for a project as "anytime on Monday 26 January". That means "anytime from 0600 Monday 26 January to 0600 Tuesday 27 January" in Brussels and "anytime from 2000 Sunday 25 January to 2000 Monday 26 January" in L.A.
So completing the task at 2100 on Monday 26 is fine in Brussels and N.Y., but too late in L.A.
One possible work around is never just work with the date. If the time is not specified, either set it for 0000 hrs or 2400 hrs on the date specified in the timezone of the user.
The users may have to deal with strange due dates/times, but speaking as someone who used to work internationally, it kinda goes with the territory.
You won't be able to achieve what you are trying to do without storing the exact time. You simply don't have enough information.
When you don't have a time, assume that the time is the end of business in the main locale for the application, then translate that time as you would any other time. An alternative would be assuming end of the business day in local time and adjust that to UTC. Everyone using the application would need to understand whatever default time assumption you make when the time is not specified. Coordinating to the main office may be best in a large enterprise whereas coordinating to local time may be best in highly decentralized environments where the local context is equally important.
If you aren't storing the minutes and seconds you have to assume that the date being entered is the desired date and not to any adjustments for GMT. Just put it in the database as is. The people on the west coast will have to assume that the due date is the same regardless of where you are in the world. If you want to adjust for time zones, you'll have to collect more information, like hour, minutes, and seconds.
The easiest solution would be just to display as the same date for everyone. The deadline would then effectively be midnight in the latest timezone.
Otherwise, decide what the default time of the deadline should be in the timezone the task was created in, e.g. 21st March 17:00 EST or 22nd March 00:00 EST and display that in the local timezone. The timezone difference will then push it into the previous day or next day accordingly for the viewer.
SQL 2008 allows for a Date datatype that does not have any time value associated with it. That allows someone to say I need this done by this Date, but I don't care if it is +/- several hours. If the date selected is 1/1/2009 but it happens on 1/2/2009 at 2AM their time, they probably don't care.
When the user needs something done by a specific date and time, like close of business on 1/1/2009 then you need to store it in a DateTime as UTC and convert it to local time client-side.
This will take much of the complexity out of indicating when something is completed, it'll either be completed near a specific day or by a specific time.
If you have a single instance of a DB, I would store all dates in the datetime timestamp of your DB server. If you are timestamping rows, consider GetDate() in T-SQL or as default value of the timestamped date column. Then you have your single reference point for all times. Consider UTC format there.
Then, all clients accessing the date do their own conversion into "local time" , which can be interpreted by things like : user preferences, date time stamp on client computer, etc.
Without knowing more, it hard to say exactly what the resolution is.
Your solution depends on your application and requirements.
I'd first store UTC + offset in your data structures, so it's easy to display for any timezone.
Most likely if a task or meeting is due at 12pm on 21/March in London then it will occur at 2130 on 21/March in Adelaide (+0930), but that is an application requirement not any sinister timezone related standard.
If you want the ultimate in flexibility, add a flag that can make the even due simultaneously in every timezone or at the same time no matter where you are (staggered) and show the event accordingly.
You might want to store the date in a from that is timezone aware. This will help you in your calculations. SQL Server 2008 for instance supports a datetimeoffset that does precisely this. Alternatively if you're using SQL 2005 with a bit of effort you can write your own SQL CLR data type to support this.