1. Homepage
  2. Programming
  3. [2022] CSC 445/545 Operations Research: Linear Programming - Programming Project

[2022] CSC 445/545 Operations Research: Linear Programming - Programming Project

Engage in a Conversation
CSC 445CSC 545VictoriaC++JavaPythonOperations ResearchLinear Programming

CSC 445/545 - Programming Project


CourseNana.COM


CourseNana.COM

This assignment will be submitted electronically through BrightSpace (as described in ‘Submission Instructions’ below). All code submissions must be your own work. Sending or receiving code from other students is plagiarism. CourseNana.COM


CourseNana.COM

1 Overview CourseNana.COM

This assignment requires implementing an LP solver which reads a text-based representation of a linear program from standard input and outputs the result of solving the LP (including whether the LP turned out to be infeasible or unbounded). Unlike the other assignments in this course, you are permitted to use floating-point computation to solve the LP (so it is not necessary to use exact fractional arithmetic). CourseNana.COM

Section 2 describes the input format and Section 3 describes the required output format. For this assignment, correctness is critical, and no marks will be given for any code that cannot be rigorously validated on actual inputs (so you should prioritize basic correctness over adding extra functionality). CourseNana.COM

The project will be marked based on a combination of empirical validation (i.e. running your solver on various test LPs), human inspection of your code (which, in general, will not be performed unless it is clear that your implementation is correct) and evaluation of the accompanying documentation. CourseNana.COM

You may implement the project in C, C++, Python or Java, and must design your solution to run correctly on the Computer Science login servers at linux.csc.uvic.ca (which requires working with the compiler or interpreter versions installed on that system). You may be allowed to use a different language at the instructor’s discretion (but only if given explicit permission in advance). Note that some aspects of the project might become more difficult depending on the language choice; this is entirely your responsibility. CourseNana.COM


CourseNana.COM

2 Input Format CourseNana.COM

The input format is a simple text-based encoding of a maximization LP in standard form, which will be provided to your solver via standard input. An LP of the form will be encoded as follows: CourseNana.COM

·      The first line of the input file will contain the values c1 c2 ... cn separated by whitespace (tabs or spaces) CourseNana.COM

·      Each remaining line will encode one constraint. The line for constraint i will contain ai,1 ai,2 . . . ai,n bi separated by whitespace. CourseNana.COM

·      Blank lines (lines which are empty or contain only whitespace characters) may be present and must be completely ignored. CourseNana.COM

·      The non-negativity constraints (x1,x2,...,xn 0) do not appear in the input encoding, since they are implied by the use of standard form. CourseNana.COM

For example, the LP CourseNana.COM

Notice that the number of variables and constraints is implied by the number of values on each line (and the number of non-empty lines). You may assume that the input format is consistent: If the first line (containing the objective coefficients) contains n values (indicating n optimization variables), each subsequent line (a constraint) will contain n + 1 values. You are not required to write error-handling logic to address the case of a malformed input. CourseNana.COM

If your program does not use the required input format, or uses an input source other than standard input, it may be impossible to evaluate and will receive a mark of zero. CourseNana.COM


CourseNana.COM


CourseNana.COM

3 Output Format CourseNana.COM

This section describes the output format of the solver. The output must be printed to standard output, and the program must generate no other output to standard output besides what is described here. It is permissible for the program to generate other output to standard error (and such output will be ignored during marking). CourseNana.COM

If your program does not use the required output format, it may be impossible to evaluate and will receive a mark of zero. CourseNana.COM

For clarity, examples of output in the text below are shown in a box. The expected output is only the text in the box. CourseNana.COM

If the input LP is infeasible (that is, if the feasible region is the empty set), the output will consist of the single line below. CourseNana.COM

Output CourseNana.COM

infeasible CourseNana.COM

If the input LP is unbounded (that is, if it is possible to increase the objective function to arbitrarily large values on feasible points), the output will consist of the single line below. CourseNana.COM

Output CourseNana.COM

unbounded CourseNana.COM

Otherwise, if the input LP is bounded and feasible, the output will consist of three lines. CourseNana.COM

·      The first line will be the single word “optimal”. CourseNana.COM

·      The second line will contain the optimal objective value. CourseNana.COM

·      The third line will contain an optimal assignment of each optimization variable x1, x2, . . . , xn, separated by whitespace (with no other separators, like commas). The optimal assignment should only include optimization variables, not slack variables. In cases where multiple fea- sible points attain the optimal solution, any feasible point is considered acceptable for this line (you do not have to ensure that your program finds a specific optimal assignment, only that the assignment provided does attain the optimal objective value). CourseNana.COM

For example, if the optimal objective value is 1.87 at the point (x1, x2, x3) = (6, 10, 1.7), the output will be CourseNana.COM

Output CourseNana.COM

optimal CourseNana.COM

1.87
6 10 1.7
CourseNana.COM

The exact formatting of numerical values is somewhat flexible, although a minimum of seven signif- icant digits should be printed. It is not necessary to zero-pad values to provide sufficient significant digits (so the value ‘1.5’ can be written instead of ‘0001.500’ or ‘1.500000’). You are encouraged to use the equivalent of the C-style “%g” format specifier to output floating point values. CourseNana.COM


CourseNana.COM


CourseNana.COM

4 Submission Format CourseNana.COM

We will use automation to validate your submission before human inspection. To ease this process, we expect all submissions to be in a standard format, and we will not mark any submission that does not comply with the standard format. CourseNana.COM

Your submission must be a .tar.bz2 archive (using BZip2 compression) called lp.tar.bz2 con- taining a directory called lp (all-lowercase). CourseNana.COM

To create an archive to submit, run the following command (in the parent directory of your lp directory): CourseNana.COM

$ tar -jcvf lp.tar.bz2 lp/ CourseNana.COM


CourseNana.COM


CourseNana.COM

5 Basic Features CourseNana.COM

All submissions must implement an LP solver with the following basic requirements. CourseNana.COM

·      If the input LP has no feasible points, the solver will report a result of “infeasible”. CourseNana.COM

·      If the input LP has any feasible points, whether or not the point x = 0 is feasible, the solver will report a result of “unbounded” or “optimal”. This means that your solver should have some mechanism for finding a feasible point in the event that the LP is not initially feasible (e.g. by solving an auxiliary problem). CourseNana.COM

·      If the input LP has any feasible points and is unbounded, the solver will report a result of “unbounded”. CourseNana.COM

·      If the input LP is both bounded and feasible, the solver will report a result of “optimal” and output the optimal objective value, along with a variable assignment that attains the optimal objective value. CourseNana.COM

·      The solver must complete successfully (in a finite number of steps) on any LP. This will be assessed both by empirical evaluation and code inspection, so your code and/or documen- tation should contain a clear explanation of how the solver avoids infinite loops. It is your responsibility to make it clear why your solver will never cycle infinitely. CourseNana.COM

Additionally, it is expected that the solver will complete in a reasonable amount of time on each LP tested during marking. Normally, five seconds or less is considered reasonable, although for some inputs this time limit may be extended (for all submissions). CourseNana.COM

  CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
CSC 445代写,CSC 545代写,Victoria代写,C++代写,Java代写,Python代写,Operations Research代写,Linear Programming代写,CSC 445代编,CSC 545代编,Victoria代编,C++代编,Java代编,Python代编,Operations Research代编,Linear Programming代编,CSC 445代考,CSC 545代考,Victoria代考,C++代考,Java代考,Python代考,Operations Research代考,Linear Programming代考,CSC 445help,CSC 545help,Victoriahelp,C++help,Javahelp,Pythonhelp,Operations Researchhelp,Linear Programminghelp,CSC 445作业代写,CSC 545作业代写,Victoria作业代写,C++作业代写,Java作业代写,Python作业代写,Operations Research作业代写,Linear Programming作业代写,CSC 445编程代写,CSC 545编程代写,Victoria编程代写,C++编程代写,Java编程代写,Python编程代写,Operations Research编程代写,Linear Programming编程代写,CSC 445programming help,CSC 545programming help,Victoriaprogramming help,C++programming help,Javaprogramming help,Pythonprogramming help,Operations Researchprogramming help,Linear Programmingprogramming help,CSC 445assignment help,CSC 545assignment help,Victoriaassignment help,C++assignment help,Javaassignment help,Pythonassignment help,Operations Researchassignment help,Linear Programmingassignment help,CSC 445solution,CSC 545solution,Victoriasolution,C++solution,Javasolution,Pythonsolution,Operations Researchsolution,Linear Programmingsolution,