COMP9334 Project

Pandas入门教程(二十二):股票数据分析实战——yfinance 获取数据、技术指标与收益率分析 把 Pandas 用在真实场景,才能体会它的价值。本文以茅台股票为例,用 yfinance 获取历史行情,完成缺失值处理与列筛选,绘制收盘价曲线,计算 SMA 移动平均线与 RSI 相对强弱指数,并通过日收益率、累计收益率和波动率完成完整的量化分析流程。 阅读详情

COMP9334 Project, Term 1, 2024:
Computing clusters
Due Date: 5:00pm Friday 19 April 2024
Version 1.01
Updates to the project, including any corrections and clarifications, will be posted on the
course website. Make sure that you check the course website regularly for updates.
Change log
• Version 1.01 (27 March 2024). There is a mistake in the denominators of the two probability
density functions in Section 5.1.1. For g0(t), it should be t raised to the power of η0+1 where
the +1 was missing. A similar error appeared in g1(t), it should be t raised to the power of
η1+1.
• Version 1.00. Issued on 19 March 2024.
1 Introduction and learning objectives
You have learnt in Week 4A’s lecture that a high variability of inter-arrival times or service times
can cause a high response time. Measurements from real computer clusters have found that the
service times in these clusters have very high variability [1]. The reference paper [1] also has a
number of suggestions to deal with this issue. One suggestion is to separate the jobs according
to their service time requirements, and have one set of servers processing jobs with short service
times and another set of servers for jobs with long service times. This arrangement is the same
as supermarkets having express checkouts for customers buying not more than a certain number
of items and other checkouts that do not have a limit on the number of items. You had seen this
theory in action in Week 4A’s revision Problem 1. We also highly recommend you to read the
paper [1].
In this project, you will use simulation to study how to reduce the response time of a server
farm that uses different servers to process jobs with different service time requirements.
In this project, you will learn:

  1. To use discrete event simulation to simulate a computer system
  2. To use simulation to solve a design problem
  3. To use statistically sound methods to analyse simulation outputs
    We mentioned a number of times in the lectures that simulation is not simply about writing
    simulation programs. While it is important to get your simulation code correct, it is also important
    that you use statistically sound methods to analyse simulation outputs. There, roughly half of
    the marks of this project is allocated to the simulation program, and the other half to statistical
    analysis; see Section 7.2.
    1
    Server 0
    Group 0 →
    Dispatcher
    Queue 0 ↓
    New jobs
    submitted
    by users
    Jobs killed by servers in
    Group 0
    Queue 1 ↑
    Group 1 →
    •
    •
    •
    Server n0 - 1
    Server n0
    •
    •
    •
    Server n - 1
    Figure 1: The multi-server system for this project.
    Jobs that are killed are
    sent back
    to the dispatcher
    Jobs that have completed
    their processing will
    depart the system
    permanently
    Jobs that have completed
    their processing will
    depart the system
    permanently
    2 Support provided and computing resources
    If you have problems doing this project, you can post your question on the course forum. We
    strongly encourage you to do this as asking questions and trying to answer them is a
    great way to learn. Do not be afraid that your question may appear to be silly, the
    other students may very well have the same question! Please note that if your forum post
    shows part of your solution or code, you must mark that forum post private.
    Another way to get help is to attend a consultation (see the Timetable section of the course
    website for dates and times).
    If you need computing resources to run your simulation program, you can do it on the VLAB
    remote computing facility provided by the School. Information on VLAB is available here: https:
    //taggi.cse.unsw.edu.au/Vlab/
    3 Multi-server system configuration with job isolation
    The configuration of the multi-server system that you will use in this project is shown in Figure
  4. The system consists of a dispatcher and n servers where n ≥ 2. The n servers are parti
    tioned into 2 disjoint groups, called Groups 0 and 1, with at least one server in each group. The
    number of servers in Groups 0 and 1 are, respectively, n0 and n1 where n0,n1 ≥ 1 and n0+n1 = n.
    The servers in Group 0 are used to process short jobs which require a processing time of no
    more than a time limit of Tlimit. The servers in Group 1 do not impose any limit on service time.
    2
    The dispatcher has two queues: Queue 0 and Queue 1. The jobs in Queue i (where i = 0, 1)
    are destined for servers in Group i. Both queues have infinite queueing spaces.
    When a user submits a job to this multi-server system, the user needs to indicate whether the
    job is intended for the servers in Group 0 or Group 1. The following general processing steps are
    common to all incoming jobs:
    • If a job is intended for a server in Group i (where i = 0, 1) arrives at the dispatcher, the job
    will be sent to a server in Group i if one is available, otherwise the job will join Queue i.
    • When a job departs from a server in Group i, the server will check whether there is a job at
    the head of Queue i. If yes, the job will be admitted to the available server for processing.
    Recall that the servers in Group 0 have a service time limit. The intention is that the users
    make an estimate of the service time requirement of their submitted jobs. If a user thinks that
    their job should be able to complete within Tlimit, then they submit it to Group 0; otherwise, they
    should send it to the Group 1.
    Unfortunately, the service time estimated by the users is not always correct. It is possible that
    a user sends a job which cannot be completed within the time limit to Group 0. We will now
    explain how the multi-server system will process such a job. Since the user has indicated that the
    job is destined for Group 0, the job will be processed according to the general processing steps
    explained earlier. This means the job will receive processing by a server in Group 0. After this
    job has been processed for a time of Tlimit, the server says that the service time limit is up and
    will kill the job. The server will send the job to the dispatcher and tell it that this is a killed job.
    The dispatcher will check whether a server in Group 1 is available. If yes, the job will be send to
    an available server; otherwise, it will join Queue 1 to wait for a server to become available. When
    a server in Group 1 is available to work on this job, it will process the job from the beginning,
    i.e., all the previous processing in a Group 0 server is lost.
    If a job has completed its processing at a Group 0 server, which means its service time is less
    than or equal to Tlimit, then the job leaves the multi-server system permanently. Similarly, a job
    completed its processing at a Group 1 server will leave the system permanently.
    We make the following assumptions on the multi-server system in Figure 1. First, it takes
    the dispatcher negligible time to classify a job and to send a job to an available server. Second,
    it takes a negligible time for a server to send a killed job to the dispatcher. Third, it takes a
    negligible time for a server to inform the dispatcher on its availability. As a consequence of these
    assumptions, it means that: (1) If a job arriving at the dispatcher is to be sent to an available
    server right away, then its arrival time at the dispatcher is the same as its arrival time at the
    chosen server; (2) The departure time of a job from the dispatcher is the same as its arrival time
    at the chosen server; and (3) The departure time of a killed job from a server is the same as its
    arrival time at the dispatcher. Ultimately, these assumptions imply that the response time of the
    system depends only on the queues and the servers.
    We have now completed our description of the operation of the system in Figure 1. We will
    provide a number of numerical examples to further explain its operation in Section 4.
    You will see from the numerical examples in Section 4 that the number of Group 0 servers n0
    can be used to influence the mean response time. So, a design problem that you will consider in
    this project is to determine the value of n0 to minimise the mean response time.
    Remark 1 Some elements in the above description are realistic but some are not. Typically,
    users are required to specify a walltime as a service time limit when they submit their jobs to a
    computing cluster. If a server has already spent the specified walltime on the job, then the server
    3
    will kill the job. All these are realistic.
    The re-circulation of a killed job is normally not done. A user will typically have to resubmit
    a new job if it has been killed. If a killed job is re-circulated, then it may be given a lower priority,
    rather than joining the main queue which is the case here.
    Some programming technique (e.g., checkpointing) allows a killed job or crashed job to resur
    rect from the last state saved rather than from the beginning. However, that may require a sizeable
    memory space.
    In order to make this project more do-able, we have simplified many of the settings. For
    example, we do not use lower priority for the re-circulated killed jobs.
    4 Examples
    Wewill now present three examples to illustrate the operation of the system that you will simulate
    in this project. In all these examples, we assume that the system is initially empty.
    4.1 Example 0: n=3, n0 =1, n1 =2 and Tlimit = 3
    In this example, we assume the there are n = 3 servers in the farm with 1 (= n0) server in Group
    0 and 2 (= n1) servers in Group 1. The time limit for Group 0 processing is Tlimit = 3.
    Table 1 shows the attributes of the 8 jobs that we will use in this example. Each job is given
    an index (from 0 to 7). For each job, Table 1 shows its arrival time, service time and the server
    group that the user has indicated. For example, Job 1 arrives at time 10, requires 4 units of time
    for service and the user has indicated that this job needs to go to a Group 0 server. Since the
    service time requirement for this job exceeds the time limit Tlimit of 3, this job will be killed after
    3 time units of service and will be sent to dispatcher after that.
    Note that, a job which a user sends to a Group 0 server will be completed if its service time
    is less than or equal to the service time limit Tlimit being imposed. So, Job 6 in Table 1 will be
    completed in a Group 0 server and this job will not be killed.
    Job index Arrival time Service time required Server group indicated
    0
    2
    1
    2
    3
    4
    5
    6
    7
    10
    11
    12
    14
    15
    19
    20
    5
    4
    9
    2
    8
    5
    3
    1
    0
    0
    0
    1
    0
    0
    6
    Table 1: Jobs for Example 0.
    1
    Remark 2 We remark that the job indices are not necessary for carrying out the discrete event
    simulation. We have included the job index to make it easier to refer to a job in our description
    below.
    The events in the system in Figure 1 are
    • The arrival of a new job to the dispatcher; and,
    4
    • The departure of a job from a server.
    We remark that for a Group 1 server, a departed job has its service completed. However, for
    a Group 0 server, a departed job can be a killed job or a completed job. Note that we have not
    included the arrival of a re-circulated killed job to the dispatcher as an event. This is because the
    arrival of a re-circulated job at the dispatcher is at the same time as the departure of that job
    from a Group 0 server. So the simulation will handle these events together: the departure of a
    killed job and its handling by the dispatcher.
    We will illustrate the simulation of the system in Figure 1 using “on-paper simulation”. The
    quantities that you need to keep track of include:
    • Next arrival time is the time that the next new job (i.e, not a killed job) will arrive
    • For each server, we keep track its server status, which can be busy or idle.
    • We also keep track of the following information on the job that is being processed in the
    server:– Next departure time is the time at which the job will depart from the server. If the
    server is idle, the next departure time is set to ∞. Note that there is a next departure
    time for each server.– Thetime that this job arrived at the system. This is needed for calculating the response
    time of the job when it permanently departs from the system.
    • The contents of Queues 0 and 1. Each job in the queue is identified by a 2-tuple of (arrival
    time, service time).
    There are other additional quantities that you will need to keep track of and they will be
    mentioned later on.
    The “on-paper simulation” is shown in Table 2. The notes in the last column explain what
    updates you need to do for each event. Recall that the two event types in this simulation are the
    arrival of a new job to the dispatcher and the departure from a server, we will simply refer to
    these two events as Arrival and Departure in the “Event type” column (i.e., second column) in
    Table 2.
    5
    Master
    clock
    Event
    type
    Next
    arrival
    time
    Server0
    Group0
    Server 1
    Group1
    Server 2
    Group1
    Queue0 Queue1 Notes
    0–2 Idle,∞ Idle,∞ Idle,∞–– Weassumetheserversareidleandqueuesareemptyatthestart
    of thesimulation. Thenextdeparturetimes forall serversare
    ∞.The“–”indicatesthatthequeuesareempty.
    2 Arrival 10 Idle,∞ Busy,
    (2,7)
    Idle,∞–– ThiseventisthearrivalofJob0foraGroup1server. Sinceboth
    Group1serversare idlebeforethisarrival, thejobcanbesent
    toanyoneoftheidleservers.Wehavechosentosendthisjobto
    Server1.Thejobrequiresaservicetimeof5, soitscompletion
    timeis7.Notethattherecordofthejobintheserverisa2-tuple
    consistingof(arrivaltime,scheduleddeparturetime).Lastly,we
    needtoupdatethearrival timeofthenextjob,whichis10.
    7 Departure 10 Idle,∞ Idle,∞ Idle,∞–– ThiseventisthedepartureofajobfromServer1. SinceQueue
    1isempty,Server1becomesidle.
    10 Arrival 11 Busy
    (10,13,4)
    Idle,∞ Idle,∞–– This event is thearrival of Job1 foraGroup0server. Since
    Server0is idle, thejobcanbesenttotheidleserver. This job
    requiresaservicetimeof4whichexceedstheservicetimelimit
    of3forGroup0servers,sothesimulationneedstoschedulethis
    jobtodepartServer0attime13becausethisisthetimethatthis
    jobwillbekilledbytheserver.Weusethe3-tupleconsistingof
    (arrivaltime,scheduleddeparturetime,servicetime),whichfor
    thisjobis(10,13,4),toindicatethatthisjobarrivesattime10,
    isscheduledtodepartattime13anditsservicetimerequirement
    is4timeunits.Weneedtoincludetheservicetimeof the job
    becausewewillneedit laterwhenthe jobisre-circulatedtoa
    Group1server.Notethat ifyouseea3-tuplejobinaGroup0
    server, itmeansthatthe jobwillbekilledandre-circulatedto
    aGroup1server. Lastly,weneedtoupdatethearrival timeof
    thenextjob,whichis11.
    6
    11 Arrival 12 Busy
    (10,13,4)
    Idle,∞ Idle,∞ (11,9)–This event is thearrival of Job2 foraGroup0server. Since
    Server0isbusy,thisjobwilljoinQueue0.Thequeuestoresthe
    2-tuple(arrival time, servicetime)whichis (11,9) for this job.
    Wealsoneedtoupdatethearrival timeof thenext job,which
    is12.
    12 Arrival 14 Busy
    (10,13,4)
    Idle,∞ Idle,∞ (11,9),
    (12,2)–This event is thearrival of Job3 foraGroup0server. Since
    Server0isbusy,thisjobwill joinQueue0withthejobinforma
    tion(12,2).Wealsoneedtoupdatethearrivaltimeofthenext
    job,whichis14.
    13 Departure 14 Busy
    (11,16,9)
    Busy
    (10,17)
    Idle,∞ (12,2)–Thisevent isthedepartureofakilledjobfromServer0. This
    jobwillbere-circulatedtothedispatcher. SincebothGroup1
    serversare idle, this jobcangotoanyoneof them. Wehave
    chosentosendittoServer1. Sincethisjobrequires4timeunits
    of service, it isscheduledtodepartServer1attime17.The2
    tuple(10,17)indicatesthatthisjobarrivesat10andwilldepart
    attime17. Sincethis isadeparturefromaGroup0server,we
    willalsoneedtocheckQueue0,whichhas2jobs. Sothejobat
    theheadofthequeuewilladvancetoServer0whichisbecoming
    available.Thisjobrequires9unitsofservicetimewhichexceeds
    theservicetimelimit. So, thejobwillbekilledattime13+3
    =16timeunits.
    14 Arrival 15 Busy
    (11,16,9)
    Busy
    (10,17)
    Busy
    (14,22)
    (12,2)–ThiseventisthearrivalofJob4foraGroup1server.Sincethere
    isaGroup1serveravailable, this jobgoestoServer2directly.
    This jobrequires8unitsof service, sothe job is scheduledto
    departat time22.Wealsoneedtoupdatethearrival timeof
    thenextjob,whichis15.
    15 Arrival 19 Busy
    (11,16,9)
    Busy
    (10,17)
    Busy
    (14,22)
    (12,2)
    (15,5)–ThiseventisthearrivalofJob5foraGroup0server. Sinceall
    Group0serversarebusy, this jobjoinsQueue0.Wealsoneed
    toupdatethearrival timeofthenextjob,whichis19.
    7
    16 Departure 19 Busy
    (12,18)
    Busy
    (10,17)
    Busy
    (14,22)
    (15,5) (11,9) Thisevent isthedepartureofakilledjobfromServer0. This
    jobwillbere-circulatedtothedispatcher. SincebothGroup1
    serversarebusy,thisjobwill joinQueue1.Thejobatthehead
    ofQueue0will advance toServer0. This jobrequiresonly2
    unitsof servicewhichiswithinthe limit.Weusea2-tupleto
    rememberthisjobbecausethejobiswithinthetimelimitsoit
    willnotbekilled.
    17 Departure 19 Busy
    (12,18)
    Busy
    (11,26)
    Busy
    (14,22)
    (15,5)-Thisevent isthedepartureofafinishedjobatServer1. Since
    thereisajobinQueue1, thejobwillmoveintoServer1.
    18 Departure 19 Busy
    (15,21,5)
    Busy
    (11,26)
    Busy
    (14,22)-- Thisevent is thedepartureofafinishedjobatServer0. This
    jobwilldepart fromthesystempermanently.Wecantell that
    becauseitisa2-tupleintheserverratherthana3-tuple. Since
    thereisajobinQueue0, thejobwillmoveintoServer0.
    19 Arrival 20 Busy
    (15,21,5)
    Busy
    (11,26)
    Busy
    (14,22)
    (19,3)-ThiseventisthearrivalofJob6foraGroup0server. Sinceall
    Group0serversarebusy, this jobjoinsQueue0.Wealsoneed
    toupdatethearrival timeofthenextjob,whichis20.
    20 Arrival ∞ Busy
    (15,21,5)
    Busy
    (11,26)
    Busy
    (14,22)
    (19,3) (20,6) ThiseventisthearrivalofJob7foraGroup1server. Sinceall
    Group1serversarebusy,thisjobjoinsQueue1. Sincethereare
    nomorejobsarriving,weupdatethenextarrival timeto∞
    21 Departure ∞ Busy
    (19,24)
    Busy
    (11,26)
    Busy
    (14,22)-(20,6),
    (15,5)
    Thisevent isthedepartureofakilledjobfromServer0. This
    jobwillbere-circulatedtothedispatcher. SincebothGroup1
    serversarebusy,thisjobwill joinQueue1.Thejobatthehead
    ofQueue0will advance toServer0. This jobrequiresonly3
    unitsofservicewhichiswithinthelimit.Weonlyneeda2-tuple
    torememberthatthis jobarrivesattime19andwilldepartat
    time24.
    22 Departure ∞ Busy
    (19,24)
    Busy
    (11,26)
    Busy
    (20,28)-(15,5) Thisevent isthedepartureofafinishedjobatServer2. Since
    thereisajobinQueue1, thejobwillmoveintoServer2.
    24 Departure ∞ Idle,∞ Busy
    (11,26)
    Busy
    (20,28)-(15,5) Thisevent isthedepartureofafinishedjobatServer0. Since
    Queue0isempty,Server0isnowidle.
    26 Departure ∞ Idle,∞ Busy
    (15,31)
    Busy
    (20,28)-- ThiseventisthedepartureofafinishedjobatServer1.Thejob
    attheheadofQueue1advancestoServer1.Thequeueisnow
    empty.
    8
    28
    Departure
    ∞
    Idle, ∞
    Busy
    (15, 31)
    Idle, ∞–
    This event is the departure of a finished job at Server 2. Server
    2 is now idle as Queue 1 is empty.
    31
    9
    Departure
    ∞
    Idle, ∞
    Idle, ∞
    Idle, ∞–
    This event is the departure of a finished job at Server 1. Server
    1 is now idle as Queue 1 is empty.
    Table 2: “On paper simulation” illustrating the event updates of
    the system.
    The above description has not explained what happens if an arrival event and a departure
    event are at the same time. We will leave it unspecified. If we ask you to simulate in trace driven
    mode, we will ensure that such situation will not occur. If the inter-arrival time and service time
    are generated randomly, the chance of this situation occurring is practically zero so you do not
    have to worry about it.
    Table 3 summarises the arrival, departure, job classification and response times of the jobs in
    this example. In the table, we classify the jobs into 3 types:
    • Group 0 jobs that are completed (i.e., not killed) within the time limit. We will refer to
    these jobs as completed Group 0 jobs from now on. These jobs are marked as 0.
    • Group 0 jobs that are recirculated. They are marked as r0.
    • Jobs that are indicated for Group 1 by the users. They are marked as 1.
    In Table 3, we have included the response times for completed Group 0 jobs and Group 1 jobs.
    The mean response time for completed Group 0 jobs is 11
    2 = 5.5 and the mean response time for
    Group 1 jobs is 21
    3 = 7.
    Later on, you will work on a design problem to reduce a weighted sum of the mean response
    times of the completed Group 0 jobs and the Group 1 jobs. Here we have purposely neglected
    the re-circulated jobs because we will not attempt to reduce their response time. The reason is
    that we do not want to incentivise users to give poor estimation of the service time requirement
    of their jobs.
    Job Arrival time Departure time Job classification
    Response time
    Group 0 within limit Group 1
    0
    2
    7
    1
    2
    3
    4
    5
    6
    7
    10
    11
    12
    14
    15
    19
    20
    17
    26
    18
    22
    31
    24
    28
    1
    r0
    r0
    0
    1
    r0
    0
    5
    6
    5
    8
    1
    Table 3: The arrival and departure times of the jobs in Example 0.
    8
    10
    4.2 Example1: n=4,n0=2,n1=2andTlimit=3.5
    For thisexample,weassumethat thesystemhasn=4servers. BothGroups0and1have2
    serverseach, i.e.,n0=n1=2.Theservicetime-limitforGroup0serverisTlimit=3.5.
    Table4showstheattributesofthejobswhichwillarriveatthissystem.Table5summariesthe
    resultsofthesimulation.ThemeanresponsetimeofthecompletedGroup0jobs is 23.9
    4 =5.975
    andthemeanresponsetimeoftheGroup1jobsis 36.8
    5 =7.36.
    Jobindex Arrival time Servicetimerequired Servergroupindicated
    0 2.1 5.2 1
    1 3.4 4.1 1
    2 4.1 3.1 0
    3 4.4 3.9 0
    4 4.5 3.4 0
    5 4.7 4.4 1
    6 5.5 4.7 1
    7 5.9 4.1 0
    8 6.0 2.5 0
    9 6.5 8.6 1
    10 7.6 4.1 0
    11 8.1 2.6 0
    Table4: JobsforExample1.
    Job Arrival time Departuretime Jobclassification Responsetime
    Group0withinlimit Group1
    0 2.1 7.3 1 5.2
    1 3.4 7.5 1 4.1
    2 4.1 7.2 0 3.1
    3 4.4 16.1 r0
    4 4.5 10.6 0 6.1
    5 4.7 11.7 1 7.0
    6 5.5 12.2 1 6.7
    7 5.9 20.2 r0
    8 6.0 13.1 0 7.1
    9 6.5 20.3 1 13.8
    10 7.6 24.3 r0
    11 8.1 15.7 0 7.6
    Table5:ThearrivalanddeparturetimesofthejobsinExample1.
    11
    4.3 Example2: n=4,n0=1,n1=3andTlimit=3.5
    Thisexampleis identical toExample1exceptthatn0=1.Table6summariestheresultsofthe
    simulation.ThemeanresponsetimeofthecompletedGroup0jobsis 44.9
    4 =11.225andthemean
    responsetimeoftheGroup1jobsis 29.8
    5 =5.96. Itisnotsurprisingthatthemeanresponsetime
    of thecompletedGroup0jobshasgoneupwhilethatofGroup1jobshasgonedown. This is
    becauseinthisexample, therearefewerserversinGroup0.
    Job Arrival time Departuretime Jobclassification Responsetime
    Group0withinlimit Group1
    0 2.1 7.3 1 5.2
    1 3.4 7.5 1 4.1
    2 4.1 7.2 0 3.1
    3 4.4 14.6 r0
    4 4.5 14.1 0 9.6
    5 4.7 9.1 1 4.4
    6 5.5 12.0 1 6.5
    7 5.9 21.7 r0
    8 6.0 20.1 0 14.1
    9 6.5 16.1 1 9.6
    10 7.6 27.7 r0
    11 8.1 26.2 0 18.1
    Table6:ThearrivalanddeparturetimesofthejobsinExample2.
    12
    5 Project description
    This project consists of two main parts. The first part is to develop a simulation program for the
    system in Figure 1. The system has already been described in Section 3 and illustrated in Section
  5. In the second part, you will use the simulation program that you have developed to solve a
    design problem.
    5.1 Simulation program
    You must write your simulation program in one (or a combination) of the following languages:
    Python 3 (note: version 3 only), C, C++, or Java. All these languages are available on the CSE
    system.
    We will test your program on the CSE system so your submitted program must be able to
    run on a CSE computer. Note that it is possible that due to version and/or operating system
    differences, code that runs on your own computer may not work on the CSE system. It is your
    responsibility to ensure that your code works on the CSE system.
    Note that our description uses the following variable names:
  6. A variable mode of string type. This variable is to control whether your program will run
    simulation using randomly generated arrival times and service times; or in trace driven mode.
    The value that the parameter mode can take is either random or trace.
  7. A variable time_end which stops the simulation if the master clock exceeds this value. This
    variable is only relevant when mode is random. This variable is a positive floating point
    number.
    Note that your simulation program must be a general program which allows different param
    eter values to be used. When we test your program, we will vary the parameter values. You can
    assume that we will only use valid inputs for testing.
    For the simulation, you can always assume that the system is empty initially.
    Hint: Do not write two separate programs for the random and trace modes because they share
    a lot in common. A few if–else statements at the right places are what you need to have both
    modes in one program.
    5.1.1 The random mode
    When your simulation is working in the random mode, it will generate the inter-arrival times
    and the workload of a job in the following manner.
  8. We use {a1,a2,…,ak,…,…} to denote the inter-arrival times of the jobs arriving at the
    dispatcher. These inter-arrival times have the following properties:
    (a) Each ak is the product of two random numbers a1k and a2k, i.e ak = a1ka2k ∀k = 1,2,…
    (b) The sequence a1k is exponentially distributed with a mean arrival rate λ requests/s.
    © The sequence a2k is uniformly distributed in the interval [a2l,a2u].
    Note: The easiest way to generate the inter-arrival times is to multiply an exponentially
    distributed random number with the given rate and a uniformly distributed random number
    in the given range. It would be more difficult to use the inverse transform method in this
    case, though it is doable.
    13
  9. The workload of a job is characterised by two attributes: the server group (i.e., Group 0 or
  1. that the job is to be sent to, and the service time of the job.
    (a) The first step to determine which server group to send the job to. This decision is made
    by a parameter p0 ∈ (0,1):
    • Prob[a job is indicated by the user for a Group 0 server] = p0
    • Prob[a job is indicated by the user for a Group 1 server] = 1 −p0
    For example, if p0 is 0.8, then there is a probability of 0.8 that a job is indicated for a
    Group 0 server and a probability of 0.2 for a Group 1 server. The server group for each
    job is independently generated.
    (b) Once the server group for a job has been generated, the next step is to generate its
    service time. The service time distribution to be used depends on the server group.
    i. If a job is indicated to go to a Group 0 server, its service time has the probability
    density function (PDF) g0(t):



    g0(t) =
    where


    0
    η0
    γ0 tη0+1
    0
    γ0 = α−η0
    0
    for 0 ≤ t ≤ α0
    for α0 < t < β0
    for t ≥ β0
    −β−η0
    0
    (1)
    Note that this probability density function has 3 parameters: α0, β0 and η0. You
    can assume that β0 > α0 > 0 and η0 > 1.
    ii. If a job is indicated to go to a Group 1 server, its service time has PDF:
    0
    g1(t) =
    where
    η1
    γ1 tη1+1
    for 0 ≤ t ≤ α1
    for α1 < t
    γ1 = α−η1
    1
    (2)
    Note that this probability density function has 2 parameters: α1 and η1. You can
    assume that α1 > 0 and η1 > 1.
    5.1.2 The trace mode
    When your simulation is working in the trace mode, it will read the list of inter-arrival times,
    the list of service times and server groups from two separate ASCII files. We will explain the
    format of these files in Sections 6.1.3 and 6.1.4.
    An important requirement for the trace mode is that your program is required to simulate
    until all jobs have departed from the system. You can refer to Table 2 for an illustration.
    5.2 Determining the value of n0 that minimises a weighted mean re
    sponse time
    After writing your simulation program, your next step is to use your simulation program to de
    termine the number of Group 0 servers n0 that minimises a weighted mean response time.
    For this design problem, you will assume the following parameter values:
    14
    • Total number of servers: n = 10
    • The service time limit Tlimit for Group 0 servers is 3.3.
    • For inter-arrival times: λ = 3.1, a2ℓ = 0.85, a2u = 1.21
    • The probability p0 that a job is indicated for a Group 0 server is 0.74.
    • The service time for a job which is indicated for Group 0: α0 = 0.5, β0 = 5.7, η0 = 1.9.
    • The service time for a job which is indicated for Group 1: α1 = 2.7 and η1 = 2.5.
    The aim of the design problem is to minimise the weighted response time:
    w0T0 +w1T1
    (3)
    where T0 is the mean response time of the completed Group 0 jobs and T1 is the mean response
    time of Group 1 jobs. The value of the weights w0 and w1 are fixed for this design problem, and
    they are given by 0.83 and 0.059 respectively. As an example, if T0 = 1.86 and T1 = 56.7, then the
    weighted mean response time is 0.83 × 1.86 + 0.059 × 56.7. The rationale behind choosing these
    weights is explained in Remark 3.
    The aim of the design problem is to find the value of n0 to minimise this weighted response
    time. Note that we assume that there is at least a server in each group, therefore 1 ≤ n0 ≤ n−1.
    In solving this design problem, you need to ensure that you use statistically sound methods
    to compare systems. You will need to consider simulation controls such as length of simulation,
    number of replications, transient removals and so on. You will need to justify in your report on
    how you determine the value of n0.
    Remark 3 For the parameters above, out of all the jobs that are not re-circulated, 73.65% are
    Group 0 jobs within the time limit and 26.35% are Group 1 jobs. The average service time for
    Group 0 jobs within the time limit is 0.887 and that for Group 1 jobs is 4.5. The weights w0
    and w1 are computed, respectively, from 0.7365
    0.887 and 0.2635
    4.5 . So the weights take into account the
    frequency of a class of jobs. We also use the inverse service time as a weight so that we are not
    giving too much advantage to Class 1 jobs as they have large service time requirement.
    6 Testing your simulation program
    In order for us to test the correctness of your simulation program, we will run your program using
    a number of test cases. The aim of this section is to describe the expected input/output file format
    and how the testing will be performed.
    Each test is specified by 4 configurations files. We will index the tests from 0. If 12 tests are
    used, then the indices for the tests are 0, 1, 2, …, 11. The names of the configuration files are:
    • For Test 0, the configuration files are mode_0.txt, para_0.txt, interarrival_0.txt and
    service_0.txt. The files are similarly named for indices 1, 2, 3, …, 9.
    • For Test 10, the configuration files are mode_10.txt, para_10.txt, interarrival_10.txt
    and service_10.txt. The files are similarly named if the test index is a 2-digit number.
    We will refer to these files using the generic names mode
    the format of the configuration files in Section 6.1
    .txt, para
    .txt etc. We will describe
    Each test should produce 2 output files whose format will be described in Section 6.2. We will
    explain how testing will be conducted in Sections 6.3 and 6.5.
    15
    6.1 Configurationfileformat
    Note thatTest0 is the sameasExample0discussed inSection4.1. Wewill use that test to
    illustratethefileformat.
    6.1.1 mode
    .txt
    Thisfileistoindicatewhetherthesimulationshouldrunintherandomortracemode.Thefile
    containsonestring,whichcaneitherberandomortrace.
    6.1.2 para
    .txt
    If thesimulationmodeistrace, thenthisfilehasthreelines. Thefirst lineisthevalueofn(=
    totalnumberof servers), thesecondlinehasthevalueofn0 (=numberofGroup0servers)and
    thethirdlinehasthevalueofTlimit. Ifthetest isExample0inSection4.1, thenthecontentsof
    thisfileare:
    3
    1
    3
    Thesevaluesareinthesamplefilepara_0.txt.
    If thesimulationmode israndom, thenthefilehas four lines. Themeaningof thefirstthree
    linesisthesameasabove.Thelastlinecontainsthevalueoftime_end,whichistheendtimeof
    thesimulation. Thecontentsof thesamplefilepara_4.txtareshownbelowwherethe last line
    indicatesthatthesimulationshouldrununtil200.
    5
    2
    3.1
    200
    Youcanassumethatwewill onlygiveyouvalidvalues. Youcanexpectntobeapositive
    integergreater than2,n0≥1andTlimit>0. Fortime_end, it isastrictlypositive integeror
    floatingpointnumber.
    6.1.3 interarrival*.txt
    Thecontentsof thefileinterarrival*.txtdependonthemodeof thetest. Ifmode istrace,
    thenthefileinterarrival*.txtcontainstheinterarrivaltimesofthejobswithoneinterarrival
    timeoccupyingone line. Youcanassume that the listof interarrival times isalwayspositive.
    ForExample0 inSection4.1, thearrival timesare [2,10,11,12,14,15,19,20]whichmeans the
    inter-arrivaltimesare[2,8,1,1,2,1,4,1].Forthisexample,theinter-arrivaltimeswillbespecified
    byafile(seesamplefileinterarrival0.txt)whosecontentsare:
    2.0000
    8.0000
    1.0000
    1.0000
    2.0000
    1.0000
    4.0000
    1.0000
    If themode israndom, thenthefileinterarrival*.txtcontainthreenumbers inone line.
    Thesethreenumberscorrespondtotheparametersλ,a2ℓanda2u.Asanexample, thecontents
    ofinterarrival4.txtare:
    16
    0.90.911.27
    For thisexample, thevaluesofλ, a2ℓ anda2uarerespectively0.9, 0.91and1.27. Youcan
    assumethatall theseparametervaluesarepositive.
    6.1.4 service*.txt
    Fortracemode, thefileservice*.txtcontains, foreachjob, its servicetimeandtheserver
    groupforwhichthe jobisdestined. Asanillustration, theservicetimesandservergroups for
    Example0inSection4.1willbespecifiedbyafile(seesamplefileservice0.txt)whosecontents
    are:
    5.00001
    4.00000
    9.00000
    2.00000
    8.00001
    5.00000
    3.00000
    6.00001
    Notethateachrowhas2entries, andtheycorrespondtotheservicetime(firstentry)andthe
    servergroup(secondentry).Forexample,thefirstjobhasaservicetimeof5andisindicatedfora
    Group1server.Youwillfindaone-to-onecorrespondencebetweenthecontentofservice0.txt
    andthe informationinTable1. Youcanassumethatthefirstentryisapositivefloat,andthe
    secondentryineachrowiseither0or1.
    Forrandommode, thefileservice*.txtcontainsthree lines. Forexample, thecontentsof
    service4.txtare:
    0.7
    1.23.62.1
    2.84.1
    Thenumberinthefirstlineisp0.Thethreenumbersinthesecondlineareα0,β0andη0.Finally,
    thetwonumbersinthethirdlineareα1andη1.Youcanassumeall thesevaluesarevalid.
    Youcanassumethatthedataweprovidefortracemodeareconsistentinthefollowingway:
    thenumberof inter-arrival timesandthenumberof linesofservicetimesareequal.
    6.2 Outputfileformat
    Inorder totestyoursimulationprogram,weneedtwooutputfilespertest. Onefilecontains
    twomeanresponsetimes.Theotherfilecontainsthearrivaltimes,departuretimesandjobclas
    sificationinformationsimilartoColumns2–4inTable3.
    Forrandommode, themeanresponse time shouldbecalculatedusingthose jobs thathave
    permanentlydepartedthesystembytime_end. Inotherwords, forthosejobswhicharestill in
    thequeueorarebeingprocessedintheserverattime_end,youdonot includethesejobswhen
    calculatingthemeanresponsetime.
    Note thatyoudonothave toconsider transient removal for themeanresponsebeforeyou
    writetheresulttotheoutputfile. However,youshouldconsidertransientremovalwhenyoudo
    yourdesign.
    17
    Twomeanresponsetimesshouldbewrittentoafilewhosefilenamehastheformmrt_.txt.
    ForExample0inSection4.1, theexpectedcontentsofthisfileare:
    5.50007.0000
    where the twonumbers correspondtothemeanresponse timesof, respectively, thecompleted
    Class0andClass1jobs.
    Theotherfiledep_
    .txtcontainsthedeparturetypeandclassificationof the jobs. ForEx
    ample1inSection4.2, theexpectedcontentsofthisfileare:
    4.10007.20000
    2.10007.30001
    3.40007.50001
    4.500010.60000
    4.700011.70001
    5.500012.20001
    6.000013.10000
    8.100015.70000
    4.400016.1000r0
    5.900020.2000r0
    6.500020.30001
    7.600024.3000r0
    Notethefollowingrequirementsforthefile:
  1. Eachlinecontains3entries.
  2. Foreachline,thefirstentryisthearrivaltimeofthejobtothesystem(i.e.,asanewjob),
    thesecondentryis itspermanentdeparturetimefromthesystemandthethirdentryisa
    classificationofthejobinthesamewayasColumn4inTable3.Thepossibleclassifications
    forajobare0,r0and1.Youshouldbeabletoreconcilethecontentsoftheabovefilewith
    Example1inSection4.2.
  3. Thejobsmustbeorderedaccordingtoascendingcompletiontimes.
  4. Ifthesimulationisinthetracemode,weexpectthesimulationtofinishafterall jobshave
    beenprocessed.Therefore,thenumberof linesindep_*.txtshouldbeequaltothenumber
    of jobs.
  5. If thesimulationis intherandommode, thefileshouldcontainall thejobsthathavebeen
    completedbytime_end.
    Allmeanresponse times, arrival timesandcompletiontimes inmrt_.txtanddep_.txt
    shouldbeprintedasfloatingpointnumberstoexactly4decimalplaces.Notethatyoursimulation
    shouldbeperformedinfullfloatingpointprecisionandyoushouldonlydotheroundingwhen
    youarewritingtheoutputfiles.
    6.3 Thetestingframework
    Whenyou submit your project, youmust include aLinuxbash shell scriptwith the name
    run_test.shsothatwecanrunyourprogramontheCSEsystem. Thisshell script isrequired
    becauseyouareallowedtouseacomputerlanguageofyourchoice.
    Letusfirst recall that eachtest is specifiedby four configurationfilesandshouldproduce
    twooutputfiles. Forexample, testnumber0isspecifiedbytheconfigurationfilesmode_0.txt,
    interarrival_0.txt,service_0.txtandpara_0.txt;andtestnumber0isexpectedtoproduce
    18
    the output files mrt_0.txt and dep_0.txt.
    We will use the following directory structure when we do testing.
    the directory containing run
    config/
    output/
    test.sh
    Wewill put all the configuration files for all the tests in the sub-directory config/. You should
    write all the output files to the sub-directory output/.
    To run test number 0, we use the shell command:
    ./run_test.sh 0
    The expected behaviour is that your simulation program will read in the configuration files for
    test number 0 from config/, carry out the simulation and create the output files in output/.
    Similarly, to run test number 1, we use the shell command:
    ./run_test.sh 1
    This means that the shell script run_test.sh has one input argument which is the test number
    to be used.
    Let us for the time being assume that you use Python (Version 3) to write your simulation
    program and you call your simulation program main.py. If the file main.py is in the same directory
    as run_test.sh, then run_test.sh can be the following one-line shell script:
    python3 main.py $1
    The shell script will pass the test number (which is in the input argument $1) to your simula
    tion program main.py. This also implies that your simulation program should accept one input
    argument which is the test number.
    Just in case you are not familiar with shell script, we have provided two sample files: run_test.sh
    and main.py to illustrate the interaction between a shell script and a Python (Version 3) file. You
    need to make sure run_test.sh is executable. (You can make the shell script run_test.sh exe
    cutable by using the command “chmod u+x run_test.sh”.) If you run the command ./run_test.sh 2,
    it will produce a file with the name dummy_2.txt in the directory output/. You can also try using
    other input arguments for the sample shell script. You can use these sample files to help you to
    develop your code.
    If you use C, C++ or Java, then your run_test.sh should first compile the source code and
    then run the executable. You should of course pass the test number to the executable as an input.
    You can put your code in the same directory that contains run_test.sh or in a subdirectory
    below it. For example, you may have a subdirectory src/ for your code like the following:
    the directory containing run
    test.sh
    config/
    output/
    src/
    6.4 Sample files
    You should download the file sample
    project
    files.zip from the project page on the course
    website. The zip archive has the following directory structure:
    19
    Base directory containing cf
    config/
    output/
    ref/
    Details on the zip-archive are:
    output
    with
    ref.py, run
    test.sh and main.py
    • The sub-directory config/ contains configuration files that you can use for testing.– The files mode_0.txt, mode_1.txt, …, and mode_7.txt. Note that Tests 0–3 are for
    trace mode while Tests 4–6 are for random mode.– The files para_.txt, interarrival_.txt and service_.txt for * from 0 to 6, as
    the input to the simulation.– Note that Tests 0–2 are the same as Examples 0–2 in Section 4.
    • The sub-directory output/ is empty. Your simulation program should place the output files
    in this sub-dirrectory.
    • The sub-directory ref/ contains the expected simulation results.– Thefiles mrt_
    ref.txt and depref.txt for * from 0 to 6, as the reference files for
    the output. For Tests 0–3, you should be able to reproduce the results in mrt
    ref.txt
    and dep
    *_ref.txt. However, since Tests 4–6 are in random mode, you will not be
    able to reproduce the results in the output files. They have been provided so that you
    can check the expected format of the files.
    • ThePython file cf_output_with_ref.py which illustrates how we will compare your output
    against the reference output. This file takes in one input argument, which is the test number.
    For example, if you want to check your simulation outputs for test 0, you use:
    python3 cf_output_with_ref.py 0
    Note the following:– The file cf_output_with_ref.py expects the directory structure shown earlier.– For trace mode, we will check your mean response times, the departure times and
    classifications. Note that we are not looking for an exact match but rather whether
    your results are within a valid tolerance. The tolerance for the trace mode is 10−3
    which is fairly generous for numbers with 4 decimal places.– For random mode, we will only check the mean response times. You can see from the
    sample file that we check whether the mean response time is within an interval. We
    obtain this interval using the following method: (i) we first simulate the system many
    times; (ii) we then use the simulation results to estimate the maximum and minimum
    mean response times; (iii) we use the estimated maximum and minimum values to form
    an interval; (iv) in order to provide some tolerance due to randomness, we enlarge this
    interval further.– Note that we use a very generous tolerance so if your mean response time does not pass
    the test, then it is highly likely that your simulation program is not correct.
    • The files run_test.sh and main.py as mentioned in Section 6.3.
    20
    6.5 Carrying out your own testing on the CSE system
    It is important for you to note the assumption on directory structure mentioned in Section 6.3.
    You must ensure your shell script and program files are written with this assumption in mind.
    Since we will be testing your work on the CSE system, we strongly advise you to carry out the
    following on the CSE system before submission.
    • Create a new folder in your CSE account and cd to that folder. We will refer to this directory
    as the base directory.– Copy your shell script run_test.sh and program files to the base directory– Copy the config and ref directories, as well as their contents, to the base directory– Create an empty directory output
    • Make sure your shell script is executable by using the command “chmod u+x run_test.sh”
    • Run your shell script for each test one by one. Make sure that each run produces the
    appropriate output files for that test in the output directory.
    • Copy cf_output_with_ref.py to the base directory. Run it to compare your output against
    the reference output.
    These steps are the same as those that we will use for testing. It is important to know that
    we will create an empty output/ directory before we run your code. This means your code does
    NOThave to create the output/ directory.
    The submission portal will make an attempt to run test number 0 with your submitted files,
    see Section 7.3.
    6.6 Getting started and base code
    For this project, we do not require you to write your code from scratch. You are allowed to build
    your project by using: (i) the sample code from COMP9334; or (ii) the code in the public domain
    as long as it meets the requirements below.
    If you intend to use Python 3 to write your simulation code, the best way to get started is to
    use the M/M/m simulation code provided with the solution to Week 4B’s revision problem and
    modify from there. Sample code for trace driven simulation is provided with the lecture in Week
    4B.
    There is also a lot of discrete event simulation code in Python 3, C, C++ and Java in the
    public domain. You are allowed to use the public domain code as a basis for your project work as
    long as it meets the following requirements:
  6. The code has a clearly identifiable author
  7. The code has a date which is before the date that this project document is released.
  8. You provide us with an URL of the source code.
  9. You clearly state the changes that you have made on the original code to adapt it to the
    specifications of this project.
    If you use any public domain code in your project, your project report must include the in
    formation to satisfy the above four requirements.
    21
    If you would like to use a certain public domain source but you are not sure whether it meets
    our requirements, you can consult the lecturer on the forum using a private message.
    If your project work is based on the COMP9334 sample code, then your report must state
    that the COMP9334 sample code has been used and provide information to satisfy Requirement
    4 above.
    7 Project requirements
    This is an individual project. You are expected to complete this project on your own.
    7.1 Submission requirements
    Your submission should include the following:
  10. A written report
    (a) Only soft copy is required.
    (b) It must be in Acrobat pdf format.
    © It must be called ”report.pdf”.
    (d) The report must include the information required in Section 6.6.
  11. Program source code:
    (a) For doing simulation
    (b) The shell script run_test.sh, see Section 6.3.
  12. Any supporting materials, e.g. logs created by your simulation, scripts that you have written
    to process the data etc.
    The assessment will be based on your submission and running your code on the CSE system.
    It is important that you submit the right version of the code and make sure that it runs on the
    CSE system.
    It is important that you write a clear and to-the-point report. You need to aware that you
    are writing the report to the marker (the intended audience of the report) not for yourself. Your
    report will be assessed primarily based on the quality of the work that you have done. You do
    not have to include any background materials in your report. You only have to talk about how
    you do the work and we have provided a set of assessment criteria in Section 7.2 to help you to
    write your report. In order for you to demonstrate these criteria, your report should refer to your
    programs, scripts, additional materials so that we are aware of them.
    7.2 Assessment criteria
    We will assess the quality of your project based on the following criteria:
  13. The correctness of your simulation code. For this, we will:
    (a) Test your code using test cases
    (b) Look for evidence in your report that you have verified the correctness of the inter
    arrival probability distribution, the probability of sending a job to Group 0 or Group
    1, and service time distribution. You can include appropriate supporting materials to
    demonstrate this in your submission.
    22
    © Look for evidence in your report that you have verified the correctness of your simulation
    code. Although we have given you test cases, we have at no point claimed that those
    test cases are sufficient to verify the correctness of your simulation output.
    You can meet this assessment criterion by arguing that the test cases that we have
    provided are sufficient and why. Alternative. you may derive test cases to test your
    code and explain the rationale of your new test cases. You can include appropriate
    supporting materials to demonstrate this in your submission.
  14. Youwill need to demonstrate that your results are reproducible. You should provide evidence
    of this in your report.
  15. For the part on determining a suitable value of n0 that minimises the weighted mean response
    time, we will look for the following in your report:
    (a) Evidence of using statistically sound methods to analyse simulation results
    (b) Explanation on how you choose your simulation and data processing parameters, e.g
    lengths of your simulation, number of replications, end of transient etc.
    The above marking criteria closely follow the messages that we have been promoting in our
    lectures on discrete event simulation. You need to ensure that your simulation code is correct
    and at the same time you need to consider the choice of simulation parameters and use statistical
    sound method to compare systems. If you want to do well for the project, you must make sure
    that you cover all the above aspects. Roughly half of the project marks go to Points 1 and 2
    above, and roughly half of the project marks go to Point 3 above.
    7.3 How to submit
    You should “zip” your report, shell script, programs and supporting materials into a file called
    “project.zip”. The submission system will only accept this filename. If you need to store directo
    ries when zipping, you need to use the-r switch to preserve the relative path.
    You should submit your work via the course website. Your submission cannot be more than
    20MBytes in size.
    You can submit multiple times before the deadline. A later submission overrides the earlier
    submissions, so make sure you submit the correct file. We will only mark the last submission that
    you make. Do not leave until the last moment to submit, as there may be technical or communi
    cation error and you will not have time to rectify.
    When you submit your files, the submission portal will unzip your project.zip and run a test
    script. The script will search for your run_test.sh (using the shell command find .-name test.sh)
    and executes sample test 0 if a unique run_test.sh is find. If the test script says that it cannot
    f
    ind your run_test.sh or it finds multiple files with the name run_test.sh, then you should
    resubmit and you should ensure that there is exactly one run_test.sh file in your zip archive.
    You can do this test after you have got the simulation part ready and before you attempt the
    design. Since later submissions will overwrite the earlier ones, you can get this test done earlier.
    8 Further project conditions
  16. The total mark for this project is 30 marks.
  17. The submission deadline is 5:00pm Friday 19 April 2024. Submissions made after the dead
    line will incur a penalty of 5% per day. The penalty is applied to the mark that you would
    have received if the submission was not late. Late submissions will only be accepted until
    5:00pm Wednesday 24 April 2024, after which no submissions will be accepted.
    23
  18. If you use a computer program to perform any part of your work, you must submit the
    program or you lose marks for that component. This requirement applies to computer
    programs for simulation as well as those for statistical analysis.
  19. Additional project conditions:
    • Joint work is not permitted on this project.– This is an individual project. As stated in Section 6.6, you must identify the
    source of the code that you have used, whether it comes from COMP9334 or public
    domain.– Do not request help from anyone other than the teaching staff of COMP9344.– Do not post your project work or code to the course forum.– project submissions are routinely examined both automatically and manually for
    work written by others.
    Rationale: this project is designed to develop the individual skills needed to solve
    problems. Using work/code written by, or taken from, other people will stop you
    learning these skills. Other CSE courses focus on skills needed for working in a team.
    • The use of AI generative tools, such as ChatGPT, is not permitted on this project.
    Rationale: We have given you the permission to use public domain code as a basis to
    develop your project, so it is not necessary for you to use ChatGPT. Our test with
    ChatGPT found that it was not able to supply us with a piece of complete running
    code for simulating a M/M/1 queue.
    • Sharing, publishing, or distributing your project work is not permitted.– Do not provide or show your project work to any other person, other than the
    teaching staff of COMP9334. For example, do not message your work to friends.– Do not publish your project code via the Internet. For example, do not place your
    project in a public GitHub repository.
    Rationale: by publishing or sharing your work, you are facilitating other students using
    your work. If other students find your project work and submit part or all of it as their
    own work, you may become involved in an academic integrity investigation.
    • Sharing, publishing, or distributing your project work after the completion of COMP9334
    is not permitted.– For example, do not place your project in a public GitHub repository after this
    offering of COMP9334 is over.
    Rationale: COMP9334 may reuse project themes covering similar concepts and content.
    If students in future terms find your project work and submit part or all of it as their
    own work, you may become involved in an academic integrity investigation.
    References
    [1] Mor Harchol-Balter and Ziv Scully. The Most Common Queueing Theory Questions Asked
    by Computer Systems Practitioners.First International Workshop on Teaching Performance
    Analysis of ComputerSystems (TeaPACS 2021) In conjunction with the IFIP Performance
    2021 Conference. Milan, Italy, Nov 2021. DOI 10.1145/3543146.3543148
    [2] Mor Harchol-Balter. Performance Modeling and Design of Computer Systems. Cambridge
    University Press (2013).
    24
如何处理动态语言(Python / JS)的“隐形”调用链? 本文揭示动态语言(Python/JS)中静态AST解析导致调用链“断链”的核心问题,提出通过运行时追踪补全图谱的解决方案。基于Code-Graph-RAG的cgr trace机制,分别利用pytest插件与V8 Profiler捕获真实调用路径,将动态边合并至静态图谱,并在权重体系中提升动态边优先级。实践表明,该方法可显著提升图谱覆盖率,实现“结构+行为”双视角理解代码,为MCP与Rerank系统提供可靠支持。 阅读详情

相关推荐

基于aarch64分析kernel源码 六:kernel_init进程(1号进程)、kthreadd进程(2号进程)

kernel_init进程(1号进程)、kthreadd进程(2号进程)分析

OnlyLove_的博客 764

comp9334辅导 proj2

对本文有疑问可以加微信 Tutor_0914联系。也可以访问我的个人辅导网站 : tutoryou 解析 主要是第6部分 。 test*: mode .txt, para .txt interarrival_.txt and service_.txt 输出为两个文件。 mode *.txt : random or trace 个人感觉随机的模式更麻烦,所以先尝试trace para *.txt 第1个:server数 第2个:是否...

行走 1509

Playwright自动化测试实战:攻克日历时间控件三大策略与Java实现

在Web自动化测试领域,元素定位与交互模拟是核心技术基础,其原理在于通过程序精确识别并操作页面中的DOM元素,以模拟真实用户行为。这项技术的核心价值在于提升测试效率、确保交互逻辑的覆盖度与可靠性,广泛应用于电商、金融、OA等系统的功能验证。日历时间控件作为典型的复杂交互组件,常涉及动态弹出层、多级导航与状态同步,是自动化测试中的常见难点。本文聚焦于使用Playwright工具,针对此类控件深入剖析了三种核心解决策略:从最高效的直接赋值、到全面模拟用户交互的主流方法,再到利用组件特性的混合定位方案,并结合Ja

weixin_28835551的博客 311

AI全栈实战 | 3.9-01 爬虫入门:requests 加 BeautifulSoup 三分钟跑通,但 90% 的人栽在这 4 个“礼貌“问题上

⚠️:本文内容仅用于。请遵守目标站点的服务条款与相关法律法规,不得对目标服务造成负担,不得采集、传播个人隐私数据。技术是中性的,边界在你手里。爬虫的入门技术(requests 发请求 + BeautifulSoup 解析)三分钟就能学会。真正区分"会用爬虫"和"会做爬虫的人"的,是这篇我们跑通"请求→解析→存储"的最小闭环,然后重点把"合规与礼貌"这根弦给你绷上。

源码获取 | 运行部署 | 定制二开修改,如果回复不及时请耐心等待,请见谅。 406

微信小程序 - 完美解决“code“:“NO_AUTH“,“message“:“商户号该产品权限未开通,请前往商户平台>产品中心检查后重试“(微信小程序报错问题排查解决)

微信小程序NO_AUTH: 商户号该产品权限未开通,请前往商户平台>产品中心检查后重试?微信小程序提示商户号该产品权限未开通,请前往商户平台>产品中心检查后重试,微信小程序"code":"NO_AUTH"错误码怎么解决,报错信息如下:httpResponseBody[{"code":"NO_AUTH","message":"商户号该产品权限未开通,请前往商户平台>产品中心检查后重试"}],微信小程序支付问题,如何解决这个问题,虚拟支付商户号,虚拟支付商户号里面没有产品支付的页面,排查商户号没问题,商户号配置

🏆 前端领域优质创作者 4444

微信小程序视频内容服务类目审核不过?绕过审核的两种思路!

虽然不推荐绕过官方审核,但在实际项目中,总有一些特殊情况:比如,最近开发的小程序涉及视频播放,提交审核时,被官方要求补充“教育服务 - 在线视频课程”类目。但我们的内容只是车辆使用介绍,并非教育课程,无法提供相应资质。该怎么办?很多开发者发现,小程序开发不是最难的,审核才是最难的。 微信为了规避法律风险,要求某些功能必须提供资质。例如:然而,并不是所有公司都能轻松申请到这些资质,甚至有些资质根本不适用于我们的业务,导致审核卡住,无法上线。就像我遇到的这个问题,官方要求我们补充“在线视频课程”类目,但实际业务

代码简单说 Vue、JAVA、PHP、Node.js 熟练运用,接口、架构、性能全搞定。 3246

从一段视频到可漫游的 4D 有声场景:思路拆解与最小复现手记

只需一段手机视频,你就能生成可"走进去"的 4D 有声场景:转头时狗叫声方向随之变化,走近时声音更清晰。本文拆解 Video-to-4DAVScene 的核心思路,手把手带你用几十行 Python 搭出最小管线,把视频中的运动物体变成带空间位置的声源,并附上三个真实踩坑的排障经验,代码可直接跑。🎧

helloagent的博客 235

JAVA:Spring Boot3 集成 Spring AI 实现 Skill 开发

本文介绍了如何通过Spring Boot和Spring AI实现大模型技能(Skill)开发,让AI具备调用业务系统能力。文章首先解释了Skill的概念,即AI可调用的业务能力,如查询订单、天气等,并展示了执行流程和整体架构。然后详细介绍了实践样例,包括技术版本、Maven依赖配置、AI服务设置、ChatClient创建和Skill技能注册中心的实现。注册中心提供了技能的注册、查询、启用/禁用等功能,支持按类别管理技能,并能够获取所有可用技能列表。通过这种方式,开发者可以轻松为大模型扩展业务功能调用能力。

木头 622

【每天一个 Python 小案例30】Python 基础知识综合小项目:我的工具盒

作为系列收官,本篇把前 29 篇的知识点合成一个能直接用的命令行工具"我的工具盒":计算器(用 ast 解析表达式,不碰 eval)、单位换算与温度转换(一张换算表 + 特例分支)、记账与分类统计(Decimal + JSON 持久化)、以及用"字典当命令表"把菜单和业务逻辑解耦的主循环。文中对比了 eval 的安全隐患与 ast 白名单的做法,解释了 lambda 闭包在字典里的写法与晚绑定陷阱,并在最后给出整个系列的知识地图,把变量、数据结构、控制流、函数、类、异常、文件、标准库八块内容对应到具体篇目。

xinjiyaya的博客 426

手把手教你学Simulink——基于Simulink的机械臂正运动学仿真建模示例

机械臂正运动学概述正运动学的核心在于根据每个关节的角度值,通过坐标变换(如DH参数法或齐次变换矩阵)计算出末端执行器相对于基座的位置和姿态。常用的数学工具包括旋转矩阵、平移向量以及它们组合而成的齐次变换矩阵。仿真目标设计并实现一个机械臂正运动学模型。输入关节角度,输出末端执行器的位置和姿态。分析不同关节角度下的机械臂位置变化。假设我们有一个简单的3自由度(DOF)平面机械臂,其各关节的长度分别为l1l1​、l2l2​和l3l3​。在Simulink中,可以使用。

MHD0815的博客 359

详解Python条件语句

在 Python 中,if...else 是一种条件语句,可以根据给定的条件执行不同的操作。这个语句通常用于控制程序的流程。

2601_96798737的博客 207

锂电池寿命预测 | Pytorch实现基于Transformer 的锂电池寿命预测(NASA数据集)

锂电池寿命预测 | Pytorch实现基于Transformer 的锂电池寿命预测(NASA数据集)

算法如诗的博客 5587

Python3 协程:异步编程的核心机制与实战

协程是解决I/O密集型任务等待瓶颈的高效机制,相比线程更轻量、无锁开销。从yield到async/await的演进,使异步编程语义清晰、易于理解。通过async/await可实现并发执行多个任务(如gather、create_task),显著提升网络请求、爬虫等场景性能。关键在于使用异步库(如aiohttp)替代同步库,避免阻塞事件循环。合理控制超时与并发数,才能发挥协程最大优势。

Lxn2zh的博客 159

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

torch.compile 差异仅 1e-6,边界样本预测为何翻转

torch.compile 加速后输出与 eager 不一致,部分预测翻转。逐层对比与 graph break 分析定位到动态分支翻转根因。容差回归仅适用于无分支翻转场景,零容忍场景应禁用编译。

昨日种种,皆成今我。今日种种,皆成新我。 159

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

二进制木马免杀-Python 分离免杀与 Web 挂马

二进制木马免杀-Python 分离免杀与 Web 挂马

2503_94637398的博客 268

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

蓝桥杯·全国青少年信息素养大赛·电子学会Python/C++考级 备考:莫队算法离线区间查询详解

备赛进行时:第十八届蓝桥杯软件赛报名已于 2026-10-08 10:00 开启、12-18 14:00 截止,省赛定在 2027-04-10(C/C++·Python 程序设计 9:00–13:00);中国电子学会 2026 年 12 月软件编程(C/C++ 一级至十级、Python 一级至六级)考级报名 9/23–12/2 16:00、统考 12-12;全国青少年信息素养大赛 2026—2027 赛季算法应用主题赛也已进入复盘练兵窗口。

IT_Scratch的博客 137

【Python】国家中小学智慧教育平台电子教材批量下载与 PDF 合成实战

成果:两本语文电子课本(一年级上册 118 页 / 23MB、三年级上册 130 页 / 30.3MB),合计 248 页、约 54MB,单本下载加合成 40~60 秒,PDF 页数校验全部通过。经验教训SPA 站点的数据接口优先从 bundle 里挖,比抓页面稳得多;资源链接要按 private/public 分组看待,只取平台公开部分;页数、目录名这类“可推断”的信息,永远用实际响应验证一次;受限环境里“能不能跑浏览器”要在方案定稿前确认。后续计划:这版 PDF 是图片版,没有文字层;

木头大左的博客 137

魔塔社区微调训练Qwen2-1.5B-Instruct模型并烧录到‌RK3568开发板教程

本文基于Ubuntu 22.04 + CUDA 13.0.3环境,使用LLaMA-Factory框架对Qwen2-1.5B-Instruct模型进行LoRA微调,训练儿童故事生成专用模型。通过配置qwen模板、制作alpaca格式数据集、执行sft训练并合并LoRA权重,最终将模型转换为GGUF格式,并量化为Q4_K_M以适配RK3568嵌入式平台。全程支持国产镜像加速下载与显存优化,实现高效轻量化部署。

浅清秋慕夏的博客 186

【回眸】DeepSeek V4.1 Flash 快速上手与实战

本文介绍如何高效本地部署开源大模型,通过现代化工具链实现分钟级环境搭建。聚焦显存优化、一键安装、代码调用与多轮对话实现,解决“显存不足”“连接超时”等痛点,提供参数调优与结构化输出技巧,助力开发者在离线场景下快速构建稳定、高效的本地推理系统。

啤酒鸭的物联网开发记录博客 223

智叟云集-手机证据抓取系统的工程结构与应用入口

本文系统阐述手机证据抓取系统的工程结构与应用入口,涵盖四大层面:工程目录划分(Android、Python服务、Web页面、测试与构建工具);Android组件通过Manifest声明可启动页面,主界面由MainActivity管理;Python服务通过run.py解析参数并启动FastAPI应用,支持远程访问;浏览器页面采用HTML/CSS/JS分离架构,静态资源通过路径关联,实现动态交互。各模块分工明确,协同构建可运行的采集系统。

2301_77178996的博客 232

Java Arrays.asList 常见坑详解|UnsupportedOperationException、数组联动、基本类型 bug

解析 Arrays.asList 常见开发陷阱,演示 UnsupportedOperationException、底层数组引用共享、基本类型数组问题,区分 Arrays 内部 ArrayList 与 java.util.ArrayList,给出数组转 List 的各种场景正确代码。

weixin_42617033的博客 473

利用python中matplotlib.pyplot库绘制图

plt.plot(x,y) # x,y是每个点的坐标,plot()把每个点按顺序画折线。plt.subplots(2,2)表示绘制2*2的子图布局,axs[0,0]表示在第0行第0列绘制子图...coordinates_i[:,0]表示获取每一行(每一个spot)的第0列(x坐标)coordinates_i[:,1]表示获取每一行(每一个spot)的第0列(y坐标)plot.subplot(2,2,1) 表示子图布局是2*2的,开始绘制第一个。也可以导入数据绘制。可以设置color属性,设置颜色。

qq_46147236的博客 102

Spring Boot 自动配置原理

Spring Boot 自动配置由 @EnableAutoConfiguration 导入选择器,读取 jar 中 .imports 候选清单,经去重、排序、排除后逐类做条件判断,通过才注册 Bean。延迟导入让用户 Bean 优先,@ConditionalOnMissingBean 使默认配置让位。失效时查清单和 Negative matches。

2401_89855466的博客 377

【随笔】KV缓存量化:省下的显存,要付出多少数值误差

用可运行量化器解释位宽、比例信息、分组和离群值的关系,核算KV缓存实际载荷,并给出Transformers配置与容量、延迟、质量验收方法。

code2cat的博客 455
上一篇: CS360 Machine Learning Final Competition
todcode
博客等级 码龄7年 359粉丝 108原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值