Blood analysis problem

Hi,
I need some help to get this problem in pseudo code and later to develop a program.
The scenario is:
I belong to a clinic of blood analysis and I have a seller that sells me packs of reagents to perform the analysis.
The problem goes like this:
I ask to the seller: "Hey, I need to perform x analysis in y days. How many packs should I buy?"
The seller tells me:"For that you'll need z packs."
Now, let me clarify what is a pack. A pack is some sort of mixture (reagents) which has 2 properties of interest for the problem:
1- One pack can do a analysis
2- One pack has a validity of b days
So, continuing the conversation, let's say the seller tells me that I need 3 packs;
First pack has a validity of 2 days and can perform 5 analysis
Second pack has a validity of 3 days and can perform 10 analysis
Third pack has a validity of 7 days and can perform 23 analysis
(the numbers are fictional)
What I want to do is confirm that the seller is telling me the true.
The solution:
I can create a class, say Pack class
class Pack{
  int validity;//in days
  int numberOfAnalysis;
}and so, I'll have several objects of Pack corresponding to the info that the seller told me.
I want my program to have 2 input fields(this corresponds to my question to the seller):
1- Number of analysis
2 - Number of days
and this fields are filled by me. The aim of the program is to check if the info that the seller told me is correct or if is the seller selling me more packs than I really need.
I just need some sort of brainstorming to put this problem into code.
Thanks in advance,
Manuel Leiria

Shelf-life is the time that a product is good before you open the pack.
So I imagine that a pack can last, say, six months just sitting on the shelf, but after you open it, it's only good for five days. (for example)
It seems unlikely to me that this kind of medical supply wouldn't have a finite shelf-life.
Sadly, for real world projects, the first half of the development time can be investigating issues like this. It's necessary though.

Similar Messages

  • Sales analysis problem

    sales analysis problem
    scenario: there are many plants and customers, the relationship between them is n:n, and every
    customer has a classification.
    my question is how to calculate the number of the plant that sold to one classification of the
    customer in BW.
    for example;
    plant: 1000, 1001, 1002
    customer: 2000, 2001, 2002
    classification: A, B
    customer's classification: 2000:A, 2001:A, 2002:B
    transactions:
    plant->customer
    1000 ->2000:A
    1000 ->2001:A
    1001 ->2000:A
    1001 ->2002:B
    1002 ->2002:B
    so the result is : the number of plant that sold to customer classification A is 2;sold to
    customer classification B is 2;
    how to carry out it in bw with a cube, please help help me solve the problem, thank you very
    much!

    Wilfred,
    You should create a message with SAP Support on this issue.
    Eddy

  • Web Analysis Problem using the "Send to Excel" service

    I built reports using WebAnalysis 9.3.0.
    I attached the "Send to Excel" service button to my report. I am using a combination of Excel 2003 & 2007.
    I have the following settings in my webanalysis.properties file:
    MaxDataCellLimit=200000
    XLExportMaxRows=60000
    XLExportMaxColumns=200
    My problem is when I try to use the "Send to Excel" button. For "small" reports Excel opens quickly with my report information. Small being around 1,000 rows and 20 columns. If I add more rows, say another 400 or so - Excel never opens with my report information. Web Analysis sits there for about 5 minutes or so and does nothing. After that I can start using WA again - but no report in Excel.
    I get the same result by right clicking on the report in WA Studio and selecting "Export Data..."
    Any ideas?
    Thanks!

    Hyperion support suggested I try adding the Excel path to my webanalysis.properties file
    So I now have:
    ExcelPath=D:\\Progra~1\Micros~1\\OFFICE11\\Excel.exe;C:\\Progra~1\Micros~2\\OFFICE11\\Excel.exe
    MaxDataCellLimit=200000
    XLExportMaxRows=60000
    XLExportMaxColumns=200
    ResolveDimSetAliases=false
    Where D:\\Progra~1\Micros~1\\OFFICE11\\Excel.exe is the path to Excel as installed on the server where WA Studio is installed.
    And C:\\Progra~1\Micros~2\\OFFICE11\\Excel.exe is the path to Excel as installed on my laptop.
    This did not correct my problem.
    Am I using the ExcelPath=.... correctly?
    I was not sure this would work since WA Studio successfully starts Excel for "smaller" reports. But I tried it anyway.
    Any ideas?

  • PsE 9 auto-analysis problems

    PsE 9 is having problems when attempting to auto-analyze photos.  The catalog I am working with is one created in PsE 8 and converted to PsE 9.  No converson errors were reported.  The catalog is about 91 MB is size and contains 16000 photos and a couple thousand video clips.
    These are my Media-Analysis preference options...
         (enabled) Analyze Photos for People Automatically
         (enabled) Analyze Media for Smart Tags Automatically
         (enabled) All filters
         (disabled) Run Analyzer on System Startup
         (disabled) Run Analyzer only when System is Idle
    Analysis will stop after it has processed what seems a random count of photos.  I can monitor the progress by hovering the mouse over the purple tag on the bottom of the Organizer screen.  I know there is an issue when the same photo is processed for more than the normal amount of time.  Normally the photos are processed at more than one per second.  I have waited for up to 10 minutes to process the same photo..
    The ElementsAutoAnalyzer.exe process exists in the Windows Task Manager.  However the CPU utilization is at 0% when analysis is stalled.
    Attempting to manually analyze a photo will result in a progress dialog to pop up and either it will show zero progress and hang or stop at 71%.  I need to exit the Organzer, kill ElementsAutoAnalyzer.exe, and then restart the Organizer to get it to work again. But then it starts analyzing from the beginning again and then stops after some time.
    It looks like there is a memory leak in ElementsAutoAnalyzer.exe.  The VM starts at ~54 MB and keeps on growing with every processed photo.  The size increases about 1 MB per second (about 15 photos).   The organizer stops showing progress after the  ElementsAutoAnalyzer.exe VM size reaches around 1.7 GB.

    I'm trying to use the advertised feature to help me narrow down issues with photos.  I've already got too many of them.  I will take any help from an automatic tool by showing potential issues with photos.  I can be the final judge if a photo is out of focus or is too dark.  My plan is to filter by Blur for example.  Then I can quickly assess all photos for this and remove photos that are clearly not desirable.
    Many of the issues pointed out by John Rellis can be resolved by making your media read-only.
    The large amount of CPU times issue point out by John looks like was resolved in PsE/PrE 9 by the new 'Run Analyzer only when System is idle".
    I also use this for videos.  The scene detect is great and helps me pick out clips as I am assembling my videos.
    I had the impression that Adobe cleaned up some of the auto-analysis features with PrE 9 so that more people could take advantage of it, like I would like to.

  • BI7 BEx Analyser problem

    Hi,
    I am working on BI7. I have problem that I cannot open BI7 BEx Analyser, however I can open 3.X Analyser. On clickin for BI7 Analyser It say that 'Critical programm erroe occured, The programm needs to close, Please refer to the trace for further information'.
    My question is, if I can open 3.X anayser, why I am getting error for BI7 Analyser.
    Can some one please guide me resolve this issue.
    For more details MS Office 2003 Patch 2
    SAP GUI patch level 7.

    Hi,
       Looks like a GUI problem, you'll need to install BI again.
    Uninstall BI. and then do the following
    Install the following softwareu2019s / patches before installing SAP FrontEnd.
    u2022     .Net framework 2
    [http://www.microsoft.com/downloads/details.aspx?FamilyID=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&displaylang=en]
    u2022     Microsoft Visual J# .NET Version 2 Redistributable Package
    [http://www.microsoft.com/downloads/details.aspx?familyid=F72C74B3-ED0E-4AF8-AE63-2F0E42501BE1&displaylang=en]
    u2022     Install the the office Patch KB907417 if not present.
    [http://www.microsoft.com/downloads/details.aspx?FamilyId=1B0BFB35-C252-43CC-8A2A-6A64D6AC4670&displaylang=en]
    Then install BI7 frontend and BEX.
    Install the BI patch .
    Regards.

  • ADDM and performance analysis problem

    Respected Everyone,
    I am facing a problem, the detail is as under.
    Few days back, my users complained about slow db response, when i opened the oem control page, i got to know the sysman user started a series of commands and consuming the cpu resources from the last 2 hours. i analyzed few commands running under the session and decided to kill it. After killing the session everything was ok, except one thing which i noticed after few hours that performance analysis is not refreshing the advices on the oem control general page.
    What efforts i have done so far ?
    1) i first started ADDM maually but even on ADDM result page, it showing the same old statictics.
    2) i restarted the database, but of no use.
    3) I restarted the machine thought it may be dbconsole problem but of no use.
    Now guys kindly suggest me what should i do now.
    Thanks and Best Regards
    Nadeem Hameed

    Well i checked the ADDM analysis, its ok in ADDM page,
    Tell my why its not updating the statistics on the general page.
    Thanks
    Nadeem

  • Vibration octave analysis problem

    I'm measuring a vibration in range of 1-80Hz, according to Iso 2631.
    The problem is that I need the velocity information for each 1/3-octave bands. It should be expressed in mm/s. If fractional octave analysis is used it always ends up to psd unit (mm/s)^2. Using some basic fft-analysis the unit is correct (mm/s) but resolution is higher than 1/3 octave. Any ideas?
    ps. Is there any plans to develop a weighting filter needed by Iso 2631-2?

    Human vibration filters were added to the Sound and Vibration Measurement Suite in version 6.0 at the end of 2007 compliant to ISO 2631 and ISO 5439.   

  • Transcoding the Analysis Problem with Audio

    I submitted a previous problem regarding sound degradation on imported media.  I diagnosed my problem and uncovered what I feel is a serious fault in Final Cut Pro X.  The media was recorded in a very noisy environment.  I.e. hotel ballrooms.  This provides a lot of background noise.  Fans, electric pops, traffic noise and so on.
    I had accepted the default option to analysis and fix the audio problems. IMHO, Final Cut tried to fix too much.  This produces a thin sounding often broken up audio.  Since the media was lengthy (50 minutes) it took about an hour to process.  Before the process completed working with the project was fine.  As soon as the processing completed the problem appeared.
    So if you experience similar problems just import the media without the audio automatically fixed and do it manually.

    No, just go into the controls and tweak it manually.  The analysis has to run anyway, may as well run it during import.

  • Mercalli V2 analysis problem

    Mercalli V2 users knows that analysis is required before seeing the stabilized clip, my problem in Premiere Pro CS5 with MercalliV2 is that once I prerender the clip by pressing Enter, Mercalli asks me for analysis again, but then even if I go to the Mercalli UI and press OK to start a new analysis it doesn't start anymode, because it knows  that it's done already...
    Anybody knows the solution to this problem ?
    Thanks

    The current Mercalli version (Windows) 2.0.69, (Mac) 2.0.70 works better with transitions.
    The improvement is a workaround to fix a Premiere CS4 and CS5 Bug.
    Is the workaround activated a warn-symbol is visible in the UI. Click on this to get a message.
    The opposite:
    Mercalli can’t detect clip trimming correctly.
    Tip:
    If the start point was trimmed than the stabilization will breaks.
    For a steady output, the user must open the Mercalli UI and press the “OK” button to reanalyze.
    I have done same tests with transitions and all works fine!

  • Temperature sweep analysis problem

    Hello
    I am having problem getting even the simplest  temperature sweep analysis to work in multisim 10.
    As an example, please see attached circuit and pictures.
    The circuit contains a simple voltage divider where R1 has a TC1 of 1 ohm/C, and as shown in figure 1, the resulting voltage is 0.5V when running simulation at
    27degree C with TNOM 27C.
    Raising the Temperature to 28degree C results in a resulting voltage of 0.33V (figure 2) (indicating  a doubling of the R1 value because of the 1 degree temperature raise with a TC1 of 1ohm/C)
    To my understanding, the R1 value should have changed with only 1 ohm.
    Any hints on what might be the problem with my temperature analysis ??
    Does anybody know if this is a known error with Multisim ??
    Any advice/hint is appreciated !
    Attachments:
    test2.ms10 ‏37 KB
    14.JPG ‏74 KB
    22.JPG ‏63 KB

    You are correct in you observation. The value is effectively being doubled. This is apparently a software error that will have to be further addressed by NI. I am responding only verify your findings (2 or more people reporting the same results are always better than just one person reporting it).
    I have no answer as to how to work around this. NI will have to read this and maybe they can come up with a temprary solution until a permanent one can be found.
    Kittmaster's Component Database
    http://ni.kittmaster.com
    Have a Nice Day

  • Runtime Analysis problem

    Hi all,
    I am trying to execute the program in SE30 for performance analysis, after giving the program name and if i try to execute , then its displaying the error " Unable to write to the measurement data file" , what this error belongs to, and how can i do performance analysis. Plz help.
    Balu.

    Hello Bala,
    I think this is a Authority problem.
    Create one sample program and use it in Se30 and check the same error u r getting for the sample report.
    If it is so then it is a authorization problem.
    In the report MS38TF02 put the breakpoint at this line
    AuthCheck for 'T'/'F' automaticaly by run
    AuthCheck for 'R' (see FB SUBMIT_REPORT)
    <b>  if p_obj_type = 'R' and trdir-secu <> space. "Report</b>    authority-check object 'S_PROGRAM'
                        id     'P_GROUP'  field trdir-secu
                        id     'P_ACTION' field 'SUBMIT'.
        if sy-subrc <> 0.
          set cursor field 'RS38T-REPO_NAME'.
          message e005.
        endif.
      endif.
    If the same persist for all then it is aproblem of authorization only.
    If useful reward.
    Vasanth

  • Association analysis problem

    Hello...
    I created an association analysis data mining model, but whe I run it, the job gets cancelled a get the following error:
    No Large itemsets could be generated for the specified model parameters
    No Large itemsets could be generated for the specified model parameters
    Message no. RSDME434
    I'm running the model against a 2 million record BIA indexed infocube, the transaction infoobject is for day + associate number.
    Has anyone got this message?
    What can be the problem?
    Regards
    Eli Hueramo

    Hello,
    I think your support and confidence are too high. You have to reduce these figures and you will get some results.
    Kind regards
    Tobias

  • Ac analysis problem

    Hi,
    I have a problem with AC Analysis. When I am going to display Ac Analysis in grapher view, it shows nothing.
    Please help me out regarding this matter.
    Attachments:
    Design2.ms12 ‏64 KB

    Hi,
    There are several situations that can cause a "Singular matrix " error and one of them is having inductors in parallel. To get around this, place a small resistor between the inductors as shown in the attached file.
    Tien P.
    National Instruments
    Attachments:
    Design2_a.ms12 ‏61 KB

  • BI Front end Bex analyser problem.

    Hi ,
    I couldn't able to open bex analyzer in BI 7.0.
    My basis team has followed all steps,but i couldn't able to open BEX tool bar in BI 7.0.
    I can able to create query in BI 7.0 .
    Kindly suggest me .
    thanks,
    Vijay.

    Hi Vijay,
    The scenerio refers to GUI or Installation problems.
    I suggest you to go through with these following SAP Notes:
    1025122
    1050605
    also check your Front End installation as per Note 197460.
    Regards
    Vivek Tripathi

  • Analysis Problem in RAR

    hi,
    We have some troubles in Risk analysis and Remediation.
    In the configuration tab, background job:
    -User/Role and Profile Sync are OK
    -But when we launch a user, role or profile analysis we always have the statuts error and the error message(in job history):
    Failed: error while executing the job:Index , Size:0
    So at the moment in the informer tab, we don't have any report.
    Thank you in advance for your help,
    Julien

    here is the end of the log (status error):
    Tue Aug 26 21:48:45 CEST 2008 :  Job ID:68 : Analysis done: SAP_EMPLOYEE_ERP05_FR elapsed time: 0 ms
    Tue Aug 26 21:48:45 CEST 2008 : Job ID: 68 Status: Running
    Tue Aug 26 21:48:45 CEST 2008 : Job ID: 68 Status: Running
    Tue Aug 26 21:48:45 CEST 2008 :  Job ID:68 : Exec Risk Analysis
    Tue Aug 26 21:48:45 CEST 2008 :  Job ID:68 : Analysis starts: SAP_WP_CEO_HOSP
    Tue Aug 26 21:48:45 CEST 2008 :  Job ID:68 : Analysis done: SAP_WP_CEO_HOSP elapsed time: 0 ms
    Tue Aug 26 21:48:45 CEST 2008 : Job ID: 68 Status: Running
    Tue Aug 26 21:48:45 CEST 2008 : Job ID: 68 Status: Running
    Tue Aug 26 21:48:45 CEST 2008 : --- BKG Role Permission Analysis (System: E30) completed ---  elapsed time: 73609 ms
    Tue Aug 26 21:48:46 CEST 2008 : Index: 0, Size: 0java.util.ArrayList.RangeCheck(ArrayList.java:507)
    java.util.ArrayList.get(ArrayList.java:324)
    com.virsa.cc.xsys.bg.bo.BgSchedulerBO.getLastRunDate(BgSchedulerBO.java:627)
    com.virsa.cc.xsys.bg.bo.BgSchedulerBO.updateLastRun(BgSchedulerBO.java:688)
    com.virsa.cc.xsys.bg.BatchRiskAnalysis.performBatchRiskAnalysis(BatchRiskAnalysis.java:1093)
    com.virsa.cc.xsys.bg.BatchRiskAnalysis.performBatchSyncAndAnalysis(BatchRiskAnalysis.java:1272)
    com.virsa.cc.xsys.bg.BgJob.runJob(BgJob.java:401)
    com.virsa.cc.xsys.bg.BgJob.run(BgJob.java:263)
    com.virsa.cc.xsys.riskanalysis.AnalysisDaemonBgJob.scheduleJob(AnalysisDaemonBgJob.java:201)
    com.virsa.cc.xsys.riskanalysis.AnalysisDaemonBgJob.start(AnalysisDaemonBgJob.java:78)
    com.virsa.cc.comp.BgJobInvokerView.wdDoModifyView(BgJobInvokerView.java:434)
    com.virsa.cc.comp.wdp.InternalBgJobInvokerView.wdDoModifyView(InternalBgJobInvokerView.java:1223)
    com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doModifyView(DelegatingView.java:78)
    com.sap.tc.webdynpro.progmodel.view.View.modifyView(View.java:337)
    com.sap.tc.webdynpro.clientserver.cal.ClientComponent.doModifyView(ClientComponent.java:481)
    com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doModifyView(WindowPhaseModel.java:551)
    com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:148)
    com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
    com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
    com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:321)
    com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
    com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
    com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
    com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
    com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
    com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
    com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
    com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
    com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
    com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
    com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
    com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
    com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
    com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    java.security.AccessController.doPrivileged(Native Method)
    com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
    com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
    Tue Aug 26 21:48:46 CEST 2008 : Job ID: 68 Status: Error
    Tue Aug 26 21:48:46 CEST 2008 : ----------- Background Job History: job id=68, status=2, message=Error while executing the Job:Index: 0, Size: 0
    Tue Aug 26 21:48:46 CEST 2008 : -----------------------Complted Job =>68---------------------------------------------------------------

Maybe you are looking for

  • Outgoing payment methods in CRM 7 webUI is not inline with CRMC_BUAG_PAYM

    Hi, We have requirement to set up outgoing payment at FICA document level for refund purpose. Currently this is feasible using FPE2 transaction in ISU. However, we have the requirement to have this option in CRM 7. In CRM 7, the navigation of setting

  • DP Clearing in MIRO & F-54

    DEAR GURUS, i have question about DP clearing. here the case: 1. i clear DP and the invoice through f-54 and input the invoice number. and the result in FBL1N is there are 2 open items, DP and Invoice which have the same assignment. that helps us to

  • OTD Grouping question

    Hi all, I have a problem with my custom output OTD: I cannot get it to group my data how I want it to be grouped. Please consider the following layout of my output OTD non-repeating Root-element at the top followed by a repeatable sub-element called

  • How to easily bring Cisco ASA back into failover.

    We had two asa's that were never upgraded so I decided to upgrade them.  However the failover was never turned off.  If I copy the config off the one asa to the other and bring both back online will this take care of the issue or will I need to re-do

  • HT4060 Do I have to charge my newly bought Ipad?

    I have just bought an Apple New Ipad, my question are: 1) Do I need to charge the battery for my newly bought Ipad? and 2) How long do I have to charge the battery? Thank you.