|
Sounds like homeworks to me
No.. Sorry I just joking...
there's a typical problem which almost same with your problem, they call it TimeTabling problem, it focus on scheduling with some constrain.
One of algorithm to solve this problem is Tabu Search.
First you set some hard constrain & soft constrain to your schedule.
Hard constrain means the schedule configuration not a solution if they break rules which define in hard constrain.
Soft constrain means the schedule configuration stil a solution if they break rules which define in soft constrain, but if they didn't break any rules it become a good solution.
Woow... so many things to tell you here and u can serach it on Google, But ..
If u want the easiest way... there's many software package out there which can solve your timetabling problem.
Ok, Now it's my turn to take a rest...
"Courage choose who will follow, Fate choose who will lead" - Lord Gunner, Septerra Core
|
|
|
|
|
Aryo Handono. wrote:
Sounds like homeworks to me
LOL . Thanks for your help Aryo, sounds good to me. Time to get googling.
|
|
|
|
|
OmegaSupreme wrote:
Thanks for your help Aryo, sounds good to me. Time to get googling.
It's my pleasure if I can help you.
BTW, if you found some nice article about that, Would you mine to share it with me, because timetabling is my Last assignment work before graduated.
That's why I call it homework
I believe you already know my email, please don;t hesitate to contact me personally. Maybe we can help each other.
"Courage choose who will follow, Fate choose who will lead" - Lord Gunner, Septerra Core
|
|
|
|
|
Hi Aryo,
Sure I'd be happy to share anything I find. Though I've got so much to do it could well take me over a week before I can get into it.
Good luck with graduating and thanks again for your help.
|
|
|
|
|
hi,
i was onced asked to do a similar project for the radio station i volunteered for, and i can promise you there is no easy solution for scheduling problems, and i have a degree in applied mathematics!
the main problem you face is that station managers/advertising managers want to have very specific rules governing the way ads are played, and telling them that your mathematical algorithm won't let them schedule an ad 2 times a day, except on a full moon which happens to be a sunday they want it played 6 times, is just not going to cut it... get my drift?
having spent many years working on a payroll system that required the programming of awards in much the same way that an ad scheduler needs to work, what i have worked out is that the simpler way to deal with the problem (albeit not the most mathematically asthetic way) is to build a 'rules' database that associates a series of rules to a particular ad...
effectively you are building a mini-expert system that uses rule-based and case-based reasoning (all of which can live in your database)...
particularly, the approach i have seen before is to use a self-referential table that effectively 'parses' the rules associated with the employment award and the employees to whom it applied - an elegant but extraordinarily difficult algorithm to maintain...
my approach (had i continued with the project (i am too old to hack code for nothing and wait for royalties)) was to build a 'vocabulary' which associated key words with particular meanings that could be applied in the system... this would allow the station manager to come up with any weird and wacky combination that they manage to dream up (that would normally haunt programmers in their worst nightmares) and leave me to my peace and quiet...
if this works for you, would love to know about it...
cheers and good luck
nik
Nik Vogiatzis
PhD Candidate: University of South Australia
|
|
|
|
|
NikV wrote:
the main problem you face is that station managers/advertising managers want to have very specific rules governing the way ads are played, and telling them that your mathematical algorithm won't let them schedule an ad 2 times a day, except on a full moon which happens to be a sunday they want it played 6 times, is just not going to cut it
LOL, I hear that, I've done this for several broadcasts now and they do want different rules every time.
Thanks for your suggestions , there's alot of food for thought for me there. I may not build the most perfect solution but I hope I can incorporate some of your ideas. A combination of flexible code and stern client management is in order I think
Thanks very much for your help.
|
|
|
|
|
Hi,
Lemme explain wat i need to do, wat i have done and wat i need help with.
I am creating a windows application which would align controls in a grid format. each control should be resizeable and its size should be a multiple of predefined width and height.
this is what i have done so far. I have created a generic container(panel inherited) which would hold any control. I have implemented mousedown, mouseup, mousemove eventhandlers for the container. this container after adding the required control to it, is added to the main form window.
there are a couple of things i am having problems with.
1. there is a lot of flickering on the screen when i resize control (or infact the container of the control). I was wondering if anyone could provide me with a sample code.
2. I am also not sure if i need to convert the x-y coordinates of the mouse event handlers to some how relate x-y coordinates on the container so that i can have resize cursors when mouse moves over the edges of the container.
there may be a lot more coming up as i develop the application.
Thanks a bunch for your time.
Any help is appreciated.
Rekha
|
|
|
|
|
Hi all,
I am trying to create a custom control that would be resizeable. Instead of having handles like the usual control resize technique, I want to be able to resize with all the edges. I have implemented mousedown, mousemove, mouseup events on the controls. when i am testing it on the runtime window there is a lot of flickering.
and also the resized control is not of desireable size.
can someone help me out with a sample mouse move event to do this.
any help is greatly appreciated
|
|
|
|
|
Hi I am building a chat application and it is hard to differentiate between the user's names so I want the user's names to be different colors (Kinda like AOL IM).
Please tell me how to accomplish this.
Thank You
|
|
|
|
|
This can be done thru RTF (Rich Text Format) codes via the richTextBox.rtf variable. You will need to be careful when you do this because if you break the format rules it can break the display up. If you search on MSDN you should find a list of all the codes.
|
|
|
|
|
Hi,
Can you tell me how to add(or remove) column in Crystal Reports at runtime.
Thanks on advance!
|
|
|
|
|
As far as I know you can not do that if you do not use the Crystal Report RAS Server. With that you can produce the all report in runtime.
|
|
|
|
|
I sometimes face thıs problem of Windows XP refuses to shut down when an .NET Application is running. One clear example is an application which has a notify icon on the task bar. Unless I close the aplication first , windows does not shut down.
Anybodeh knows shut down procedure and the cause of this problem?
|
|
|
|
|
How do you databind to checkedlistbox since it does not have DataSource property. I want to bind an array to list the check boxes in that control. Thanks in advance
|
|
|
|
|
You can either implement data-binding yourself using the CurrencyManager from the CheckListBox control's BindingContext . See that property documentation and follow the references to learn more. You won't get it for free, but it's a good place to start. If you use it often, extend CheckedListBox with your own control and add data-binding capabilities.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Is there any way that I can abort a thread that currently lies waiting for a message from a stream.
The code uses a for loop to keep the thread running. When a message comes on the stream, that message is read with StreamReader.ReadLine.
The problem is that the thread lies waiting until a messa comes on the stream. This means that the thread cannot be aborted because it is busy.
Does anyone know of a solution on this problem?
|
|
|
|
|
It sounds like you created a separate thread to handle the input (this thread is calling StreamReader.ReadLine). Are you saying that you can't call System.Threading.Thread.Abort on that thread?
If you haven't created a separate thread to make the calls to ReadLine, you should. ReadLine's a synchronous call, and the StreamReader doesn't really give you any asynchronous options.
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
The code works like this: Another thread calls abort on the thread running and calls join on it. After the call to abort the state of the thread to be aborted is AbortRequested. The problem is it never leaves AbortRequested and goes into Stopped. This means the join never happens and the program is locked.
Any ideas?
|
|
|
|
|
I was afraid you were going to say that So you're calling Abort and then Joining on that thread. This shouldn't be a problem.
I've never run into this myself, so I'm not an expert in this area. Take everything I say with a grain of salt since it's just based upon docs and not practical experience with this problem .
If you read the MSDN docs, there are a few cases that can cause Abort not to work. I'm assuming you're not doing something like a ResetAbort in the code of the thread you're trying to abort, which could obviously cancel the abort. If it's someone else's library, I guess you need to check for that.
The big one that sticks out in the docs to me is:
"The thread is not guaranteed to abort immediately, or at all. This situation can occur if a thread does an unbounded amount of computation in the finally blocks that are called as part of the abort procedure, thereby indefinitely delaying the abort. To ensure a thread has aborted, invoke a Join method on the thread after calling Abort."
This means you might have a finally block that for some reason is taking forever to return. If you have a finally catch block, check for this. Put a break point in your finally block and make sure it returns if you have one.
The other quote I notice is this:
"If Abort is called on a thread that has not been started, the thread will abort when Start is called."
That means if you try to abort a thread that's never been started, you'll never be able to Join on it. I'm assuming your thread is actually started though, but make sure.
Other than that, I have no clue. If you're still having a problem, try to create a really small snippet of code and a project that demonstrates this problem. I realize this might be a client and server example in the case of socket code, and creating a simple test app to show this beomes a bit more difficult. Having some code to look at might make things much easier to debug though. One thing about creating a simple project to demonstrate the problem is you sometimes find you can't recreate the problem in the simple one, and then you go from there to figure out the difference between the two.
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
|
I've downloaded these and I'll take a look at this later today when I get a chance.
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
Ok, I've taken a look at what you're doing.
First, the thread Abort thing might be something you can never work around. Read the last post in this thread for instance: When Abort might not work. That shows me that using Abort on a thread dealing with sockets might not ever abort until the underlying socket code allows it to.
That said, you really don't need to Abort to make a proper client and server. Most people create a server that handles multiple clients. They do this by having their server go into accept mode. Once a connection is accepted, they launch a new thread to handle that connection and start accepting new connections again.
As far as disconnecting the threads, you can catch the exception when your sockets are no longer connected (your ReadLine in this case will throw an exception). This would be the point where you would end that processing thread.
I hope that makes sense.
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
hi
i m developing a simple application in C# and i want to know that how can we launch the application on the statup of windows like msn messenger do.so that when we boot the windows it start our application. i m using Windows XP.
thanks for your help.
|
|
|
|
|
Do you want it like MSN Messenger (where it launches when someone logs on) or do you want a service that launches when the machine comes up (regardless if someone logs on or not)?
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
i want it to comes up when machine comes up regardless of if someone logs on or not.
thank you
|
|
|
|