SlideShare ist ein Scribd-Unternehmen logo
1 von 4
Downloaden Sie, um offline zu lesen
Constructing the IMPL Flowsheet Using Dia with Python
(IMPL-FlowsheetDiaPy)
i n d u s t r IAL g o r i t h m s LLC. (IAL)
www.industrialgorithms.com
May 2014
Introduction
Presented in this document is a short description on how to construct a flowsheet or
superstructure using the open-source Dia as the drawing tool (similar to Microsoft Visio) and the
open-source Python as the programming language to write out the construction data of the
flowsheet into a UPS file.
The benefit of using a drawing package such as Dia is that it is a graphical or visual
representation of the construction and connectivity data of the industrial optimization problem
(IOP) with respect to its flow network, graph or diagram i.e., nodes and directed arcs. The
alternative is to configure or populate the structures, shapes or objects in a spreadsheet or data
file which can be problematic and difficult to interpret i.e., “a picture is worth a thousand words”.
Flowsheet and UOPSS
A flowsheet is a common term used in chemical engineering to describe the nodes and directed
arcs of a graph, network or superstructure and is widely used in process design simulators. The
IMPL flowsheet is similar but in order to more comprehensively model or construct flowsheets
suitable for advanced planning and scheduling (APS), advanced production/process control
(APC) and advanced production/process monitoring (APM) applications for example, we use the
Unit-Operation-Port-State Superstructure (UOPSS) found in Kelly 2004, 2005, Zyngier and
Kelly, 2009, 2012 and Kelly and Zyngier 2015.
Figure 1. UOPSS Sheet and Shapes in Dia.
Figure 1 provides a list of the various UOPSS shapes available in Dia and these can be
arranged in any arbitrary topological order where the unit-operation shapes can only be
connected to in- and out-port-state shapes and out-port-states (upstream) can only be
connected to in-port-states (downstream) as further described below.
Dia and UOPSS
As shown above in Figure 1, Dia provides the ability to create customized drawing objects or
shapes and to collect them into a sheet similar to a stencil in Microsoft Visio. It provides the
capability to add or configure custom properties or extra attributes assigned to each object and
IMPL uses this to configure the various UOPSS names and types directly within Dia.
Figure 2 shows a simple flowsheet with an inbound “Supply” perimeter and an outbound
“Demand” perimeter (unit) for a “Feed” and a “Product” (operation) respectively. There are two
internal streams from the unit-operations to/from the port-states and one external stream from
the out-port-state “out” to the in-port-state “in”. This is a simple supply-demand chain flowsheet
given that there is no production or transportation value-add i.e., no pools, processes, pipelines,
etc.
Figure 2. Simple Supply-Demand Chain Flowsheet with no Value-Add.
There are certain construction rules or protocols that are now described using this simple
flowsheet as illustration.
Rule #1 - units and ports must have non-blank names. Operation and state names can be left
blank but unit and port names must be populated else a red “NULL” will appear as shown in
Figure 3 if we do not configure the name “Supply” for the first perimeter unit. Essentially we are
ensuring that the “physical” network (unit-ports) is completely configured whereas the
“procedural” network (operation-states) can be partially configured. The cross-product or
combination of the two networks forms what we call the “projectional” superstructure.
Figure 3. Rule #1 Violated.
Rule #2 - port-states must be connected to at least one and only one unit-operation. A port-
state must be connected to a unit-operation else a red “NEGLECTED” will appear as shown in
Figure 4 if we do not connect it to one (and only one) unit-operation shape. Connecting the
same port-state pair shape instance to multiple unit-operation shape instances in the Dia
flowsheet is possible i.e., no warning/error assertion will be raised but this should not be done.
Figure 4. Rule #2 Violated.
Rule #3 - out-port-states may only be connected to in-port-states and must be connected at
both ends (head/tail, from/to and source/destination). An out-port-state must be connected to
an in-port-state at both ends else a red “NEGLECTED” will appear as shown in Figure 5. As
mentioned in Rule #2, a port-state must be connected to only one unit-operation but it does not
necessarily need to be connected to an upstream or downstream port-state i.e., the unit-
operation-port-state tuple has an in- or out-degree of zero (0). This is why only the external
stream is highlighted and not also the in-port-state in Figure 5.
Figure 5. Rule #3 Violated.
There are two other rules for the construction of the flowsheet as follows however these rules
are not strictly enforced in Dia although they will be highlighted by IMPL during the interfacing,
interacting, modeling and presolving stages.
Rule #4 - port-state pairs must be unique locally on a unit-operation, and
Rule #5 - unit-operation pairs must be unique globally in a problem.
IALConstructer.py and Python 2.3
The code behind which cycles or loops through all of the Dia objects and extracts the flowsheet
details or UOPSS structures with the custom attributes and writes out the UPS file (Appendix A)
is called IALConstructer.py where its source code is available as part of the IMPL installation
and is provided “as-is” according to the open-source licensing agreements. Unfortunately the
Dia scripting language is coded in Python 2.3 only where later versions of Python can
fortunately co-exist with the earlier Python 2.3 version.
The IALConstructer.py source code also provides three (3) IML aliases: “ALLPARTS” for unit-
operation pairs or duples, “ALLINPORTS” and “ALLOUTPORTS” for unit-operation-port-state
quadruples (internal streams) and “ALLPATHS” for unit-operation-port-state-unit-operation-port-
state octuples (external streams). These aliases are useful to configure the capacity data and
other model and cycle data quickly and easily in the IML file.
References
Kelly, J.D., "Production modeling for multimodal operations", Chemical Engineering Progress,
February, 44, (2004).
Kelly, J.D., "The unit-operation-stock superstructure (UOSS) and the quantity-logic-quality
paradigm (QLQP) for production scheduling in the process industries", In: MISTA 2005
Conference Proceedings, 327, (2005).
Zyngier, D., Kelly, J.D., "Multi-product inventory logistics modeling in the process industries", In:
W. Chaovalitwonse, K.C. Furman and P.M. Pardalos, Eds., Optimization and Logistics
Challenges in the Enterprise", Springer, 61-95, (2009).
Zyngier, D., Kelly, J.D., "UOPSS: a new paradigm for modeling production planning and
scheduling systems", ESCAPE 22, June, (2012).
Kelly, J.D., Zyngier, D., "Unit operation nonlinear modeling for planning and scheduling
applications", K.C. Furman et.al. (eds.), Optimization and Analytics in the Oil & Gas Industries,
Springer Science, (2015).
Industrial Algorithms LLC., “Industrial Modeling & Programming Language (IMPL) Installation
Manual”, IAL-IMPL-IMW-1-0.docx.
Appendix A – SimpleFlowsheet.UPS File
i M P l (c)
Copyright and Property of i n d u s t r I A L g o r i t h m s LLC.
checksum,10
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Unit-Operation-Port-State-Superstructure (UOPSS) *.UPS File.
! (This file is automatically generated from the Python program IALConstructer.py)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
&sUnit,&sOperation,@sType,@sSubtype,@sUse
Demand,Product,perimeter,,
Supply,Feed,perimeter,,
&sUnit,&sOperation,@sType,@sSubtype,@sUse
! Number of UO shapes = 2
&sAlias,&sUnit,&sOperation
ALLPARTS,Demand,Product
ALLPARTS,Supply,Feed
&sAlias,&sUnit,&sOperation
&sUnit,&sOperation,&sPort,&sState,@sType,@sSubtype
Demand,Product,in,,in,
Supply,Feed,out,,out,
&sUnit,&sOperation,&sPort,&sState,@sType,@sSubtype
! Number of UOPS shapes = 2
&sAlias,&sUnit,&sOperation,&sPort,&sState
ALLINPORTS,Demand,Product,in,
ALLOUTPORTS,Supply,Feed,out,
&sAlias,&sUnit,&sOperation,&sPort,&sState
&sUnit,&sOperation,&sPort,&sState,&sUnit,&sOperation,&sPort,&sState
Supply,Feed,out,,Demand,Product,in,
&sUnit,&sOperation,&sPort,&sState,&sUnit,&sOperation,&sPort,&sState
! Number of UOPSPSUO shapes = 1
!&sUnit,&sOperation,&sPort,&sState,&sUnit,&sOperation,&sPort,&sState
Supply,Feed,out,,Demand,Product,in,
!&sUnit,&sOperation,&sPort,&sState,&sUnit,&sOperation,&sPort,&sState
&sAlias,&sUnit,&sOperation,&sPort,&sState,&sUnit,&sOperation,&sPort,&sState
ALLPATHS,Supply,Feed,out,,Demand,Product,in,
&sAlias,&sUnit,&sOperation,&sPort,&sState,&sUnit,&sOperation,&sPort,&sState

Weitere ähnliche Inhalte

Was ist angesagt?

Speeding up queries with semi joins and anti-joins
Speeding up queries with semi joins and anti-joinsSpeeding up queries with semi joins and anti-joins
Speeding up queries with semi joins and anti-joins
Kaing Menglieng
 

Was ist angesagt? (14)

Art of indexing_in_o8i
Art of indexing_in_o8iArt of indexing_in_o8i
Art of indexing_in_o8i
 
Lesson04 学会使用分组函数
Lesson04 学会使用分组函数Lesson04 学会使用分组函数
Lesson04 学会使用分组函数
 
Pl sql-ch1
Pl sql-ch1Pl sql-ch1
Pl sql-ch1
 
The Database Environment Chapter 8
The Database Environment Chapter 8The Database Environment Chapter 8
The Database Environment Chapter 8
 
CIS 336 Focus Dreams/newtonhelp.com
CIS 336 Focus Dreams/newtonhelp.comCIS 336 Focus Dreams/newtonhelp.com
CIS 336 Focus Dreams/newtonhelp.com
 
Ebook8
Ebook8Ebook8
Ebook8
 
CIS 336 Start With a Dream /newtonhelp.com
CIS 336 Start With a Dream /newtonhelp.comCIS 336 Start With a Dream /newtonhelp.com
CIS 336 Start With a Dream /newtonhelp.com
 
ch4
ch4ch4
ch4
 
Speeding up queries with semi joins and anti-joins
Speeding up queries with semi joins and anti-joinsSpeeding up queries with semi joins and anti-joins
Speeding up queries with semi joins and anti-joins
 
Sql interview questions
Sql interview questionsSql interview questions
Sql interview questions
 
Unit1
Unit1Unit1
Unit1
 
1 - Introduction to PL/SQL
1 - Introduction to PL/SQL1 - Introduction to PL/SQL
1 - Introduction to PL/SQL
 
Ch3
Ch3Ch3
Ch3
 
SQL for ETL Testing
SQL for ETL TestingSQL for ETL Testing
SQL for ETL Testing
 

Andere mochten auch

Instructional picture
Instructional pictureInstructional picture
Instructional picture
chipstrahm
 
Stumble upon
Stumble uponStumble upon
Stumble upon
abudde
 
Technology and Education
Technology and EducationTechnology and Education
Technology and Education
rogersc05
 
Iman bio
Iman bioIman bio
Iman bio
imanza
 
Technology and education 1.ppt
Technology and education 1.pptTechnology and education 1.ppt
Technology and education 1.ppt
chipstrahm
 
исследовательская культура школьника2222
исследовательская культура школьника2222исследовательская культура школьника2222
исследовательская культура школьника2222
biolog259
 
Lenox Advisors Corp Brochure
Lenox Advisors Corp BrochureLenox Advisors Corp Brochure
Lenox Advisors Corp Brochure
darrengblatt
 
尽管去做——无压工作的艺术
尽管去做——无压工作的艺术尽管去做——无压工作的艺术
尽管去做——无压工作的艺术
Jim Liu
 
Підсумки міського етапу Всеукраїнського конкурсу "Космічні фантазії"
Підсумки міського етапу Всеукраїнського конкурсу "Космічні фантазії" Підсумки міського етапу Всеукраїнського конкурсу "Космічні фантазії"
Підсумки міського етапу Всеукраїнського конкурсу "Космічні фантазії"
08600 Vasilkov
 

Andere mochten auch (20)

Instructional picture
Instructional pictureInstructional picture
Instructional picture
 
Stumble upon
Stumble uponStumble upon
Stumble upon
 
המעצבים עבודות חוץ
המעצבים עבודות חוץהמעצבים עבודות חוץ
המעצבים עבודות חוץ
 
Technology and Education
Technology and EducationTechnology and Education
Technology and Education
 
Cwt Price List (31 March 2012)
Cwt Price List (31 March 2012)Cwt Price List (31 March 2012)
Cwt Price List (31 March 2012)
 
המעצבים עבודות חוץ
המעצבים עבודות חוץהמעצבים עבודות חוץ
המעצבים עבודות חוץ
 
Letra s 1° basico
Letra s  1° basicoLetra s  1° basico
Letra s 1° basico
 
2 apartandome de dios
2 apartandome de dios2 apartandome de dios
2 apartandome de dios
 
Iman bio
Iman bioIman bio
Iman bio
 
Technology and education 1.ppt
Technology and education 1.pptTechnology and education 1.ppt
Technology and education 1.ppt
 
5 ano b
5 ano b5 ano b
5 ano b
 
исследовательская культура школьника2222
исследовательская культура школьника2222исследовательская культура школьника2222
исследовательская культура школьника2222
 
Lenox Advisors Corp Brochure
Lenox Advisors Corp BrochureLenox Advisors Corp Brochure
Lenox Advisors Corp Brochure
 
尽管去做——无压工作的艺术
尽管去做——无压工作的艺术尽管去做——无压工作的艺术
尽管去做——无压工作的艺术
 
Ivo Totev
Ivo TotevIvo Totev
Ivo Totev
 
Eqf iserve jobs-descriptions
Eqf iserve jobs-descriptionsEqf iserve jobs-descriptions
Eqf iserve jobs-descriptions
 
Siglos xvi y xvii [reparado]
Siglos xvi y xvii [reparado]Siglos xvi y xvii [reparado]
Siglos xvi y xvii [reparado]
 
Pp reunión pedagógica-3°-4° básicos 2016
Pp reunión pedagógica-3°-4° básicos 2016Pp reunión pedagógica-3°-4° básicos 2016
Pp reunión pedagógica-3°-4° básicos 2016
 
Підсумки міського етапу Всеукраїнського конкурсу "Космічні фантазії"
Підсумки міського етапу Всеукраїнського конкурсу "Космічні фантазії" Підсумки міського етапу Всеукраїнського конкурсу "Космічні фантазії"
Підсумки міського етапу Всеукраїнського конкурсу "Космічні фантазії"
 
Mmm which one
Mmm which oneMmm which one
Mmm which one
 

Ähnlich wie Constructing the IMPL Flowsheet Using Dia with Python (IMPL-FlowsheetDiaPy)

Advanced Production Accounting of a Flotation Plant
Advanced Production Accounting of a Flotation PlantAdvanced Production Accounting of a Flotation Plant
Advanced Production Accounting of a Flotation Plant
Alkis Vazacopoulos
 
Impl reference manual_for_quantities
Impl reference manual_for_quantitiesImpl reference manual_for_quantities
Impl reference manual_for_quantities
Alkis Vazacopoulos
 
Capital Investment Industrial Modeling Framework - IMPRESS
Capital Investment Industrial Modeling Framework - IMPRESSCapital Investment Industrial Modeling Framework - IMPRESS
Capital Investment Industrial Modeling Framework - IMPRESS
Alkis Vazacopoulos
 
Advanced Production Accounting
Advanced Production AccountingAdvanced Production Accounting
Advanced Production Accounting
Alkis Vazacopoulos
 
Maritime Industrial Modeling Framework - IMPRESS
Maritime Industrial Modeling Framework - IMPRESSMaritime Industrial Modeling Framework - IMPRESS
Maritime Industrial Modeling Framework - IMPRESS
Alkis Vazacopoulos
 
Quick Development and Deployment of Industrial Applications using Excel/VBA, ...
Quick Development and Deployment of Industrial Applications using Excel/VBA, ...Quick Development and Deployment of Industrial Applications using Excel/VBA, ...
Quick Development and Deployment of Industrial Applications using Excel/VBA, ...
Alkis Vazacopoulos
 
Data Exchange Standards & STEP, EXPRESS & EXPRESS-G
Data Exchange Standards & STEP, EXPRESS & EXPRESS-GData Exchange Standards & STEP, EXPRESS & EXPRESS-G
Data Exchange Standards & STEP, EXPRESS & EXPRESS-G
metalalp
 
Impl reference manual_for_logic_logistics
Impl reference manual_for_logic_logisticsImpl reference manual_for_logic_logistics
Impl reference manual_for_logic_logistics
Alkis Vazacopoulos
 

Ähnlich wie Constructing the IMPL Flowsheet Using Dia with Python (IMPL-FlowsheetDiaPy) (20)

Advanced Production Accounting of a Flotation Plant
Advanced Production Accounting of a Flotation PlantAdvanced Production Accounting of a Flotation Plant
Advanced Production Accounting of a Flotation Plant
 
Advanced property tracking Industrial Modeling Framework
Advanced property tracking Industrial Modeling FrameworkAdvanced property tracking Industrial Modeling Framework
Advanced property tracking Industrial Modeling Framework
 
Impl reference manual_for_quantities
Impl reference manual_for_quantitiesImpl reference manual_for_quantities
Impl reference manual_for_quantities
 
Capital Investment Industrial Modeling Framework - IMPRESS
Capital Investment Industrial Modeling Framework - IMPRESSCapital Investment Industrial Modeling Framework - IMPRESS
Capital Investment Industrial Modeling Framework - IMPRESS
 
Oracle DBA interview_questions
Oracle DBA interview_questionsOracle DBA interview_questions
Oracle DBA interview_questions
 
Advanced Production Accounting
Advanced Production AccountingAdvanced Production Accounting
Advanced Production Accounting
 
Maritime Industrial Modeling Framework - IMPRESS
Maritime Industrial Modeling Framework - IMPRESSMaritime Industrial Modeling Framework - IMPRESS
Maritime Industrial Modeling Framework - IMPRESS
 
Design and Implementation of Automated Visualization for Input/Output for Pro...
Design and Implementation of Automated Visualization for Input/Output for Pro...Design and Implementation of Automated Visualization for Input/Output for Pro...
Design and Implementation of Automated Visualization for Input/Output for Pro...
 
Quick Development and Deployment of Industrial Applications using Excel/VBA, ...
Quick Development and Deployment of Industrial Applications using Excel/VBA, ...Quick Development and Deployment of Industrial Applications using Excel/VBA, ...
Quick Development and Deployment of Industrial Applications using Excel/VBA, ...
 
Advanced Production Accounting of an Olefins Plant Industrial Modeling Framew...
Advanced Production Accounting of an Olefins Plant Industrial Modeling Framew...Advanced Production Accounting of an Olefins Plant Industrial Modeling Framew...
Advanced Production Accounting of an Olefins Plant Industrial Modeling Framew...
 
ACAT08_040
ACAT08_040ACAT08_040
ACAT08_040
 
Generalized Capital Investment Planning w/ Sequence-Dependent Setups Industri...
Generalized Capital Investment Planning w/ Sequence-Dependent Setups Industri...Generalized Capital Investment Planning w/ Sequence-Dependent Setups Industri...
Generalized Capital Investment Planning w/ Sequence-Dependent Setups Industri...
 
Data Exchange Standards & STEP, EXPRESS & EXPRESS-G
Data Exchange Standards & STEP, EXPRESS & EXPRESS-GData Exchange Standards & STEP, EXPRESS & EXPRESS-G
Data Exchange Standards & STEP, EXPRESS & EXPRESS-G
 
Planuling & Phasing
Planuling & PhasingPlanuling & Phasing
Planuling & Phasing
 
AN AI PLANNING APPROACH FOR GENERATING BIG DATA WORKFLOWS
AN AI PLANNING APPROACH FOR GENERATING BIG DATA WORKFLOWSAN AI PLANNING APPROACH FOR GENERATING BIG DATA WORKFLOWS
AN AI PLANNING APPROACH FOR GENERATING BIG DATA WORKFLOWS
 
An ai planning approach for generating
An ai planning approach for generatingAn ai planning approach for generating
An ai planning approach for generating
 
Object oriented design-UNIT V
Object oriented design-UNIT VObject oriented design-UNIT V
Object oriented design-UNIT V
 
MANAGING AND ANALYSING SOFTWARE PRODUCT LINE REQUIREMENTS
MANAGING AND ANALYSING SOFTWARE PRODUCT LINE REQUIREMENTSMANAGING AND ANALYSING SOFTWARE PRODUCT LINE REQUIREMENTS
MANAGING AND ANALYSING SOFTWARE PRODUCT LINE REQUIREMENTS
 
Impl reference manual_for_logic_logistics
Impl reference manual_for_logic_logisticsImpl reference manual_for_logic_logistics
Impl reference manual_for_logic_logistics
 
Estimation Techniques V1.0
Estimation Techniques V1.0Estimation Techniques V1.0
Estimation Techniques V1.0
 

Mehr von Alkis Vazacopoulos

Missing-Value Handling in Dynamic Model Estimation using IMPL
Missing-Value Handling in Dynamic Model Estimation using IMPL Missing-Value Handling in Dynamic Model Estimation using IMPL
Missing-Value Handling in Dynamic Model Estimation using IMPL
Alkis Vazacopoulos
 
Dither Signal Design Problem (DSDP) for Closed-Loop Estimation Industrial Mod...
Dither Signal Design Problem (DSDP) for Closed-Loop Estimation Industrial Mod...Dither Signal Design Problem (DSDP) for Closed-Loop Estimation Industrial Mod...
Dither Signal Design Problem (DSDP) for Closed-Loop Estimation Industrial Mod...
Alkis Vazacopoulos
 

Mehr von Alkis Vazacopoulos (20)

Automatic Fine-tuning Xpress-MP to Solve MIP
Automatic Fine-tuning Xpress-MP to Solve MIPAutomatic Fine-tuning Xpress-MP to Solve MIP
Automatic Fine-tuning Xpress-MP to Solve MIP
 
Data mining 2004
Data mining 2004Data mining 2004
Data mining 2004
 
Amazing results with ODH|CPLEX
Amazing results with ODH|CPLEXAmazing results with ODH|CPLEX
Amazing results with ODH|CPLEX
 
Bia project poster fantasy football
Bia project poster  fantasy football Bia project poster  fantasy football
Bia project poster fantasy football
 
NFL Game schedule optimization
NFL Game schedule optimization NFL Game schedule optimization
NFL Game schedule optimization
 
2017 Business Intelligence & Analytics Corporate Event Stevens Institute of T...
2017 Business Intelligence & Analytics Corporate Event Stevens Institute of T...2017 Business Intelligence & Analytics Corporate Event Stevens Institute of T...
2017 Business Intelligence & Analytics Corporate Event Stevens Institute of T...
 
Posters 2017
Posters 2017Posters 2017
Posters 2017
 
Very largeoptimizationparallel
Very largeoptimizationparallelVery largeoptimizationparallel
Very largeoptimizationparallel
 
Retail Pricing Optimization
Retail Pricing Optimization Retail Pricing Optimization
Retail Pricing Optimization
 
Optimization Direct: Introduction and recent case studies
Optimization Direct: Introduction and recent case studiesOptimization Direct: Introduction and recent case studies
Optimization Direct: Introduction and recent case studies
 
Informs 2016 Solving Planning and Scheduling Problems with CPLEX
Informs 2016 Solving Planning and Scheduling Problems with CPLEX Informs 2016 Solving Planning and Scheduling Problems with CPLEX
Informs 2016 Solving Planning and Scheduling Problems with CPLEX
 
ODHeuristics
ODHeuristicsODHeuristics
ODHeuristics
 
Missing-Value Handling in Dynamic Model Estimation using IMPL
Missing-Value Handling in Dynamic Model Estimation using IMPL Missing-Value Handling in Dynamic Model Estimation using IMPL
Missing-Value Handling in Dynamic Model Estimation using IMPL
 
Finite Impulse Response Estimation of Gas Furnace Data in IMPL Industrial Mod...
Finite Impulse Response Estimation of Gas Furnace Data in IMPL Industrial Mod...Finite Impulse Response Estimation of Gas Furnace Data in IMPL Industrial Mod...
Finite Impulse Response Estimation of Gas Furnace Data in IMPL Industrial Mod...
 
Industrial Modeling Service (IMS-IMPL)
Industrial Modeling Service (IMS-IMPL)Industrial Modeling Service (IMS-IMPL)
Industrial Modeling Service (IMS-IMPL)
 
Dither Signal Design Problem (DSDP) for Closed-Loop Estimation Industrial Mod...
Dither Signal Design Problem (DSDP) for Closed-Loop Estimation Industrial Mod...Dither Signal Design Problem (DSDP) for Closed-Loop Estimation Industrial Mod...
Dither Signal Design Problem (DSDP) for Closed-Loop Estimation Industrial Mod...
 
Xmr im
Xmr imXmr im
Xmr im
 
Distillation Curve Optimization Using Monotonic Interpolation
Distillation Curve Optimization Using Monotonic InterpolationDistillation Curve Optimization Using Monotonic Interpolation
Distillation Curve Optimization Using Monotonic Interpolation
 
Multi-Utility Scheduling Optimization (MUSO) Industrial Modeling Framework (M...
Multi-Utility Scheduling Optimization (MUSO) Industrial Modeling Framework (M...Multi-Utility Scheduling Optimization (MUSO) Industrial Modeling Framework (M...
Multi-Utility Scheduling Optimization (MUSO) Industrial Modeling Framework (M...
 
Advanced Parameter Estimation (APE) for Motor Gasoline Blending (MGB) Indust...
Advanced Parameter Estimation (APE) for Motor Gasoline Blending (MGB)  Indust...Advanced Parameter Estimation (APE) for Motor Gasoline Blending (MGB)  Indust...
Advanced Parameter Estimation (APE) for Motor Gasoline Blending (MGB) Indust...
 

Kürzlich hochgeladen

notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
MayuraD1
 

Kürzlich hochgeladen (20)

Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Rums floating Omkareshwar FSPV IM_16112021.pdf
Rums floating Omkareshwar FSPV IM_16112021.pdfRums floating Omkareshwar FSPV IM_16112021.pdf
Rums floating Omkareshwar FSPV IM_16112021.pdf
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 

Constructing the IMPL Flowsheet Using Dia with Python (IMPL-FlowsheetDiaPy)

  • 1. Constructing the IMPL Flowsheet Using Dia with Python (IMPL-FlowsheetDiaPy) i n d u s t r IAL g o r i t h m s LLC. (IAL) www.industrialgorithms.com May 2014 Introduction Presented in this document is a short description on how to construct a flowsheet or superstructure using the open-source Dia as the drawing tool (similar to Microsoft Visio) and the open-source Python as the programming language to write out the construction data of the flowsheet into a UPS file. The benefit of using a drawing package such as Dia is that it is a graphical or visual representation of the construction and connectivity data of the industrial optimization problem (IOP) with respect to its flow network, graph or diagram i.e., nodes and directed arcs. The alternative is to configure or populate the structures, shapes or objects in a spreadsheet or data file which can be problematic and difficult to interpret i.e., “a picture is worth a thousand words”. Flowsheet and UOPSS A flowsheet is a common term used in chemical engineering to describe the nodes and directed arcs of a graph, network or superstructure and is widely used in process design simulators. The IMPL flowsheet is similar but in order to more comprehensively model or construct flowsheets suitable for advanced planning and scheduling (APS), advanced production/process control (APC) and advanced production/process monitoring (APM) applications for example, we use the Unit-Operation-Port-State Superstructure (UOPSS) found in Kelly 2004, 2005, Zyngier and Kelly, 2009, 2012 and Kelly and Zyngier 2015. Figure 1. UOPSS Sheet and Shapes in Dia.
  • 2. Figure 1 provides a list of the various UOPSS shapes available in Dia and these can be arranged in any arbitrary topological order where the unit-operation shapes can only be connected to in- and out-port-state shapes and out-port-states (upstream) can only be connected to in-port-states (downstream) as further described below. Dia and UOPSS As shown above in Figure 1, Dia provides the ability to create customized drawing objects or shapes and to collect them into a sheet similar to a stencil in Microsoft Visio. It provides the capability to add or configure custom properties or extra attributes assigned to each object and IMPL uses this to configure the various UOPSS names and types directly within Dia. Figure 2 shows a simple flowsheet with an inbound “Supply” perimeter and an outbound “Demand” perimeter (unit) for a “Feed” and a “Product” (operation) respectively. There are two internal streams from the unit-operations to/from the port-states and one external stream from the out-port-state “out” to the in-port-state “in”. This is a simple supply-demand chain flowsheet given that there is no production or transportation value-add i.e., no pools, processes, pipelines, etc. Figure 2. Simple Supply-Demand Chain Flowsheet with no Value-Add. There are certain construction rules or protocols that are now described using this simple flowsheet as illustration. Rule #1 - units and ports must have non-blank names. Operation and state names can be left blank but unit and port names must be populated else a red “NULL” will appear as shown in Figure 3 if we do not configure the name “Supply” for the first perimeter unit. Essentially we are ensuring that the “physical” network (unit-ports) is completely configured whereas the “procedural” network (operation-states) can be partially configured. The cross-product or combination of the two networks forms what we call the “projectional” superstructure. Figure 3. Rule #1 Violated. Rule #2 - port-states must be connected to at least one and only one unit-operation. A port- state must be connected to a unit-operation else a red “NEGLECTED” will appear as shown in Figure 4 if we do not connect it to one (and only one) unit-operation shape. Connecting the same port-state pair shape instance to multiple unit-operation shape instances in the Dia flowsheet is possible i.e., no warning/error assertion will be raised but this should not be done.
  • 3. Figure 4. Rule #2 Violated. Rule #3 - out-port-states may only be connected to in-port-states and must be connected at both ends (head/tail, from/to and source/destination). An out-port-state must be connected to an in-port-state at both ends else a red “NEGLECTED” will appear as shown in Figure 5. As mentioned in Rule #2, a port-state must be connected to only one unit-operation but it does not necessarily need to be connected to an upstream or downstream port-state i.e., the unit- operation-port-state tuple has an in- or out-degree of zero (0). This is why only the external stream is highlighted and not also the in-port-state in Figure 5. Figure 5. Rule #3 Violated. There are two other rules for the construction of the flowsheet as follows however these rules are not strictly enforced in Dia although they will be highlighted by IMPL during the interfacing, interacting, modeling and presolving stages. Rule #4 - port-state pairs must be unique locally on a unit-operation, and Rule #5 - unit-operation pairs must be unique globally in a problem. IALConstructer.py and Python 2.3 The code behind which cycles or loops through all of the Dia objects and extracts the flowsheet details or UOPSS structures with the custom attributes and writes out the UPS file (Appendix A) is called IALConstructer.py where its source code is available as part of the IMPL installation and is provided “as-is” according to the open-source licensing agreements. Unfortunately the Dia scripting language is coded in Python 2.3 only where later versions of Python can fortunately co-exist with the earlier Python 2.3 version. The IALConstructer.py source code also provides three (3) IML aliases: “ALLPARTS” for unit- operation pairs or duples, “ALLINPORTS” and “ALLOUTPORTS” for unit-operation-port-state quadruples (internal streams) and “ALLPATHS” for unit-operation-port-state-unit-operation-port- state octuples (external streams). These aliases are useful to configure the capacity data and other model and cycle data quickly and easily in the IML file. References
  • 4. Kelly, J.D., "Production modeling for multimodal operations", Chemical Engineering Progress, February, 44, (2004). Kelly, J.D., "The unit-operation-stock superstructure (UOSS) and the quantity-logic-quality paradigm (QLQP) for production scheduling in the process industries", In: MISTA 2005 Conference Proceedings, 327, (2005). Zyngier, D., Kelly, J.D., "Multi-product inventory logistics modeling in the process industries", In: W. Chaovalitwonse, K.C. Furman and P.M. Pardalos, Eds., Optimization and Logistics Challenges in the Enterprise", Springer, 61-95, (2009). Zyngier, D., Kelly, J.D., "UOPSS: a new paradigm for modeling production planning and scheduling systems", ESCAPE 22, June, (2012). Kelly, J.D., Zyngier, D., "Unit operation nonlinear modeling for planning and scheduling applications", K.C. Furman et.al. (eds.), Optimization and Analytics in the Oil & Gas Industries, Springer Science, (2015). Industrial Algorithms LLC., “Industrial Modeling & Programming Language (IMPL) Installation Manual”, IAL-IMPL-IMW-1-0.docx. Appendix A – SimpleFlowsheet.UPS File i M P l (c) Copyright and Property of i n d u s t r I A L g o r i t h m s LLC. checksum,10 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! Unit-Operation-Port-State-Superstructure (UOPSS) *.UPS File. ! (This file is automatically generated from the Python program IALConstructer.py) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! &sUnit,&sOperation,@sType,@sSubtype,@sUse Demand,Product,perimeter,, Supply,Feed,perimeter,, &sUnit,&sOperation,@sType,@sSubtype,@sUse ! Number of UO shapes = 2 &sAlias,&sUnit,&sOperation ALLPARTS,Demand,Product ALLPARTS,Supply,Feed &sAlias,&sUnit,&sOperation &sUnit,&sOperation,&sPort,&sState,@sType,@sSubtype Demand,Product,in,,in, Supply,Feed,out,,out, &sUnit,&sOperation,&sPort,&sState,@sType,@sSubtype ! Number of UOPS shapes = 2 &sAlias,&sUnit,&sOperation,&sPort,&sState ALLINPORTS,Demand,Product,in, ALLOUTPORTS,Supply,Feed,out, &sAlias,&sUnit,&sOperation,&sPort,&sState &sUnit,&sOperation,&sPort,&sState,&sUnit,&sOperation,&sPort,&sState Supply,Feed,out,,Demand,Product,in, &sUnit,&sOperation,&sPort,&sState,&sUnit,&sOperation,&sPort,&sState ! Number of UOPSPSUO shapes = 1 !&sUnit,&sOperation,&sPort,&sState,&sUnit,&sOperation,&sPort,&sState Supply,Feed,out,,Demand,Product,in, !&sUnit,&sOperation,&sPort,&sState,&sUnit,&sOperation,&sPort,&sState &sAlias,&sUnit,&sOperation,&sPort,&sState,&sUnit,&sOperation,&sPort,&sState ALLPATHS,Supply,Feed,out,,Demand,Product,in, &sAlias,&sUnit,&sOperation,&sPort,&sState,&sUnit,&sOperation,&sPort,&sState