-
Notifications
You must be signed in to change notification settings - Fork 294
Location factor #1642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Lingyan90
wants to merge
7
commits into
main
Choose a base branch
from
location_factor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Location factor #1642
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
bb5558c
added location factor data bank and imported into costing_base.py
Lingyan90 8ecd844
Merge branch 'main' into location_factor
Lingyan90 818a04a
added location factor test
Lingyan90 9d733c1
sslw add location factor
Lingyan90 7698091
Update SSLW.py
Lingyan90 3957921
Update costing_base.py
Lingyan90 72a971f
Merge branch 'main' into location_factor
ksbeattie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -19,10 +19,14 @@ | |||||
| # This plays with some private attributes - most are necessary | ||||||
| # pylint: disable=protected-access | ||||||
|
|
||||||
| import json | ||||||
| import os | ||||||
|
|
||||||
| from functools import partial | ||||||
|
|
||||||
| import pyomo.environ as pyo | ||||||
| from pyomo.common.config import ConfigBlock, ConfigValue | ||||||
| from pyomo.common.fileutils import this_file_dir | ||||||
| from pyomo.util.calc_var_value import calculate_variable_from_constraint | ||||||
| from pyomo.contrib.fbbt.fbbt import compute_bounds_on_expr | ||||||
|
|
||||||
|
|
@@ -98,6 +102,41 @@ def register_idaes_currency_units(): | |||||
| ) | ||||||
|
|
||||||
|
|
||||||
| def load_location_factor(): | ||||||
| """ | ||||||
| Estimate the cost of constructing the same plant in different global locations using location factors. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| This method uses a location (or investment site) factor to adjust the total permanent investment (TPI) | ||||||
| based on regional differences in labor costs, workforce efficiency, local regulations and customs, | ||||||
| union status, and other local economic conditions. | ||||||
|
|
||||||
| Reference: | ||||||
| Seider, Warren D., et al. *Product and Process Design Principles: Synthesis, Analysis, and Evaluation.* | ||||||
| John Wiley & Sons, 2016. | ||||||
|
|
||||||
| The conversion equation is given by: | ||||||
|
|
||||||
| .. math:: | ||||||
| C_{TPI, corrected} = F_{ISF} \times C_{TPI} | ||||||
|
|
||||||
| where: | ||||||
| - :math:`C` represents cost, | ||||||
| - :math:`F` represents a factor, | ||||||
| - :math:`TPI` is the total plant investment, and | ||||||
| - :math:`ISF` is the investment site factor (i.e., location factor). | ||||||
|
|
||||||
| Location factors for 139 countries are sourced from Compass International (2017): | ||||||
| https://www.compassinternational.net/wp-content/uploads/2017/01/Worldwide-Industrial.pdf | ||||||
|
|
||||||
| Note: For some countries, multiple city-specific location factors are provided. | ||||||
| The benchmark location is Washington, D.C., USA. | ||||||
| """ | ||||||
| directory = this_file_dir() | ||||||
| with open(os.path.join(directory, "location_factors.json"), "r") as file: | ||||||
| location_factors = json.load(file) | ||||||
| return location_factors | ||||||
|
|
||||||
|
|
||||||
| class DefaultCostingComponents(StrEnum): | ||||||
| """ | ||||||
| Costing components Enum | ||||||
|
|
@@ -169,6 +208,9 @@ def build(self): | |||||
| self.base_currency = None | ||||||
| self.base_period = pyo.units.year | ||||||
|
|
||||||
| # Set the location factor | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| self.location_factor = ("United States", "Washington DC") | ||||||
|
|
||||||
| # Register unit mapping | ||||||
| self._costing_methods_map = {} | ||||||
| self._build_costing_methods_map() | ||||||
|
|
||||||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.