PA 02.2 - Programming Languages & Systems for Public Administration & DSS PDF
Document Details
Uploaded by Deleted User
Tags
Summary
This presentation details different software solutions and programming languages for public administration and decision support systems (DSS). It covers procedural and declarative approaches, embedded autonomous agents, and business intelligence tools. The presentation also touches on Python, common IDEs like Visual Studio Code, and the use of Jupyter notebooks.
Full Transcript
Software solutions and languages for AP and DSS Operational/structured decisions COMBINATORIAL IN * NATURE AUTOMATED AGV routing in an automated plant...
Software solutions and languages for AP and DSS Operational/structured decisions COMBINATORIAL IN * NATURE AUTOMATED AGV routing in an automated plant Distribution management Production planning Procedural approach I need a cup of tea. Procedural: 1.Go to kitchen 2.Get sugar, milk, and tea, 3.Mix them, and heat over the fire till it boils 4.Put that in a cup and bring it to me Declarative: 1.Get me a cup of tea. By using a procedural language (C, C++, Java, Python …), you define the steps to get a solution (plan). Declarative approach (*) AMPL, OPL (IBM), Amply and Pulp (Python libraries), STRIPS, PDDL, … Declarative vs procedural approach As a rule: Declarative approach: more flexible (e.g., if a constraint changes, just modify the model) Procedural approach: tailored and less flexible (e.g., if a constraint changes, you have to modify the procedure); more efficient Embedded autonomous agents Refresh system state & replan It has to be fast (even multiple times per second) Implemented in C, C++, … possibly using Optimization, Constraint Programming … libraries Product/service Tactical/strategic decisions launch MORE NO OR LITTLE UNCERTAINTY HISTORICAL DATA Product/service AVAILABLE advertising * Product/service pricing AUTOMATED BA SW support Spreadsheets (Excel,...) + various add-ins – error-prone – labour-intensive – cannot be integrated in larger applications – cannot deal with big data Integrated business intelligence and planning solutions – SaS, Minitab, IBM Cognos, BA SW – Reporting, analysis, dashboard, scorecard, planning, budgeting, support forecasting, … – used by various big companies – not open-source – expensive – Low-level programming language (requires longer codes for simple procedures) – free – an open-source platform – mainly used by academics an interactive and interpreted high-level object-oriented programming language simplicity and clear syntax which in turn increases readability ”executable” pseudocode easy to learn and understand. open-source scripting language many libraries used for model building or statistical operation on data used by Google, Quora, Reddit, etc. Python witnessed a huge growth in popularity IEEE Spectrum - The 2017 Top Programming Languages Is also used in areas other than BA: – Business applications (e-commerce, ERPs, …) Python – Websites – Web scraping – Instrument control – Audio and video applications https://towardsdatascience.com/how-does-python-work-6f21fd197888 Speed Cython C/C++ wrapper for Python Python From terminal, type python3 Use the interpreter: insert one command at command line a time, then press Enter You can run a script and redirect the output to output.txt, rather than to the standard system output (stdout) >>> hello.py > output.txt Open Terminal at folder Python command line Dal prompt dell’OS (gianpaolo_ghiani@Gianpaolos-MacBook-Pro Codici_Python %) python3 hello.py > output.txt Just double-click on a.py file icon in a file manager Run Python This option may not be widely used in the Scripts From a development stage, but it may be used File Manager when you release your code for production. How: it depend on your operating system. A code editor is a tool that is used to write Code Editors and edit code. They are usually lightweight and can be great for learning. However, and Python IDEs once your program gets larger, you need to test and debug your code, that's where IDEs come in. Sublime Visual Studio Code An IDE (Integrated Development Environment) is a single program from which it is possible to manage all phases of software development. It allows from a single interface to write, control, compile, execute, test and distribute a program. IDLE PyCharm PyDev (Eclipse for Python) … https://www.programiz.com/python- programming/ide IDLE is a decent IDE for learning as it's Python IDLE lightweight and simple to use. However, it's not for optimum for larger projects. Its major features include the Python shell window (interactive interpreter), auto-completion, syntax highlighting, smart indentation, and a basic integrated debugger. Python with Jupyter Notebook is a web application Jupiter for creating and sharing notebooks computational documents. A Jupyter notebook is made up of cells. A cells may contain either text in mark- down language or code. To run a piece of code, press the play button in the toolbar above. Python with Debugging large codes can be Jupiter problematic. notebooks The Jupyter Notebook is not included with Python, so if you want to try it out, you will need to install Jupyter on your computer or use it in the cloud (see, e.g., COLAB). Python with JupyterLab is the next generation of the Jupyter Notebook. JupiterLab It aims at fixing many usability issues of the Notebook, and it greatly expands its scope. JupyterLab offers a general framework for interactive computing and data science in the browser, using Python, Julia, R, or one of many other languages. Python in COLAB is a cloud-based product from Google Research. It allows anybody to COLAB write and execute arbitrary python code through the browser without installing Python on your machine Similar to Binder, … Python in The code is executed on the cloud, subject to Google policies on availability COLAB You may use the resources of your computer Tailored languages (SIMAN, …) Visual Interactive Modelling Simulation Systems (Arena, Simio, …) Build Models Fast With Drag and Drop Animate the models for validation and demo