range date : the return !!!

range date : the return !!!

Postby Silvio » Wed Jul 01, 2009 4:03 pm

To james and Otto specially,

There is an error on dbfilter when we made the dbfilter to search the init date and final date :

You be careful with my reasons

A Hotel Ask to chalet :
2 umbrellas for the weekend from 11.07 to 12.07 ( the hotel wants the number 1 and 2)
1 umbrella forse the weekend from 18.07 to 19.07 ( the hotel wants the number 3)

then another hotel want 3 umbrellas ( the number 1, 2 and 3) from 10.07 to 21.07

If I use the dbfilter command and Is_free function ( made by me and correct by james) the procedure let me say these umbrellas are occupated and it not make an booking order

BUT but this is not the reality

beacuse the number 1 and the number 2 are Free from 10.07 to 11.07 and from 13.07 to 21.07

and the number 3 is Free from 10.07 to 17.07 and from 20.07 to 21.07


How resolve it ?
Any idea ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: range date : the return !!!

Postby James Bott » Wed Jul 01, 2009 10:27 pm

Silvio,

I guess I don't really understand what you are trying to do.

I thought that the start and end dates you were entering into the filter was the date range that the user wished to reserve. For example the dates entered are 01.06.09 - 05.06.09 would mean that the customer wanted to reserve all the days between those dates.

Are you needing to actually find any single days between the start and end date that are available for a specified umbrella? What about for any umbrella (I can see this being useful also)?

I have never seen a beach with reserved umbrellas here in the US, so I am not familiar with how they might be reserved. I can see how it might be useful if a customer was going to be there for a week, for the system to find any combination of umbrellas that were free, either the same umbrella for multiple days, and/or several umbrellas that are available for single or multiple days. The customer might prefer to have the same umbrella for the entire date range, but would be willing to accept a mixed reservation of several umbrellas instead. This can get quite complicated.

The other side of the issue is that you also need to make it easy for the computer user to solve the problem. Having them look at each umbrella for some available days is not a good solution. Ideally, after the initial parameters are entered the system should look for the optimum solution first, and if that fails then automatically offer up some alternative solutions for the customer to pick from. It should not be designed so the user has to keep trying new ways to solve the problem.

It will really help to define the problem in detail in words before trying to write any code to solve the problem.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: range date : the return !!!

Postby Otto » Thu Jul 02, 2009 10:50 am

Hello james,

>I have never seen a beach with reserved umbrellas here in the US

The high beach culture beside the friendly people is the reason for the success of the Adriatic tourism.
As far as I know usually one “bagno” has up to around 150 umbrellas. This “square mile” normally gives work to a whole family. Every day the whole place is polished the sunbeds in the morning are turned in the sea direction and the umbrellas are opened for the customers. Top service.

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6064
Joined: Fri Oct 07, 2005 7:07 pm

Re: range date : the return !!!

Postby Silvio » Thu Jul 02, 2009 11:12 am

Otto,
150 umbrelas ?

I saw on my town 1200, 1600 , 3000 ...5000 umbrellas not 150 ....!!!


If you search with google map this location "Roseto degli Abruzzi" you can see all beaches


James,

Many chalet reserve many umbrellas for the hotels

Hotels ask to chalet 60/70 umbrellas for a specific period

this umbrellas have two basic element ( two chair)

when arrive the customer on hotel want your umbrellas of last year and take also seabeds

On sample I make on top of this topic I sad an chalet can reserve umbrellas for a period


2 umbrelas ( number 1 e number 2) for a week end 11.07 to 12.07

1 umbrealls ( number 3) for another week end 18.07 to 19.07


then another hotel or customer want the number 1,2 and 3 from 08.07 to 20.07

the procedure let me say thisisi not possible beacuse the first hotel occupated this umbrellas on this period

but it is not reality because I see free the umbrealls and occuapted only from 11.07 to 12.07 and 18.07 to 19.07

the procedure must say they are free from 08.07 to 10 and from 13.07 to 17.o7 and from 20.07 to 20.07


I understand I cannot resolve it ....
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: range date : the return !!!

Postby Silvio » Thu Jul 02, 2009 11:18 am

james,

>I thought that the start and end dates you were entering into the filter was the date range that the user wished to reserve. For >example the dates entered are 01.06.09 - 05.06.09 would mean that the customer wanted to reserve all the days between those >dates

yes



>Are you needing to actually find any single days between the start and end date that are available for a specified umbrella? What >about for any umbrella (I can see this being useful also)?

yes




How resolve it ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: range date : the return !!!

Postby Otto » Thu Jul 02, 2009 12:01 pm

Hello Silvio,

I read that in Emilia Romagna (110km coast) are 252.800 umbrellas which are divided into 1426 “bagni” which is ca. 180 per "bagno".
Maybe it is different where you are. But the typical Adriatic beach around Rimini should be like that.
This is my experience too spending my holiday on the Adriatic sea since ever .

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6064
Joined: Fri Oct 07, 2005 7:07 pm

Re: range date : the return !!!

Postby Otto » Thu Jul 02, 2009 12:08 pm

Hello Silvio,

we use a so called “Dispo-sheet” where we have the room categories and show the vacancies for each day.
Maybe you can do it like that.
Best regards,
Otto
Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6064
Joined: Fri Oct 07, 2005 7:07 pm

Re: range date : the return !!!

Postby James Bott » Thu Jul 02, 2009 12:12 pm

Otto,

>>>I have never seen a beach with reserved umbrellas here in the US

I hope you didn't take my comment that I was being critical--it sounds a lot nicer than having to lug your own umbrella and chairs to the beach as we do here. And the older I get, the nicer that sounds!

Differences in culture are what make travel fun in my opinion.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: range date : the return !!!

Postby James Bott » Thu Jul 02, 2009 12:51 pm

Silvio,

I thought that the start and end dates you were entering into the filter was the date range that the user wished to reserve. For >example the dates entered are 01.06.09 - 05.06.09 would mean that the customer wanted to reserve all the days between those >dates

yes

>Are you needing to actually find any single days between the start and end date that are available for a specified umbrella? What >about for any umbrella (I can see this being useful also)?

yes

How resolve it ?


Finding the data, and then presenting the data are two different issues.

Finding it can be done with DO WHILE loops. First find all umbrellas that are free for the entire date range, then find all the umbrellas that are free for less than the entire range. For example if the date range is 5 days, I would loop through all umbrellas looking for any that are free for the entire 5 days. Then loop through for 4 days, then 3, then 2, then 1. This is more complex than it seems, since any that are available for 5 days will also be available for 4,3,2 and 1 day so they should be eliminated from subseqent searches. Also, you can't just pick any 3 day and any 2 day availability since the periods have to fill the entire 5 day period and not overlap. There are lots of combinations possible.

Perhaps a solution would be to first list all the 5 day availabilities, then if the customer doesn't like those, then all the ones with the first 4 days and all those with the last 1 day. Then 1 and 4, then 3 and 2, 2 and 3--still lots of possible combinations. If they want a 10 day reservation, then the possibilities get much larger.

OK, then how to present this to the user. Would I be correct in assuming that customers may want to specify a certain umbrella, or one near the water, or maybe not near the water? How important of an issue is this?

Adding an umbrella specification really adds to the complexity since all the date range searches would then have to be limited to either 1 umbrella or a range of umbrellas (like first row, second row, etc.). Whew!

Then it seems you also have another criteria, chairs or beds? How many options of these are there?

This is a much more complex problem than it seems at first. How are they doing this now? Manually? If so, then any automated system would be better than manual, but it does help to try to describe an ideal system from the start before coding. You can build a simple automated system (still better than manual) then continue to add and refine it.

Murphy's Law, "Nothing is as simple as it seems."

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: range date : the return !!!

Postby Silvio » Fri Jul 03, 2009 8:50 am

James,
I think I cannot create thi control because is too hard
We can think to another solution

Perhaps if I create a new father dbf where I can insert the number of umbrellas and all dates from May to September ( this is the period of summer booking from 17.05 to 12.09) when I insert a booking order I can save this data on this Father dbf.

But I not Know How create it because Perhaps I must create over 250 field into a dbf

then the research on this file will be too complex...

What do you think abou t?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: range date : the return !!!

Postby Silvio » Fri Jul 03, 2009 8:54 am

Otto,
How I can make to show on YOUR CLASS datepick FROM JANNUARY TO DECEMBER WHEN A UMBRELLAS IS FREE OR NOT ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: range date : the return !!!

Postby James Bott » Fri Jul 03, 2009 11:41 am

Silvio,

>I think I cannot create thi control because is too hard

Yes you can! You just have to define the solution you want, then start working on it a step at a time.

A journey of a thousand miles begins with a single step. -Lao-tzu

You have lots of friends here to help.

The step you need to take right now is to comment on each of the quesitons that I asked in my last post.

What I can tell you, is that just starting to code without any idea of where you are going isn't going to work. If you don't know where you are going, then any road will get you there.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: range date : the return !!!

Postby James Bott » Fri Jul 03, 2009 12:22 pm

Silvio,

Here I have made a work flow diagram for the problem. Now all you have to do is write the code.

http://blueballfixed.ytmnd.com

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: range date : the return !!!

Postby Silvio » Mon Jul 06, 2009 9:40 am

I undestand there are many factor to create a funcionally power control of date.

On Hotel application it can be easy because we can see day by day but for the night of each days ther eI can use Tplan to create a easy tableau

Instead on Beach application I have many factors : One day , Morning, Afternoon, ....

It is so Hard and for each umbrellas there many orders : for sample I can have a umbrellas with 127 orders different if we think only to the morning order ( 254 if we think for the morning and afternoon, only 127 for the normal day) because there are 127 day on summer period ( from 16.05 to 12sept) : how I can control all ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: range date : the return !!!

Postby James Bott » Mon Jul 06, 2009 11:32 am

Silvio,

It is so Hard and for each umbrellas there many orders : for sample I can have a umbrellas with 127 orders different if we think only to the morning order ( 254 if we think for the morning and afternoon, only 127 for the normal day) because there are 127 day on summer period ( from 16.05 to 12sept) : how I can control all ?


This is not much more difficult. You just have 2 periods for each umbrella for each day. When you a looking for a full-day reservation, then both periods must be available. You might also consider finding two umbrellas for a full-day reservation if there are no full-day reservations available. The customer would have to move at mid-day, but it would be better than no umbrella.

Again, I ask, how are they doing this now? It is all manual with paper or cards? If so do they have very limited citeria that they use? How exactly do they find available umbrellas?

It helps a lot to define what the current system is, then define how a better automated system would work. Then get your customer to agree to this before you start coding. You can also do this in phases. Phase 1 is a simple system, either equal to the current cababilities or slightly better, then Phase 2, 3, etc. are more advanced versions. I would think since you are already into the current season, that your customer is very anxious to get something as soon as possible even if it is not an ideal system. So, giving them a simple system soon, is better than a more advanced system much later.

So you need to define all the must-have features and then all the nice-to-have features.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 59 guests