代做FIT5216: Modelling Discrete Optimization Problems Assignment 1: Mine Planning代写Java编程

FIT5216: Modelling Discrete Optimization Problems

Assignment 1: Mine Planning

1 Overview

For this assignment, your task is to write a MiniZinc model for a given problem specification.

• Submit your work to the MiniZinc auto grading system (using the submit button in the MiniZinc IDE).

• Submit your model (copy and paste the contents of the .mzn file) using the Moodle assignment.

You have to submit by the due date (Friday 28th March 2025, 11:55pm), using MiniZinc, to receive full marks. You can submit as often as you want before the due date. Late submissions without special consideration receive a penalty of 10% of the available marks per day. Submissions are not accepted more than 7 days after the original deadline.

This is an individual assignment. Your submission has to be entirely your own work. We will use similarity detection software to detect any attempt at collusion, and the penalties are quite harsh. Similarly you may not use generative AI during this assignment. If in doubt, contact your teaching team with any questions!

2 Problem Statement

Your task is to plan an underground mine, in order to mine valuable minerals. The area for mining is a rectangle of cells, the east west dimension has eastwest cells, and the north south dimension has northsouth cells. The mine must start at one of the given start positions, and build a tunnel from there. The tunnel has no branches as that is not supported by the mining machinery. Each cell has a cost to bore a tunnel there, and an associated amount of ore. A negative cost means that your tunnel cannot go through that cell.

For task (a) you are planning a mine tunnel with a given fixed length. For task (b) you are planning a mine tunnel with a given maximum length. Each cell of the tunnel must be orthogonally adjacent (above, below, left or right) to the previous cell, so the tunnel cannot have “branches”.

You have a given budget, which is the maximum cost you can spend. The total cost to build is the cost of all the cells that are tunneled, plus the cost of reinforcement for any negative cost cells that are adjacent to the tunnel (equal to the negative of their cost value). A negative cost in an orthogonally adjacent cell means that the ground is unstable, and instead of mining minerals, you have to reinforce the adjacent tunnel.

The company will mine the minerals inside the tunnel itself, and those in the orthogonally adjacent cells. So the total ore mined is equal to all the ore values in the tunnel and orthogonally adjacent cells.

The goal is to find the most profitable mine plan. The profit is the sum of the ore mined minus the sum of the mining cost.

Input data is given in MiniZinc data format:

eastwest = ⟨ east west dimension ⟩;

northsouht = ⟨ north south dimension ⟩;

cost = ⟨ 2D northsouth × eastwest array of costs ⟩;

re = ⟨ 2D northsouth × eastwest array of ore ⟩;

length = ⟨ length (limit) ⟩;

budget = ⟨ build budget ⟩;

Here is a sample data set:

eastwest = 9;

northsouth = 5;

cost = [| 1, 1, 1, 1, 1, 1, 1, 1,-3

| 1, 1, 1, 1, 1, 1, 1, 1, 1

| 1, 1, 1, 1, 1, 1,-4, 1, 1

| 1, 1, 1,-2, 1, 1, 1, 1, 1

| 1, 1, 1, 1, 1, 1, 1, 1, 1 |];

reward = [| 4, 0, 0, 0, 0, 0, 0, 0, 0

| 0, 6, 0, 0, 2, 0, 0, 4, 0

| 0, 0, 0, 0, 0, 0, 0, 0, 0

| 0, 0, 4, 0, 0, 0, 0, 0, 2

| 0, 0, 0, 0, 4, 0, 0, 2, 6

|];

length = 12;

budget = 18;

start = [(1,1),(9,5)];

On this 9x5 grid, the cost for each position is 1 except at positions (9,1), (7,3) and (4,4) which have negative costs and cannot be mined. The reward data is given by

and the length (limit) is 12 and the budget 18. Note that in general the costs may be different for each cell. We can start the mine at either the top left (1,1) or bottom right (9,5) corner.

Part A - Fixed Length Tunnel

Create a model mineplan.mzn that takes data in the format specified above and decides on a tunnel of length equal to the value length given in the data.

Here is a sample solution (which is not optimal but satisfies the constraints). The tunnel is represented in light blue, the additionally mined areas in light gray. Non-zero ore values and negative costs are shown.

Note that the tunnel has length 12, as required. It does not pass through any of the cells with a negative cost (the red cells). The total ore mined is the sum of the light blue cells (4), plus the light gray adjacent cells (sum=16) which adds up to 20. The total cost is 12 for tunneling plus the reinforcement cost for the two negative cost adjacent cells of 6 for a total of 18, under the budget. The overall profit is 2.

Your model must define the positions of the tunnel cells as x and y coordinates, together with the total profit. One correct output for the solution above is

x = [1, 2, 3, 3, 3, 4, 5, 5, 6, 6, 6, 6];

y = [1, 1, 1, 2, 3, 3, 3, 4, 4, 3, 2, 1];

profit = 2;

Note how each position e.g. (3,1) is adjacent to the next one (3,2). There are many other correct solutions.

In order to compute the cost and ore mined, you may want to decide for each cell whether it is on the tunnel path or adjacent to it. Once you have that information, it is easy to add up all the costs and rewards.

Note that you will not be able to obtain full marks by just answering part A. Some problems will have no solution, whereas using part B they have a solution.

Part B - Bounded Length Tunnel

Modify your model mineplan.mzn to treat length as a bound on the maximal possible length of the tunnel. For example a sample solution for the example data is illustrated as

The tunnel has length 8, with cost 8 + 2 = 10 within the budget of 18. It only directly covers (light blue) the start point with a reward of 4, and has adjacent rewards (light gray) of 16. The total ore is therefore 18, for a total profit of 10.

To model this extension, unused tunnel cells must be defined as having x and y coordinate 0. All the unused positions must occur at the end of the x and y lists. So a correct output for this solution is:

x = [1, 1, 1, 2, 3, 4, 5, 5, 0, 0, 0, 0];

y = [1, 2, 3, 3, 3, 3, 3, 4, 0, 0, 0, 0];

profit = 10;

3 Instructions

Edit the provided mzn model files to solve the problems described above. You are provided with some sample data files to try your model on. Your implementations can be tested locally by using the Run+check icon in the MiniZinc IDE. Note that the checker for this assignment will only test whether your model produces output in the required format, it does not check whether your solutions are correct. The checker on the server will give you feedback on the correctness of your submitted solutions and models.

4 Marking

The marks are automatically calculated.

• For most instances you can get a maximum of 0.75 for part A and 1 (full marks) for part B.

• For some instances you can get full marks with part A.

• For some instances you will always get 0 with part A.

The submission has 10 marks for locally tested data and 12 for model testing, for a total of 22 marks.





热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图