shop user forum - sintef

21
SHOP USER FORUM Per Aaslid SINTEF Energy Research

Upload: others

Post on 15-Feb-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SHOP USER FORUM - SINTEF

SHOP USER FORUMPer Aaslid

SINTEF Energy Research

Page 2: SHOP USER FORUM - SINTEF

API (Application Programming Interface)

• Demo

• Architecture

• PyShop

2

Page 3: SHOP USER FORUM - SINTEF

API architecture

SHOP core (C)

Dataset (ASCII)

SHOP API

(C/CLI)WCF service handler (C#)

PyShopSDK

(Python)

Database

Current user interface

= new interface

= current solution

WCF contract

(C#)

ASCIIPandas

MongoDb

Python (C#/Python)

New user

interface

Page 4: SHOP USER FORUM - SINTEF

Why Python?

• Easy to learn

• Easy to integrate with other programming languages, databases, file formats

• Widely used for data science both in academia and industry

• Large community

4

Page 5: SHOP USER FORUM - SINTEF

SHOP integration with PyShopSH

OP

API C

#/Py

thon Low level get/set

functions• GetIntValue• SetIntValue• GetTxySeriesStartTime• GetTxySeriesT• GetTxySeriesYPrimitive datatypes• Int, int[]• Double, double[]• string

PySh

op Generic get/set functionsPandas or numpy for timeseries and arraysCode completionGood support for external integration Ex

tern

al in

tegr

atio

n SQL databaseTime series databasePlottingExcelPython scriptingHDF5ASCII

Page 6: SHOP USER FORUM - SINTEF

Pandas in PyShop

• High-performance python library for data structures and analysis

• Open source project

• Supported by data science libraries (scikit-learn, TensorFlow, Keras)

• Used for time series and xy data in PyShop

• Built-in integration against excel, csv, hdf5, SQL, JSON

• 3rd party libraries for integration against time series databases, MongoDb and more

Page 7: SHOP USER FORUM - SINTEF

Further API development

• Integrate documentation in API

• Replace C# interface in PyShop with C++ for better performance

• Improve handling of errors and error messages

• Improve logging in PyShop

• Improvements based on user feedback

7

Page 8: SHOP USER FORUM - SINTEF

Bugs reported in SHOP

8

0

5

10

15

20

25

30

Less serious Serious Critical

Page 9: SHOP USER FORUM - SINTEF

Bug reports per category

9

Best Profit

Gate

Plant

Reservoir

Reserve

Simulator

Junction

Other

Page 12: SHOP USER FORUM - SINTEF

New in SHOP - maintenance

• New plant model (SHOP 12)

• Restructured junction model

• Objective function as time series

• Objective per object (licensed)

• Improved weir description

• Restructure PQ-curves (ongoing)

12

Page 13: SHOP USER FORUM - SINTEF

New in SHOP – maintenance

• Show restrictions causing infeasible LP-problem in log

• Performance improvements for first release of SHOP 12

• Updates in Gurobi and OSI solver interface

• More functionality available in API

• Heuristics for unit committment without MIP

13

Page 14: SHOP USER FORUM - SINTEF

New in SHOP (R&D)

• Pressure links

• Best profits

• Simulator inflow calculation

• Junction gate optimization (ongoing)

• Objective from simulation (not started)

14

Page 15: SHOP USER FORUM - SINTEF

Roadmap for SHOP

15

Funksjonalitet

Arkitektur

Forbedret bygging av PQ-kurver

2018 Fremtidig utvikling

Komplett API

Nytt format for restriksjoner som omfatter flere objekt (multiobjekt)

Versjon 13

Innebygd dokumentasjon i API

Utvidet testsystem• Robusthet• Optimalitet

Integrasjon mot 3.parts-software

Software Development Kit i Python

Operationalization of functionality from research projects (MultiSharm)

Page 16: SHOP USER FORUM - SINTEF

Maintenance plan

Plant

• Build model on unit level• Restructure PQ-curve (ongoing)

Junction

• Pressure links• Integrate creek intake into junction model• Junction gate optimization (ongoing)

Reservoir

• End value conversion• Improved modelling of reservoir limits and overflow• Rewrite model to use absolute variables

Gate

• Improved weir descriptions (ongoing)• Rewrite model to use absolute variables

16

Page 17: SHOP USER FORUM - SINTEF

Multi object restructuringMULTI_OBJECT_DATA keyword sense name OBJECT_GROUP <Group name> <sense>

OBJECT_LIST

object_type1 name1 CONNECT PLANT/OBJECT_GROUP <Plant name> <Group name>

objevt_type2 name2 CONNECT PLANT/OBJECT_GROUP <Plant name> <Group name>

/OBJECT_LIST

TIME_INTERVAL OBJECT_GROUP <Group name> DATA_VALUE<TXY> T=time, Y=value

start_time end_time OBJECT_GROUP <Group name> INTERVAL_LENGTH<TXY> T=start_time, Y=timespan

/TIME_INTERVAL

PENALTY_COST unit

UP value unit OBJECT_GROUP <Group name> PENALTY_UP<TXY> T=time, Y=value

DOWN value unit OBJECT_GROUP <Group name> PENALTY_DOWN<TXY> T=time, Y=value

/PENALTY_COST

DATA_VALUE

data value unit

/DATA_VALUE17

Page 18: SHOP USER FORUM - SINTEF

New project: Tuning of open-source CBC solver

• CBC (Coin Branch- and Cut) is and open source alternative to CPLEX

• Out-of-the-box performance significant slower than CPLEX

• Methods for reducing solver time:• Heuristics for start basis first iteration

• Using warm start from previous iteration

• Tuning of parameters for CBC and CLP pre-solver

• Strategy settings for branch-and-bound in CBC

• 3rd party libraries for parallellization of branch-and-bound

18

Page 19: SHOP USER FORUM - SINTEF

New project: Discharge limitsUpstream: sediment transport in reservoirchannels

Downstream: cavitation

19

Rsv1

Rsv2↓ ↓

Qmax(m3/s)

h (masl)

Page 20: SHOP USER FORUM - SINTEF

Any other business

20

Page 21: SHOP USER FORUM - SINTEF

Teknologi for et bedre samfunn