I've written a program in Java that will let you select the number of 'steps' you want it to take (these represent days in the simulation).
Now I made a run option too but I can not get it to work properly.
I want it to run for X steps, after every step it needs to update the views.
This is what I tried:
for (int i = 0;i<100;i++) {
try {
model.simulate(1); (simulates 1 step)
Thread.currentThread().sleep(500);
} catch (InterruptedException e1) {
e1.printStackTrace();
}
}
The problem is that it will not update the views, only after 100 steps have been completed it will update the views.
I update the views using setChanged() & notifyObservers() which works when I manually do 1 step.
Any suggestions?
Name:
Anonymous2008-09-12 23:04
Use The Algorithmic Language Scheme!
Name:
Anonymous2008-09-12 23:11
Use The Forcibly Indented Language Python!
Name:
Anonymous2008-09-12 23:50
I don't speak The Bloated Language Java, but you should probably make your thread wait on a condition (eg: viewUpdated) instead of sleep(). Or whatever the equivalent is with your observer bullshit.
Otherwise it's pretty much impossible to tell what the problem is since you seem to hide all the shit in model::simulate().
Name:
Anonymous2008-09-13 7:02
>>4
nope. >>1 obviously didn't read the threading rules for using his GUI.
Hello Thank you very much for sparing your time to read our proposal. We are running a software + website designing and development company. Our team has developed more then 1000 web application successfully. We have 3 designers, 10 programmers, 2 Team leaders and one project manager. I am a project manger who is handling your project and responsible to achieve your goal. As per my job and responsibilities, I will be responsible for any issues you might have during development and designing or testing. We will give you 1-3months of support accept all issues and resolve it within few hours. We will be responsible for any error or bug might be in future of the project We have testing team which test project with more then 100 dummy records We can provide unlimited revisions on design selected. We will request for money only and only if you are happy with the work progress. We always prefer all buyers to use /prog/ and award project using /prog/ Safe and secure for all but PAY only if you get what you want I have read you project specifications; I would like you to read SICP. We can try to complete your project within 1-2weeks only. Waiting for your prompt reply. Regards Anonymous.
Name:
Anonymous2009-03-06 14:05
Team IS MADE UP processor How many times you get this if you dont repost this comment on 10 other pages i will hax your anus tonight and make a mess of your computer ON and go for real C C fails and then SAGE THE way it would seem that Randall endorses the furry.