Example: Use algorithmic values in an operations management question
Updated 28 Aug 2023
This example guides you through the steps to create a question that calculates the number of laborers employed by a plant.
To begin, design your question and its algorithms on paper. Start with the static question and then convert the values to algorithmic.
Static question:
This year, a company will produce 57,600 hot water heaters at its plant in order to meet expected global demand. To accomplish this, each laborer at the plant will work 160 hours per month. If the labor productivity at the plant is 0.25 hot water heaters per labor hour, how many laborers are employed at the plant?
The solution is 57,600/(0.25*160*12) = 120 laborers.
Algorithmic question:
This year, a company will produce ~production hot water heaters at its plant in order to meet expected global demand. To accomplish this, each laborer at the plant will work ~hours hours per month. If the labor productivity at the plant is ~productivity hot water heaters per labor hour, how many laborers are employed at the plant?
The solution is ~production/(~productivity*~hours*12) = ~qlabor laborers.
The algorithmic values are defined in the following table.
Value | Type | Constraints | Notes |
---|---|---|---|
hours | Integer | =(160,200) | Hours per month |
production | Integer | = (57,600, 60,000) | Annual production |
productivity | Decimal | = (0.15, 0.25) | Productivity |
labor | Integer | =~production/(~productivity*~hours*12) | Laborers employed |
Now that you have designed the question and the algorithms, you are ready to create your question and enter the algorithms.
- Open the Custom Question Builder.
- In the Create Custom Question wizard, select Start with an empty template and click Next.
- In the Choose Layout window, select Full Screen, and then click Next to open the Custom Question Builder with a blank problem.
- Click Show Algorithmic Values List to open the Algorithmic Values List window.
You use the Algorithmic Values List window with the Edit Algorithmic Values window to create the algorithmic values that you have defined. Use the table you created in the first section to help you enter the values.
To enter your algorithmic values:
- Click Add to bring up the Edit Algorithmic Values window, where you can enter your algorithmic values.
- Using the table of values, enter the value ~hours and its constraints:
- In the Algorithmic Value Name box, replace the default name
V1
withhours
. - In the Select Type of Algorithmic Value section, select Integer.
- In the List Values or Set Up Constraints section, select = from the Relational Operator dropdown list for the first constraint.
- In the Constraint Value box, enter 160.
- For the second constraint, select = from the Relational Operator dropdown list and enter
200
as the constraint value. - Click the Options tab and in the Authoring Notes box, enter the note:
Hours per month
. - Click Save to enter your value in the Algorithmic Values List. Your entry looks like this:
- In the Algorithmic Value Name box, replace the default name
- Because ~hours and ~production are defined similarly , you can duplicate ~hours and edit the algorithmic values to define ~production:
- Make sure your cursor is in the row for the algorithmic value ~hours and then click Duplicate.
- Click Edit at the beginning of the row of the new algorithmic value to bring up the Edit Algorithmic Value window.
- In the Algorithmic Value Name box, replace the default name
V1
withproduction
. - In the List Values or Set Up Constraints section, replace the value
160
with57600
and the value200
with60000
in the Constraint Value column. Do not enter commas. - Select the Use commas or spaces between periods box so the amount displays in the correct format (for example, 56,000).
- Click the Options tab, delete the notes already there, and enter
Annual production
in the Authoring Notes box. - Click Save to enter your value in the Algorithmic Values List. Your entries look like this:
The entries in the Value column of your version of the question might vary from this example because they are algorithmically generated.
- Click Add and enter the value ~productivity and its constraints:
- In the Algorithmic Value Name box, replace the default name
V1
withproductivity
. - In the Select Type of Algorithmic Value section, select Decimal.
- In the List Values or Set Up Constraints section, select = from the Relational Operator dropdown list for the first constraint.
- In the Constraint Value box, enter
0.15
. - For the second constraint, select = from the Relational Operator dropdown list, and enter
0.25
as the constraint value. - Click the up arrow after Number of Decimal places to show two decimal places.
- Click the Options tab and in the Authoring Notes box, enter the note:
Productivity
. - Click Save.
- In the Algorithmic Value Name box, replace the default name
- Click Add to enter the value ~qlabor and its constraints:
- In the Algorithmic Value Name box, replace the default name
V1
withqlabor
. - In the Select Type of Algorithmic Value section, select Integer.
- In the List Values or Set Up Constraints section, select = from the Relational Operator dropdown list for the first constraint.
- In the Constraint Value box, enter the formula:
~production/(~productivity*~hours*12)
. Be sure to precede algorithmic value names with a ~ (tilde). - Click the Options tab and in the Authoring Notes box, enter the note:
Laborers employed
. - Click Save to enter your value in the Algorithmic Values List.
When you finish, your Algorithmic Values List look like this:
The entries in the Value column of your version of the question might vary from this example because they are algorithmically generated.
- In the Algorithmic Value Name box, replace the default name
- Click Close in the Algorithmic Values List window to return to your question.
First enter your problem statement and then the answer.
Entering the problem statement
To enter the problem statement:
- In the Problem Statement and Interaction Area, remove the default text and type the problem statement:
This year, a company will produce
- Add a space and then click the Algorithmic Values button in the left menu to view a list of algorithmic variables and their current values.
- Select the entry for production.
The current value of production is inserted in the problem statement highlighted in lavender to show that it's algorithmic. If you click Show Algorithmic Value Names in the Algorithmic Values toolbar, the algorithmic value name now appears instead of the current value. You can toggle between the value and name by clicking this button.
- Add a space after the value you just inserted and continue entering the problem statement:
hot water heaters at its plant in order to meet expected global demand. To accomplish this, each laborer at the plant will work
- Add a space, click Algorithmic Values, and select the entry for hours to insert that value into your question.
- Add a space after the value you just inserted and continue entering the problem statement:
hours per month. If the labor productivity at the plant is
- Add a space, click Algorithmic Values, and select the entry for productivity to insert that value in your question.
- Add a space after the productivity value and finish entering your problem statement:
hot water heaters per labor hour, how many laborers are employed at the plant?
Entering the student interaction
To enter the student interaction (answer):
- On a new line, enter the answer text:
The number of laborers employed by the plant =
- With your cursor at the end of the line, add a space and then click Short Answer under Student Interactions in the left menu. This option opens the Edit Answer Definition window, where you define your answer.
- In the Edit Definition window, click on Step 1.
- Select Specify a subset of equivalent answers to accept and then select Accept integer or decimal equivalents only. Click Next to go to Step 2.
- On the Define Answers page, click the first row under Value box in the table. When your cursor is visible in the row, right-click and select Editing Options from the menu.
- Select Algorithmic Values from the menu.
- Select ~qlabor from the list of algorithmic values to insert it in the Value box. Then click Next to go to Step 3.
- Under Numeric Comparison, enter
1
in the Tolerance +/- box. - Under Correct Answer Format, specify
0
for the Number of decimal places. Leave all other options as the default. Click Next to go to Step 4. - On the Edit Feedback page, enter this message in the Incorrect Feedback box:
Productivity = (Total output/Total input), where Total input = Number of workers*Hours per worker.
- Click Save to close the Edit Answer Definition window.
- Add a space and then the following instructions in parentheses after the answer box:
Enter your response rounded to the nearest whole number.
Your question looks something like this:
- Click Regenerate Values several times to verify that your algorithms are working correctly.
- Click Preview Exercise and enter an incorrect answer.
- Check your answer to see the feedback message.
- Regenerate the question several times to make sure your algorithms work as intended.
You can regenerate the question by clicking Similar Exercise on the bottom right of your preview window.
- Close the Preview window.
- When you are sure that your question is working correctly, click Save.
- Give the question a name and select Algorithmic as the format.
- Optionally add a textbook association and keywords.
- Click OK to save your question.
After you save your question, you can add it to an assignment.