473,657 Members | 2,711 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

classes in arrays along with Monte Carlo Sim!! Help!!

4 New Member
Help!!

A company has 20 machines which run 8 hrs a day. 4 personnel are on duty during the 8 hrs. When a mach. goes down, only 1 person can work them at a time. At times, more than 4 mach. are down at a time, while at other times all personnel are idle.

How do I start to:
Use a one dimensional array, one to represent the status of machines, the other to represent the status of personnel. Use two classes to create mach and repair personnel objects. Store these objects in the arrays for machine status and personnel status. Run 1000 day simulations and compute the avg cost per day ($800/hr for idle machine + $75/hr for personnel) of personnel for 1 to 6 repair personnel and idle machines. All while using the <cstdlib> random number generator.
Dec 10 '06 #1
2 1196
Banfa
9,065 Recognized Expert Moderator Expert
You haven't actually said what the problem you are trying to solve is, you have just stated the background information to the problem (i.e. cost of each item, how they interact).
Dec 15 '06 #2
DeMan
1,806 Top Contributor
Use a one dimensional array, one to represent the status of machines
Expand|Select|Wrap|Line Numbers
  1. int status[]; //You then use different integer values to represent states....
  2.  
the other to represent the status of personn
same sort of thing

and then what banfa said
Dec 16 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

18
3258
by: Karl Pech | last post by:
Hi, I got a task there I have to compute pi using the Method above. So I wrote the following program: --- import random import math
3
1420
by: John | last post by:
Hi all, I've got an issue with session variables in asp pages. I need to make a decision that I think you can hopefully help me out here. When a session starts on the iss server I need to store some information in some session variables. But this information is coming from an old dbase system. In the beginning of this project it was just a simple static array of information. Afterwards it turns out that this must be a dynamic array...
4
13107
by: mescaline | last post by:
hi, i'm new to C++ could anyone refer me to a good site / good examples of random numbers? in particular including: 1) the commnds to obtain normally and exponenetially distributed r numbers
2
7808
by: nitin8or | last post by:
Hi ALL, I want to display in a RichTextBox the Binary Large Objects data coming from database. If I have one record its not a problem I convert it to byte array and pass it on in a stream as a byte array and then call Loadfile method of RichTextBox and pass the stream. This works BUT IF I have more records I have to create a loop and some how pass the concatenated byte array and then pass it in a stream. I do this with
5
3480
by: Benne Smith | last post by:
Hi, I have three enviroments; a development, a testing and a production enviroment. I'm making a big application (.exe), which uses alot of different webservices. I don't use the webservices by adding a WebReference, since it does not allow me to keep state (cookiecontainer) or to specify functions on the classes (like if i want to override the ToString() function on a class from my webservice). So the only way i can see how i can get...
3
1642
by: Aleramo | last post by:
Can someone understand my errors in this program? in particular the reason cos i receive the worning message. /* Questo programma riguarda il calcolo del mutuo accoppiamento fra patch dell'array. */ #include <math.h> #include <stdio.h> #include <stdlib.h> #include <gsl/gsl_rng.h> #include <gsl/gsl_math.h> #include <gsl/gsl_monte.h>
0
983
by: opticyclic | last post by:
Does anyone have any examples of a monte carlo implementation using VB.NET? I'm trying to model the effect of small changes of x in y where y is a function of x.
8
2768
by: Jimmysevens | last post by:
Hi there, I'm new to java and would appreciate help with this. My project involves me creating 5 classes; Person, Employee, Demonstrator, Payroll and Test. Employee and demonstrator are inherited from person. Data is read in from 2 seperate text files for each of these. Test contains the main() method Payroll contains an array of Person (the monthly payroll), and contains methods to add or remove employees/demonstrators from the...
0
8407
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8319
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8837
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8612
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6175
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.