473,414 Members | 1,928 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

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

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 1175
Banfa
9,065 Expert Mod 8TB
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 1GB
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
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
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...
4
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...
2
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...
5
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...
3
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....
0
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
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.