• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Could someone give this piece of code a look?

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello I've included some code below. Its about discrete Event Simulation techniques in Java. I posted some similar code before. But this time the code actually complies. It mostly does what it is suppose to do.
Here is what it is suppose to do. When you look at the code you'll see the classes:
MobileStation1
MobileStation2
BTS1
BTS2
now signals are transfered between MobileStation1
and BTS1 while signals are tranfered between
MobileStation2 and BTS2 in parallel. At the end of the simulation its plots to graphs one for the amount of signals passed between MobileStation1 and BTS1 Vs time and another graph for MobileStation2 and BTS2 vs time.
Its really simple and it compiles and everything.
The problem is that only one graph is printed.
You see I tried to do some efficient programming. If you look at the code you'll also see the classes
Link
Plot
DynamicArray
I tried to get MobileStation1 MobileStation2 and
BTS1 and BTS2 to kinda share the classes above.
But for some reason only one graph is being plotted. I think that only one dynamic array is being made and all the values from both simulations are being thrown into the same array and hence I get one graph.
I know the code is long but could you give it a look if you have time please... thanks a million.
Here is the code
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic