Questions
Step 1: Identify and Solve a Typical Problem There are a number of typical models in...

Step 1: Identify and Solve a Typical Problem
There are a number of typical models in the Operations Research field which can be applied to a wide range of supply chain problems. Select one of the following typical models:

• Travelling Salesperson Problem (TSP)
• Multiple Traveling Salesman Problem (mTSP)
• Knapsack Problem
• Vehicle Routing Problems (VRP)
• Job Shop Scheduling
• Parallel Machine Scheduling
• Christmas lunch problem
• Newsvendor problem
• Pickup and delivery
• Travelling thief problem
• Eight queens problem
• Minimum Spanning Tree
• Hamiltonian path problem

1.1. Background:
• Provide a detailed explanation of the selected problem.

1.2. Model
• Provide typical mathematical model of the selected problem and clearly explain different aspects of the model (e.g. decision variable, objective function, constraints, etc.)

1.3. Solving an Example
• Develop a mathematical model for a workable and reasonable size of the problem.
– For many typical problems, when size of the problem increases, it becomes NP-Hard. In other words, your computer will not be able to solve it mathematically. Therefore, ‘workable and reasonable size’ here means that size of the selected problem should not be too small or too large.
• Solve the problem in Excel and transfer your solution to Word. It is required that details and steps of getting the solution are provided in the Word document.
• Interpret the findings and discuss.


Step 2: LR on Application of Selected Typical Model in Design and Analysis of Supply Chain
• Identify at least 5 peer reviewed articles in which your selected typical problem has been employed to address knowledge gaps in supply chain field.
– At least one of the selected articles should be published after 2010.
• Write a comprehensive literature review on the application of “your selected” typical model in design and analysis of supply chain and address the following (but not limited to) points:
– What type of problems in supply chain can be addressed by the selected typical problem?
– Compare similarities and differences of selected articles.
– Discuss the suitability of using the selected typical model in design/analysis of various supply chains.
– What are the limitations of your selected typical problem?
– Undertaking any additional critical and/or content analysis on the application of selected typical problem in design and analysis of supply chain is highly recommended.


Step 3: Summary of Findings
• A summary of findings regarding the strengths and weaknesses of the selected typical problem in design and analysis of supply chain should be summarised in this section.
Note:
• From each article something unique should be explained in the report. • Word limit: 2500 ± 500 words

In: Advanced Math

Required information [The following information applies to the questions displayed below.] NOTE: Throughout this lab, every...

Required information

[The following information applies to the questions displayed below.]

NOTE: Throughout this lab, every time a screenshot is requested, use your computer's screenshot tool, and paste each screenshot to the same Word document. Label each screenshot in accordance to what is noted in the lab. This document with all of the screenshots included should be uploaded through Connect as a Word or PDF document when you have reached the final step of the lab.

In this lab, you will:

Required:

1. Calculate the monthly payment for a 15-year and a 6-year mortgage loan.

2. Calculate the amount of interest that you’d pay for a 15-year mortgage loan and a 6-year mortgage loan.

Ask the Question: How much interest do you pay over the life of a 15-year and a 6-year mortgage?


Master the Data: There is no data file for this lab. We will make the needed calculations and input the data as we go.

To compute the mortgage payments, we’ll need to know a few things:

  1. The size of the mortgage loan
  2. The interest rate
  3. The length of the loan (number of months)

Let’s suppose you would like to buy a home for $250,000. But like most U.S. citizens, you don’t have enough cash on hand to pay for the full house. But we’re in luck! Signature Bank has agreed to offer you a 30-year mortgage loan, but requires that you pay 20 percent down ($50,000 = 20% of $250,000) to qualify for their mortgage loan of $200,000 in this way:

$250,000 Cost of home
50,000 Required 20% down payment ($50,000 = 20% of $250,000) (The
cash you need to have available to pay when closing on the home)
$200,000 Amount of the bank loan

Software needed

  • Excel
  • Screen capture tool (Windows: Snipping Tool; Mac: Cmd+Shift+4)

Perform the Analysis: Refer to Lab 1-3 Alternative in the text for instructions and Lab 1-3 steps for each of the lab parts.

Share the Story: Accountants need to know how much of each monthly mortgage (or bond) payment goes toward interest.

Part 1: Upload Your Files

Part 2: Assessment

Upload the Word or PDF document containing your Lab screenshots using the button below. (Zip "Lab 1-3 Alt Submission 1.jpg" & "Lab 1-3 Alt Submission 2.jpg" files and upload the same.)

  1. Take a screenshot of the top 20 lines of your 180-month amortization schedule and label it “Lab 1-3 Alt Submission 1.jpg”.
  2. Take a screenshot of the top 20 lines of your 72-month amortization schedule and label it “Lab 1-3 Alt Submission 2.jpg”.

In: Finance

Proc,Forks,Exec Examine the code given and do changes as mentioned in the steps below: #include "HALmod.h"...

Proc,Forks,Exec

Examine the code given and do changes as mentioned in the steps below:

#include "HALmod.h"

int GetCommand (string tokens [])
{
string commandLine;
bool commandEntered;
int tokenCount;

do
{
cout << "HALshell> ";
while (1)
{
getline (cin, commandLine);
commandEntered = CheckForCommand ();
if (commandEntered)
{
break;
}
}
} while (commandLine.length () == 0);

tokenCount = TokenizeCommandLine (tokens, commandLine);

return tokenCount;
}

int TokenizeCommandLine (string tokens [], string commandLine)
{
char *token [MAX_COMMAND_LINE_ARGUMENTS];
char *workCommandLine = new char [commandLine.length () + 1];
int i;
int tokenCount;

for (i = 0; i < MAX_COMMAND_LINE_ARGUMENTS; i ++)
{
tokens [i] = "";
}
strcpy (workCommandLine, commandLine.c_str ());
i = 0;
if ((token [i] = strtok (workCommandLine, " ")) != NULL)
{
i ++;
while ((token [i] = strtok (NULL, " ")) != NULL)
{
i ++;
}
}
tokenCount = i;

for (i = 0; i < tokenCount; i ++)
{
tokens [i] = token [i];
}

delete [] workCommandLine;

return tokenCount;
}


//Do not touch the below function
bool CheckForCommand ()
{
if (cullProcess)
{
cullProcess = 0;
cin.clear ();
cout << "\b\b \b\b";
return false;
}

return true;
}


int ProcessCommand (string tokens [], int tokenCount)
{
if (tokens [0] == "shutdown" || tokens [0] == "restart" || tokens [0] == "lo")
{
if (tokenCount > 1)
{
cout << "HALshell: " << tokens [0] << " does not require any arguments" << endl;
return 1;
}
cout << endl;
cout << "HALshell: terminating ..." << endl;

return 0;
  
}
else
return 1;
}
char ** ConvertToC (string tokens [], int tokenCount)
{
char ** words;
words = (char **) malloc (sizeof (char*) * tokenCount);

for (int i=0; i<tokenCount; i++)
{
words[i]=strdup(tokens[i].c_str());
}
return words;
}



Step 1- Modify the "ConvertToC" function ( last function) as mentioned:

1. allocate an extra "word" for NULL (Hint: tokenCount+1)
2. store the value of NULL into the extra "word"

Step 2- Modify the "ProcessCommand" function ( second last function) as mentioned:

You will be emulating a shell. First, the shell checks for specific commands ("shutdown", "lo", etc). If it does not recognize those commands then, a fork occurs and the child will execute the command as typed.

The algorithm to implement is as follows (Hint: add code inside the else):

1. fork to create a child and parent
2. the child will do the following:
Call the ConverToC function and capture the return into a char** variable
Call execvp sending it two arguments: the first element (or word) of the char** variable, and the entire array
Print an error message
exit
3. the parent will do the following:
wait for the child
return 1
4. don't forget to handle the error case of the fork


//Dont try to run the program, just do the following steps.

In: Computer Science

10. Grammar and Mechanics - Review In order to succeed in your job search, you need...

10. Grammar and Mechanics - Review

In order to succeed in your job search, you need to present polished résumés and cover messages that use correct grammar, spelling, and punctuation. Practice correct use of grammar and mechanics with the following exercises.

In the following sentences, select the correct word to fill in the blank.

Significant time and effort (was or were?) spent on perfecting her cover letter.

Everybody (are or is?) asked to make a scannable résumé to submit to the human resources manager.

The members of the Professional Committee (is or are?) disagreeing on how to allocate funds.

Each of the female candidates described (her or their?) experience in a well-written cover message.

1. Choose the sentence that is punctuated correctly.

A. Traditional job-search techniques, such as those described in your job handout, continue to be critical in landing jobs.

B. Traditional job-search techniques, such as those described in your job handout continue to be critical in landing jobs.

C: Traditional job-search techniques such as those described in your job handout continue to be critical in landing jobs.

2. Choose the sentence that is punctuated correctly.

A. When customizing your résumé, make sure to include keywords that describe your skills, traits tasks and job titles associated with your targeted job.

B. When customizing your résumé, make sure to include keywords that describe your skills traits tasks and job titles associated with your targeted job.

C. When customizing your résumé, make sure to include keywords that describe your skills, traits, tasks, and job titles associated with your targeted job.

3. Choose the sentence that is punctuated correctly.

A. It is always important to stress reader benefits in the body of your cover letter, describe your strong points in relation to the needs of the employer.

B. It is always important to stress reader benefits in the body of your cover letter describe your strong points in relation to the needs of the employer.

C. It is always important to stress reader benefits in the body of your cover letter; describe your strong points in relation to the needs of the employer.

In the following sentences, select the correct word to fill in the blank.

Make sure to selector (emphasize or empasize) reader benefits when writing a résumé or cover letter.

Make sure to highlight any professional (development/ developmant?) you have obtained over your career.

4. Choose the sentence that uses the correct word.

A. I would like to express my interest in this position formally.

B. I would like to express my interest in this position formerly.

In: Operations Management

Question Objective: The purpose of this lab is for you to become familiar with Python’s built-in...

Question

Objective:

The purpose of this lab is for you to become familiar with Python’s built-in text container -- class str -- and lists containing multiple strings. One of the advantages of the str class is that, to the programmer, strings in your code may be treated in a manner that is similar to how numbers are treated. Just like ints, floats, a string object (i.e., variable) may be initialized with a literal value or the contents of another string object. String objects may also be added together (concatenation) and multiplied by an integer (replication). Strings may also be compared for “equality” and arranged into some order (e.g., alphabetical order, ordering by number of characters, etc.). Finally, strings may be placed in containers which can then be passed as arguments to functions for more complex manipulations.

Specifications:

Write an interactive Python program composed of several functions that manipulate strings in different ways. Your main() function prompts the user for a series of strings which are placed into a list container. The user should be able to input as many strings as they choose (i.e., a sentinel-controlled loop). Your main function will then pass this list of strings to a variety of functions for manipulation (see below).

The main logic of your program must be included within a loop that repeats until the user decides he/she does not want to continue processing lists of strings. The pseudo code for the body of your main() function might be something like this:

# Create the main function

def main():

# declare any necessary variable(s)

# // Loop: while the user wants to continue processing more lists of words

#

# // Loop: while the user want to enter more words (minimum of 8)

# // Prompt for, input and store a word (string) into a list # // Pass the list of words to following functions, and perform the manipulations

# // to produce and return a new, modified, copy of the list.

# // NOTE: None of the following functions can change the list parameter it

# // receives – the manipulated items must be returned as a new list.

#

# // SortByIncreasingLength(…)

# // SortByDecreasingLength(…)

# // SortByTheMostVowels(…)

# // SortByTheLeastVowels(…)

# // CapitalizeEveryOtherCharacter(…)

# // ReverseWordOrdering(…)

# // FoldWordsOnMiddleOfList(…)

# // Display the contents of the modified lists of words

#

# // Ask if the user wants to process another list of words

Deliverable(s):

Your deliverable should be a Word document with screenshots showing the sample code you have created, and discuss the issues that you had for this project related to AWS and/or Python IDE and how you solved them.

Submit the program you develop including captured output. Also turn in screen captures from running your program inputting, as a minimum, three (3) sets word lists (no fewer than 8 words per list).

In: Computer Science

In Python: how can I fix the IsADirectoryError: [Errno 21] Is a directory: ??? this is...

In Python: how can I fix the IsADirectoryError: [Errno 21] Is a directory: ???

this is my code:

#importing sqlite and pandas

import sqlite3

import pandas as pd



#goal

print("Welcome! The goal of this assigment is to create a database to find meanings and synonyms for given phrases.")

#Connecting database

conn = sqlite3.connect("keilavaldez.db")

#Creating cursor to remove existing specified tables

cur = conn.cursor()

#creating tables

cur.execute("CREATE TABLE Synsets([SynsetID] INTEGER,[Definition] text)")

cur.execute("CREATE TABLE Phrases([SynsetID] INTEGER,[phrase] text)")

conn.commit()

#opening and reading table named "synsets"

with open("//Users//keilavaldez//Desktop//assigment 10", 'r') as f:

for line in f:

data = line.split('\t')

cur.execute('INSERT INTO synsets (SynsetID, Definition) VALUES (?, ?)', (data[0], data[1].strip()))

#opening and reading table named "phrases"

with open("//Users//keilavaldez//Desktop//assigment 10", 'r') as f:

for line in f:

data = line.split('\t')

cur.execute('INSERT INTO phrases (SynsetID, phrase) VALUES (?, ?)', (data[0], data[1].strip()))


#Asking the user to enter a phrase

#checking if the phrase its in the database

#checking phrases even if they are lower

phrase = str(input("Please enter a phrase: "))

query = 'SELECT * FROM phrases WHERE phrase=' + "'"+ phrase.lower() + "'"

df = pd.read_sql_query(query, conn)

#if phrase is not in database, asking the user to try again

if df.empty:

print("Phrase/word not found. Please try again!")

#returning output if output is in database

#printing how many meanings the phrase has

#printing synonyms, printing unique synonyms

#prinit

else:

result_query = 'SELECT DISTINCT s.SynsetID,Definition FROM phrases p INNER JOIN synsets s ON s.SynsetID=p.SynsetID WHERE phrase=' + "'"+ word.lower() + "'"

result_df = pd.read_sql_query(result_query, conn)

lst = result_df['SynsetID'].values.tolist()

query = 'SELECT DISTINCT phrase,SynsetID FROM phrases WHERE SynsetID IN (SELECT DISTINCT s.SynsetID FROM phrases p INNER JOIN synsets s ON s.SynsetID=p.SynsetID WHERE phrase=' + "'"+ word.lower() + "') AND phrase<>"+ "'"+ word.lower() + "'"

df = pd.read_sql_query(query, conn)

syn = df['phrase'].values.tolist()

print("There are "+ str(len(lst)) +" meanings and "+ str(len(syn)) +" unique synonyms")

j=1

#priniting along with the synset ID

#printing all synonyms

for i in lst:

print("The meaning of this word: ",j)

print(result_df[result_df['SynsetID']==i]["The definition of this word: "].values[0])

print("Synset ID: ")

print(i)

print("Synonyms:")

words = df[df['SynsetID']==i]['phrase'].values.tolist()

for w in words:

if w!=phrase.lower():

print(w)

j=j+1

In: Computer Science

Python please A string is one of most powerful data types in programming. A string object...

Python please

A string is one of most powerful data types in programming. A string object is a sequence of characters and because it is a sequence, it is indexable, using index numbers starting with 0. Similar to a list object, a string object allows for the use of negative index with -1 representing the index of the last character in the sequence. Accessing a string object with an invalid index will result in IndexError exception.

In Python a string literal is defined to be a sequence of characters enclosed in single, double or triple quotes.

To define a string object or variable, we use one of the following:

  1. strObj = string_literal
  2. strObj = str(any object)
  3. strObj = str() or strObj = ‘’, strObj = “”, strObj = ‘’’’’’ , an empty string

A string object in immutable, meaning, it cannot be changed once it is defined.

The concatenation operator (+) is used to add two or more string objects (strObj1 + strObj2)

The repetition operator (*) is used to repeat the string object (n*strObj or strObj*n, where n is an integer)

The in and not in operators are used to test if one string object is contained in another string object.

Slice a string object using strObj[start:end], start is the index of the starting character and end-1 is the index last character.

The split method creates a list of the split string object.

lstObj = strObj.split(split-character)

space is the default split-character.

The strip method removes the leading and trailing character, the default is space.

strObj.strip(strip-character)

Variations: rstrip, lstrip (left and right strip methods to remove leading and trailing character, respectively)

Other commonly used string methods are

strObj.lower() changes all characters to lowercase

strObj.upper() changes all characters to uppercase

strObj.islower() tests if all characters are lowercase

strObj.isupper() tests if all characters are uppercase

strObj.replace(old, new) replaces old substring with new substring

strObj.find(substring) returns the lowest index of the substring if it is found in strObj

Activity

  1. Write a program to reverse a string object
  2. Write a program that will check if a string object is a palindrome, that is a word, phrase, or sequence that reads the same backward as forward, e.g., madam or nurses run. Note: reverse(string) = string.
  3. Define a string object that will hold “department computer science:fayetteville state university:fayetteville, north carolina”
  4. Split the string object in (3) using the character “:” and assign to a list object
  5. Write a program that capitalize the first letter of every word in string object in (3)
  6. Write a program that insert the string objects “of” and “28301” to the new string object in (5)
  7. Write a program that will display the word, character, space counts in the file storytelling.txt.(The file is on Canvas in the Worksheets folder).

In: Computer Science

Python please Questions #6 and # 7 please A string is one of most powerful data...

Python please Questions #6 and # 7 please

A string is one of most powerful data types in programming. A string object is a sequence of characters and because it is a sequence, it is indexable, using index numbers starting with 0. Similar to a list object, a string object allows for the use of negative index with -1 representing the index of the last character in the sequence. Accessing a string object with an invalid index will result in IndexError exception.

In Python a string literal is defined to be a sequence of characters enclosed in single, double or triple quotes.

To define a string object or variable, we use one of the following:

  1. strObj = string_literal
  2. strObj = str(any object)
  3. strObj = str() or strObj = ‘’, strObj = “”, strObj = ‘’’’’’ , an empty string

A string object in immutable, meaning, it cannot be changed once it is defined.

The concatenation operator (+) is used to add two or more string objects (strObj1 + strObj2)

The repetition operator (*) is used to repeat the string object (n*strObj or strObj*n, where n is an integer)

The in and not in operators are used to test if one string object is contained in another string object.

Slice a string object using strObj[start:end], start is the index of the starting character and end-1 is the index last character.

The split method creates a list of the split string object.

lstObj = strObj.split(split-character)

space is the default split-character.

The strip method removes the leading and trailing character, the default is space.

strObj.strip(strip-character)

Variations: rstrip, lstrip (left and right strip methods to remove leading and trailing character, respectively)

Other commonly used string methods are

strObj.lower() changes all characters to lowercase

strObj.upper() changes all characters to uppercase

strObj.islower() tests if all characters are lowercase

strObj.isupper() tests if all characters are uppercase

strObj.replace(old, new) replaces old substring with new substring

strObj.find(substring) returns the lowest index of the substring if it is found in strObj

Activity

  1. Write a program to reverse a string object
  2. Write a program that will check if a string object is a palindrome, that is a word, phrase, or sequence that reads the same backward as forward, e.g., madam or nurses run. Note: reverse(string) = string.
  3. Define a string object that will hold “department computer science:fayetteville state university:fayetteville, north carolina”
  4. Split the string object in (3) using the character “:” and assign to a list object
  5. Write a program that capitalize the first letter of every word in string object in (3)
  6. Write a program that insert the string objects “of” and “28301” to the new string object in (5)
  7. Write a program that will display the word, character, space counts in the file storytelling.txt.(The file is on Canvas in the Worksheets folder).

In: Computer Science

Python please Questions #3, #4 and # 5 please A string is one of most powerful...

Python please Questions #3, #4 and # 5 please

A string is one of most powerful data types in programming. A string object is a sequence of characters and because it is a sequence, it is indexable, using index numbers starting with 0. Similar to a list object, a string object allows for the use of negative index with -1 representing the index of the last character in the sequence. Accessing a string object with an invalid index will result in IndexError exception.

In Python a string literal is defined to be a sequence of characters enclosed in single, double or triple quotes.

To define a string object or variable, we use one of the following:

  1. strObj = string_literal
  2. strObj = str(any object)
  3. strObj = str() or strObj = ‘’, strObj = “”, strObj = ‘’’’’’ , an empty string

A string object in immutable, meaning, it cannot be changed once it is defined.

The concatenation operator (+) is used to add two or more string objects (strObj1 + strObj2)

The repetition operator (*) is used to repeat the string object (n*strObj or strObj*n, where n is an integer)

The in and not in operators are used to test if one string object is contained in another string object.

Slice a string object using strObj[start:end], start is the index of the starting character and end-1 is the index last character.

The split method creates a list of the split string object.

lstObj = strObj.split(split-character)

space is the default split-character.

The strip method removes the leading and trailing character, the default is space.

strObj.strip(strip-character)

Variations: rstrip, lstrip (left and right strip methods to remove leading and trailing character, respectively)

Other commonly used string methods are

strObj.lower() changes all characters to lowercase

strObj.upper() changes all characters to uppercase

strObj.islower() tests if all characters are lowercase

strObj.isupper() tests if all characters are uppercase

strObj.replace(old, new) replaces old substring with new substring

strObj.find(substring) returns the lowest index of the substring if it is found in strObj

Activity

  1. Write a program to reverse a string object
  2. Write a program that will check if a string object is a palindrome, that is a word, phrase, or sequence that reads the same backward as forward, e.g., madam or nurses run. Note: reverse(string) = string.
  3. Define a string object that will hold “department computer science:fayetteville state university:fayetteville, north carolina”
  4. Split the string object in (3) using the character “:” and assign to a list object
  5. Write a program that capitalize the first letter of every word in string object in (3)
  6. Write a program that insert the string objects “of” and “28301” to the new string object in (5)
  7. Write a program that will display the word, character, space counts in the file storytelling.txt.(The file is on Canvas in the Worksheets folder).

In: Computer Science

Question Objective: The purpose of this lab is for you to become familiar with Python’s built-in...

Question

Objective:

The purpose of this lab is for you to become familiar with Python’s built-in text container -- class str -- and lists containing multiple strings. One of the advantages of the str class is that, to the programmer, strings in your code may be treated in a manner that is similar to how numbers are treated. Just like ints, floats, a string object (i.e., variable) may be initialized with a literal value or the contents of another string object. String objects may also be added together (concatenation) and multiplied by an integer (replication). Strings may also be compared for “equality” and arranged into some order (e.g., alphabetical order, ordering by number of characters, etc.). Finally, strings may be placed in containers which can then be passed as arguments to functions for more complex manipulations.

Specifications:

Write an interactive Python program composed of several functions that manipulate strings in different ways. Your main() function prompts the user for a series of strings which are placed into a list container. The user should be able to input as many strings as they choose (i.e., a sentinel-controlled loop). Your main function will then pass this list of strings to a variety of functions for manipulation (see below).

The main logic of your program must be included within a loop that repeats until the user decides he/she does not want to continue processing lists of strings. The pseudo code for the body of your main() function might be something like this:

# Create the main function

def main():

# declare any necessary variable(s)

# // Loop: while the user wants to continue processing more lists of words

#

# // Loop: while the user want to enter more words (minimum of 8)

# // Prompt for, input and store a word (string) into a list # // Pass the list of words to following functions, and perform the manipulations

# // to produce and return a new, modified, copy of the list.

# // NOTE: None of the following functions can change the list parameter it

# // receives – the manipulated items must be returned as a new list.

#

# // SortByIncreasingLength(…)

# // SortByDecreasingLength(…)

# // SortByTheMostVowels(…)

# // SortByTheLeastVowels(…)

# // CapitalizeEveryOtherCharacter(…)

# // ReverseWordOrdering(…)

# // FoldWordsOnMiddleOfList(…)

# // Display the contents of the modified lists of words

#

# // Ask if the user wants to process another list of words

Deliverable(s):

Your deliverable should be a Word document with screenshots showing the sample code you have created, and discuss the issues that you had for this project related to AWS and/or Python IDE and how you solved them.

Submit the program you develop including captured output. Also turn in screen captures from running your program inputting, as a minimum, three (3) sets word lists (no fewer than 8 words per list).

In: Computer Science