MGT001371 - Scheduling Manufacturing Systems Homework IIIPython

Java Python MGT001371 - Scheduling Manufacturing Systems

Homework Assignment III

• To be submitted on 04.07.2024 (Thursday 13:00) via TUM Moodle.

• Late submission will not be accepted. No collaboration!

• You must submit your handwritten or typewritten solutions in a single .pdf file and your codes in separate  .py files.

• You should zip (compress) all of your files and change the name of your  .zip file as ”NameLastname studentID”, i.e., ”BaharOkumusoglu 01234567.zip” .

•  Coding questions will be graded based on the result they generate and not the entered syntax.  If a particular code section does not work, zero points are given to that section. We try to give points for the outcome of individual code sections wherever possible, but reserve the right to grade multiple sections together if necessary.

•  Be precise.  Do not make vague statements and leave any room for interpretation. You must also present your step-by-step solutions.

1.  (10 points)  Short quiz questions

(a)  (2 points)  In online scheduling, a production plan is created for the planning horizon considering future uncertainties.  As the outcomes of uncertain parameter are already considered, later rescheduling is not needed. True or False?

(b)  (2 points)  An undiscounted (γ = 1) sequential decision model acts greedily, i.e., chooses the best action in the current state that maximizes the immediate reward.  True or False?

(c)  (2 points)  In the value iteration algorithm solving an MDP, the value function repre- sents the expected long-term cumulative rewards for each state. True or False?

(d)  (2 points)  Capacity consumption constraints as we know them from mathematical pro- gramming can be considered in an MDP by defining state space-dependent action spaces A(s) if the available machine capacity is part of the state space.  True or False?

(e)  (2 points)  For an MDP problem with 2,000 states, 10 possible actions in every state and 10,000 entries in the reward matrix, what is the dimension of the transition probability matrix?

Background for following questions

Biomanufacturing refers to the production of biological products, such as therapeutic pro- teins, vaccines, enzymes, and other bio-based materials, using living cells or organisms.  It involves utilizing biotechnological processes to manufacture these products on a large scale. There are numerous operational challenges that make production planning and process con- trol challenging in biomanufacturing.  For example, product formation is often non-linear with lower productivity rates at the beginning and end of a batch fermentation.  The use of living organism and natural raw materials can lead to uncertainties in product quality, yield or processing times. Also, biomanufacturing is typically carried out in batches, where a specific quantity of cells or organisms is cultivated and processed together. Batch failures can occur due to contamination, process deviations, or unforeseen events usually requiring to discard the whole batch.

2.  (30 points)  Consider  a  biomanufacturing  process  that  produces biopharmaceuticals  in  a batch process. A batch can be fermented for a maximum of 4 days.  During that time, the product is being formed in a non-linear fashion with the revenues representing the reward achieved if the batch is harvested  after the respective batch fermentation duration.   The problem is, that the batch can also fail which results in zero revenue.   The  probability of a batch failure increases with the batch fermentation duration.  Fore example, a batch which has been fermented for 2 days has a probability of 10% to fail within the next day of fermentation.

The operating cost to ferment  the batch for another day is C = −10MU. The revenue and batch failure risk per batch duration are given in Table 1.  The operations manager wants to determine the optimal harvest day.  Note that a batch that has failed or has been fermented for four days needs to be harvested.  A harvested batch is not replaced with a new one, hence the problem can be modelled as an indefinite-horizon MDP problem.  This means that the dynamic process stops whenever the batch is harvested.

MGT001371 - Scheduling Manufacturing Systems Homework Assignment IIIPython

Batch duration [Days]

Revenue R [MU]

Batch failure risk [%]

0

0

2

1

10

5

2

40

10

3

80

20

4

100

n/a

Failure ”F”

0

n/a

Table 1: Process parameter for batch biomanufacturing process with batch failure risk.

(a)  (10 points)  Formulate  the state space,  action space  and rewards for each state and action pair for this dynamic decision-making problem.

(b)  (10 points)  Visualize the transition probabilities in a graph with the nodes being the states and the arcs stating the action and transition probabilities.  You can use the template provided in the appendix. Note the additional ”Harvested (H)” state, which is a terminal (sink) state with no allowed action and no immediate reward.

(c)  (10 points)  Write down the Bellman optimality equation for each state explicitly and determine the optimal actions for each state. What is the optimal harvest time point for this batch fermentation?

3.  (20 points)  Biopharmaceuticals are drugs produced in a biomanufacturing process, usually using mammalian cells.   The production process of the active pharmaceutical ingredient

(API) consists of an upstream stage, in which the cells are fermented in batches to produce the API, and the downstream process which captures and purifies the API after batch harvest.

We focus on the upstream stage where each batch of a particular product is fermented for approximately 10-14 days and a new batch is started once the previous was harvested.  Note that a batch can only be harvested in the morning, i.e., the decision to harvest can only be made once a day.  The API formation during a batch fermentation follows a sigmoidal curve with slower formation rates at the beginning and at the end of the process.   The uncertain product formation rate, i.e., the quantity of product added during the next day of fermentation, follows a Normal distribution N(µ(s),σ(s)) with the mean formation rate µ(s) and the standard deviation σ(s) depending on the current product concentration.

The product concentration is Xmin  = 10 L/mg at the beginning, as the batch is being trans- ferred from a previous fermentation stage.  The maximum product concentration that can be achieved is Xmax  = 2150 L/mg .  The volume of the bioreactor is assumed to be constant at VB  = 15, 000L.  We consider fermentation cost per day of CF  = −20$, fixed batch harvest cost of CH  = −350$ and a revenue of CR  = 0.0001 mg/$.  The operational question arising is the optimal batch harvest time point assuming that a harvested batch is immediately replaced with a new batch.

(a)  (8 points)  The state space needs to represent the current product concentration in the bioreactor. Hence, it can be any value in the interval [Xmin,Xmax]. What is the problem with such a state space if we want to solve the problem using dynamic programming, e.g., policy iteration?  Briefly explain how this problem could be addressed and which additional modelling parameter needs to be introduced.  Is the solution we obtain from the policy iteration algorithm still optimal?  Name a class of solution algorithms that would not have a problem with this kind of state space.

(b)  (12 points)  Define the state space, action space and reward function of an MDP model for this problem using formal mathematical notation and briefly explaining it.

4.  (40 points)  Python implementation

(a)  (30 points)  Implement a general policy iteration algorithm in Python to determine the optimal policy for an MDP problem.  For this, write three functions:  (1) Policy evaluation that takes the MDP and a policy as an input and returns the state values, (2) policy improvement that takes the MDP, a policy and the state values as an input and returns an improved policy, and (3) general policy iteration that calls the functions (1) and (2) iteratively until the convergence criterion is met.  In the Python template ”Scheduling MDP DP HW4.py” you will find the core structure of these three functions with missing code sections marked as #CODE HERE.

(b)  (10 points)  Solve the biopharmaceutical batch fermentation problem from Question 3

in Python using policy or value iteration. The Python template ”Scheduling MDP Biopharma Case

provides you the parameters and some pre-filled code sections for this case. You have to define the state space, action space and reward function         

  • 4
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,我可以为您提供一些关于用Verilog编程实现MGT接口的指导。 MGT(Multi-Gigabit Transceiver)接口是一种高速串行通信接口,用于在FPGA和外部设备(如其他FPGA、ASIC、DSP等)之间传输高速数据。MGT接口通常用于高速数据传输和通信领域,例如光纤通信、高速网络以及高速存储系统等。 下面是一些用Verilog编写MGT接口的基本步骤: 1. 定义输入和输出端口:定义MGT接口的输入和输出端口,包括时钟、数据和控制信号等。 2. 设计时钟模块:设计一个时钟模块,用于生成MGT接口所需的时钟信号。时钟信号的频率通常是接口传输速率的几倍。 3. 设计发送模块:设计一个发送模块,用于将数据发送到MGT接口。发送模块通常包括数据缓冲区、控制逻辑和串行转并行器等。 4. 设计接收模块:设计一个接收模块,用于从MGT接口接收数据。接收模块通常包括数据缓冲区、控制逻辑和并行转串行器等。 5. 编写仿真测试台:使用Verilog编写仿真测试台,测试您的设计是否符合要求。在仿真测试台中,您可以模拟各种测试用例,以确保您的MGT接口设计能够正常工作。 需要注意的是,MGT接口的设计和实现需要一定的基础知识和经验。如果您是初学者,建议先学习Verilog语言的基本语法和数字电路设计的基本原理,以便更好地理解和编写MGT接口。 希望这些信息对您有所帮助,如果您有更多的问题,请随时提出。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值