Download full chapter Simulation And Modeling Methodologies Technologies And Applications 9Th International Conference Simultech 2019 Prague Czech Republic July 29 31 2019 Revised Selected Papers Mohammad S Obaidat pdf docx

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 54

Simulation and Modeling

Methodologies, Technologies and


Applications: 9th International
Conference, SIMULTECH 2019 Prague,
Czech Republic, July 29-31, 2019,
Revised Selected Papers Mohammad S.
Obaidat
Visit to download the full and correct content document:
https://textbookfull.com/product/simulation-and-modeling-methodologies-technologies
-and-applications-9th-international-conference-simultech-2019-prague-czech-republic
-july-29-31-2019-revised-selected-papers-mohammad-s-obaidat/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Simulation and Modeling Methodologies, Technologies and


Applications: 9th International Conference, SIMULTECH
2019 Prague, Czech Republic, July 29-31, 2019, Revised
Selected Papers Mohammad S. Obaidat
https://textbookfull.com/product/simulation-and-modeling-
methodologies-technologies-and-applications-9th-international-
conference-simultech-2019-prague-czech-republic-
july-29-31-2019-revised-selected-papers-mohammad-s-obaidat/

Simulation and Modeling Methodologies Technologies and


Applications 8th International Conference SIMULTECH
2018 Porto Portugal July 29 31 2018 Revised Selected
Papers Mohammad S. Obaidat
https://textbookfull.com/product/simulation-and-modeling-
methodologies-technologies-and-applications-8th-international-
conference-simultech-2018-porto-portugal-july-29-31-2018-revised-
selected-papers-mohammad-s-obaidat/

Simulation and Modeling Methodologies Technologies and


Applications International Conference SIMULTECH 2013
Reykjavík Iceland July 29 31 2013 Revised Selected
Papers 1st Edition Mohammad S. Obaidat
https://textbookfull.com/product/simulation-and-modeling-
methodologies-technologies-and-applications-international-
conference-simultech-2013-reykjavik-iceland-
july-29-31-2013-revised-selected-papers-1st-edition-mohammad-s-
obaidat/
E Business and Telecommunications 16th International
Conference ICETE 2019 Prague Czech Republic July 26 28
2019 Revised Selected Papers Mohammad S. Obaidat

https://textbookfull.com/product/e-business-and-
telecommunications-16th-international-conference-
icete-2019-prague-czech-republic-july-26-28-2019-revised-
Simulation and Modeling Methodologies, Technologies and
Applications: 7th International Conference, SIMULTECH
2017 Madrid, Spain, July 26–28, 2017 Revised Selected
Papers Mohammad S. Obaidat
https://textbookfull.com/product/simulation-and-modeling-
methodologies-technologies-and-applications-7th-international-
conference-simultech-2017-madrid-spain-july-26-28-2017-revised-
selected-papers-mohammad-s-obaidat/

Informatics in Control, Automation and Robotics: 16th


International Conference, ICINCO 2019 Prague, Czech
Republic, July 29-31, 2019, Revised Selected Papers
Oleg Gusikhin
https://textbookfull.com/product/informatics-in-control-
automation-and-robotics-16th-international-conference-
icinco-2019-prague-czech-republic-july-29-31-2019-revised-
selected-papers-oleg-gusikhin/

Software Technologies 14th International Conference


ICSOFT 2019 Prague Czech Republic July 26 28 2019
Revised Selected Papers Marten Van Sinderen

https://textbookfull.com/product/software-technologies-14th-
international-conference-icsoft-2019-prague-czech-republic-
july-26-28-2019-revised-selected-papers-marten-van-sinderen/

Information Systems Security and Privacy 5th


International Conference ICISSP 2019 Prague Czech
Republic February 23 25 2019 Revised Selected Papers
Paolo Mori
https://textbookfull.com/product/information-systems-security-
and-privacy-5th-international-conference-icissp-2019-prague-
czech-republic-february-23-25-2019-revised-selected-papers-paolo-
mori/

Agents and Artificial Intelligence 11th International


Conference ICAART 2019 Prague Czech Republic February
19 21 2019 Revised Selected Papers Jaap Van Den Herik

https://textbookfull.com/product/agents-and-artificial-
intelligence-11th-international-conference-icaart-2019-prague-
czech-republic-february-19-21-2019-revised-selected-papers-jaap-
Advances in Intelligent Systems and Computing 1260

Mohammad S. Obaidat
Tuncer Ören
Helena Szczerbicka Editors

Simulation
and Modeling
Methodologies,
Technologies and
Applications
9th International Conference,
SIMULTECH 2019, Prague,
Czech Republic, July 29–31, 2019,
Revised Selected Papers
Advances in Intelligent Systems and Computing

Volume 1260

Series Editor
Janusz Kacprzyk, Systems Research Institute, Polish Academy of Sciences,
Warsaw, Poland

Advisory Editors
Nikhil R. Pal, Indian Statistical Institute, Kolkata, India
Rafael Bello Perez, Faculty of Mathematics, Physics and Computing,
Universidad Central de Las Villas, Santa Clara, Cuba
Emilio S. Corchado, University of Salamanca, Salamanca, Spain
Hani Hagras, School of Computer Science and Electronic Engineering,
University of Essex, Colchester, UK
László T. Kóczy, Department of Automation, Széchenyi István University,
Gyor, Hungary
Vladik Kreinovich, Department of Computer Science, University of Texas
at El Paso, El Paso, TX, USA
Chin-Teng Lin, Department of Electrical Engineering, National Chiao
Tung University, Hsinchu, Taiwan
Jie Lu, Faculty of Engineering and Information Technology,
University of Technology Sydney, Sydney, NSW, Australia
Patricia Melin, Graduate Program of Computer Science, Tijuana Institute
of Technology, Tijuana, Mexico
Nadia Nedjah, Department of Electronics Engineering, University of Rio de Janeiro,
Rio de Janeiro, Brazil
Ngoc Thanh Nguyen , Faculty of Computer Science and Management,
Wrocław University of Technology, Wrocław, Poland
Jun Wang, Department of Mechanical and Automation Engineering,
The Chinese University of Hong Kong, Shatin, Hong Kong
The series “Advances in Intelligent Systems and Computing” contains publications
on theory, applications, and design methods of Intelligent Systems and Intelligent
Computing. Virtually all disciplines such as engineering, natural sciences, computer
and information science, ICT, economics, business, e-commerce, environment,
healthcare, life science are covered. The list of topics spans all the areas of modern
intelligent systems and computing such as: computational intelligence, soft comput-
ing including neural networks, fuzzy systems, evolutionary computing and the fusion
of these paradigms, social intelligence, ambient intelligence, computational neuro-
science, artificial life, virtual worlds and society, cognitive science and systems,
Perception and Vision, DNA and immune based systems, self-organizing and
adaptive systems, e-Learning and teaching, human-centered and human-centric
computing, recommender systems, intelligent control, robotics and mechatronics
including human-machine teaming, knowledge-based paradigms, learning para-
digms, machine ethics, intelligent data analysis, knowledge management, intelligent
agents, intelligent decision making and support, intelligent network security, trust
management, interactive entertainment, Web intelligence and multimedia.
The publications within “Advances in Intelligent Systems and Computing” are
primarily proceedings of important conferences, symposia and congresses. They
cover significant recent developments in the field, both of a foundational and
applicable character. An important characteristic feature of the series is the short
publication time and world-wide distribution. This permits a rapid and broad
dissemination of research results.
** Indexing: The books of this series are submitted to ISI Proceedings,
EI-Compendex, DBLP, SCOPUS, Google Scholar and Springerlink **

More information about this series at http://www.springer.com/series/11156


Mohammad S. Obaidat •

Tuncer Ören Helena Szczerbicka


Editors

Simulation and Modeling


Methodologies, Technologies
and Applications
9th International Conference, SIMULTECH 2019,
Prague, Czech Republic, July 29–31, 2019,
Revised Selected Papers

123
Editors
Mohammad S. Obaidat Tuncer Ören
Fellow of IEEE, Dean of College School of Electrical Engineering
of Computing and Informatics and Computer Science
University of Sharjah University of Ottawa
Sharjah, United Arab Emirates Ottawa, ON, Canada
University of Jordan
Amman, Jordan
University of Science and Technology
Beijing, China

Helena Szczerbicka
Universität Hannover
Hannover, Germany

ISSN 2194-5357 ISSN 2194-5365 (electronic)


Advances in Intelligent Systems and Computing
ISBN 978-3-030-55866-6 ISBN 978-3-030-55867-3 (eBook)
https://doi.org/10.1007/978-3-030-55867-3
© Springer Nature Switzerland AG 2021
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part
of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations,
recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission
or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar
methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this
publication does not imply, even in the absence of a specific statement, that such names are exempt from
the relevant protective laws and regulations and therefore free for general use.
The publisher, the authors and the editors are safe to assume that the advice and information in this
book are believed to be true and accurate at the date of publication. Neither the publisher nor the
authors or the editors give a warranty, expressed or implied, with respect to the material contained
herein or for any errors or omissions that may have been made. The publisher remains neutral with regard
to jurisdictional claims in published maps and institutional affiliations.

This Springer imprint is published by the registered company Springer Nature Switzerland AG
The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland
Preface

The present book includes extended and revised versions of a set of selected papers
from the 9th International Conference on Simulation and Modeling Methodologies,
Technologies and Applications (SIMULTECH 2019), which was held in Prague,
Czech Republic, in the period July 29–31, 2019.
SIMULTECH 2019 received 62 paper submissions from 33 countries, of which
12.9% were included in this book. The papers were selected by the event chairs,
and their selection is based on a number of criteria that includes the reviews and
suggested comments provided by the program committee members, the session
chairs’ assessments and also the program chairs' global view of all papers included
in the technical program. The authors of selected papers were then invited to submit
a revised and extended version of their papers with at least 30% new material.
The purpose of the 9th International Conference on Simulation and Modeling
Methodologies, Technologies and Applications (SIMULTECH 2019) was to bring
together researchers, engineers, scientists and applied mathematicians and practi-
tioners interested in the advances and applications of system simulation. Four
simultaneous tracks were held, covering on one side domain-independent
methodologies and technologies and on the other side practical work developed
in specific application areas. The specific topics listed under each of these tracks
highlight the interest of this conference in aspects related to computing, including
conceptual modeling, agent-based modeling and simulation, interoperability,
ontologies, knowledge-based decision support, petri nets, business process mod-
eling and simulation, among others.
The papers selected to be included in this book contribute to the understanding
of relevant trends of current research in dynamical systems models and mathe-
matical simulation, simulation in education, e-learning and training, mathematical
modeling and simulation of multi-domains systems that consist of boom structure
and hydraulic drive systems, simulation models of mangrove forests and environ-
mental modeling and simulation, neural networks modeling and simulation,
hint-based configuration of co-simulations with algebraic loops, and dynamic
modeling of industrial mixing tanks with a slurry centrifugal pumps and optimal
trigger sequence for non-iterative co-simulation with different coupling step size.

v
vi Preface

We would like to thank all the authors for their contributions as well as to the
reviewers who have helped ensuring the quality of this publication. We also thank
the staff of INSTICC and Springer for their good efforts and kind cooperation.

July 2019 Mohammad S. Obaidat


Tuncer Ören
Helena Szczerbicka
Organization

Conference Chair

Mohammad Obaidat Fellow of IEEE, Dean of College of Computing


and Informatics, University of Sharjah, UAE,
and with University of Jordan, Jordan,
and University of Science and Technology
Beijing, China

Program Chair
Tuncer Ören (Honorary) University of Ottawa, Canada
Helena Szczerbicka Universität Hannover, Germany

Program Committee
Saleh Abdel-Afou Alaliyat Norwegian University of Science
and Technology, Norway
Nael Abu-Ghazaleh University of California, Riverside, USA
Lyuba Alboul Sheffield Hallam University, UK
Mikulas Alexik University of Zilina, Slovak Republic
Ayman Aljarbouh University of Central Asia, Kyrgyzstan
Vera Angelova Institute of Information and Communication
Technologies, Bulgarian Academy
of Sciences, Bulgaria
Carlos Argáez University of Iceland, Iceland
Gianfranco Balbo University of Torino, Italy
Simonetta Balsamo University of Venezia Ca’ Foscari, Italy
Juan Antonio Barcelo Autonoma University of Barcelona, Spain
Isaac Barjis City University of New York, USA

vii
viii Organization

Wolfgang Borutzky Bonn-Rhein-Sieg University of Applied


Sciences, Germany
Christos Bouras University of Patras and CTI&P Diophantus,
Greece
António Brito INESC TEC, Faculdade de Engenharia,
Universidade do Porto, Portugal
Agostino Bruzzone University of Genoa, Italy
Marian Bubak AGH University of Science and Technology
Krakow, Poland / University of Amsterdam,
Netherlands
Larysa Burtseva Instituto de Ingeniería, Universidad Autónoma
de Baja California, Mexico
Francesco Casella Politecnico di Milano, Italy
Rodrigo Castro University of Buenos Aires, Argentina
Srinivas Chakravarthy Kettering University, USA
Gopinath Chennupati Los Alamos National Laboratory, USA
Lawrence Chung The University of Texas at Dallas, USA
Franco Cicirelli Università della Calabria, Italy
Tanja Clees Fraunhofer Institute for Algorithms and Scientific
Computing (SCAI), Germany
Flavio Correa da Silva University of Sao Paulo, Brazil
Andrea D’Ambrogio Università di Roma “Tor Vergata”, Italy
Sanjoy Das Kansas State University, USA
Guyh Dituba Ngoma Université du Québec en Abitibi-Témiscamingue,
Canada
Anatoli Djanatliev Friedrich-Alexander-Universität
Erlangen-Nürnberg, Germany
Atakan Dogan Eskisehir Technical University, Turkey
Lorenzo Donatiello Univ. of Bologna, Italy
Julie Dugdale Laboratoire d’Informatique de Grenoble, France
Dirk Eisenbiegler University of Furtwangen, Germany
Sabeur Elkosantini University of Monastir, Tunisia
Zuhal Erden ATILIM University, Turkey
Denis Filatov Institute of Physics of the Earth, Russian
Academy of Sciences, Russian Federation
Jason Friedman Tel-Aviv University, Israel
Claudia Frydman Aix Marseille University, France
Marco Furini Università di Modena e Reggio Emilia, Italy
José Manuel Galán Universidad de Burgos, Spain
Charlotte Gerritsen Vrije Universiteit Amsterdam, Netherlands
Anna Golovkinav Saint Petersburg State University,
Russian Federation
Alexandra Grancharova University of Chemical Technology
and Metallurgy, Bulgaria
Francisco Grimaldo Universitat de València, Spain
Organization ix

Mykola Gusti International Institute for Applied Systems


Analysis, Austria
Ibrahim Hameed NTNU, Norway
Maamar Hamri Laboratoire d’Informatique et Systèmes, France
Cathal Heavey University of Limerick, Ireland
Monika Heiner Brandenburg University of Technology Cottbus,
Germany
Martin Hruby Brno University of Technology, Czech Republic
Tsan-Sheng Hsu Institute of Information Science, Academia
Sinica, Taiwan, Republic of China
Xiaolin Hu Georgia State University, USA
Ralph Huntsinger California State University, Chico Campus, USA
Giuseppe Iazeolla University of Roma TorVergata, Italy
Nobuaki Ishii Kanagawa University, Japan
Shafagh Jafer Embry-Riddle University, USA
Syed Waqar ul Qounain University of the Punjab, Pakistan
Jaffry
Emilio Jimenez Macias University of La Rioja, Spain
Björn Johansson Chalmers University of Technology, Sweden
Catholijn Jonker Delft University of Technology, Netherlands
Nina Kargapolova Institute of Computational Mathematics and
Mathematical Geophysics, Russian Federation
Anniken Karlsen NTNU in Ålesund, Norway
Peter Kemper College of William and Mary, USA
Etienne Kerre Ghent University, Belgium
William Knottenbelt Imperial College London, UK
Juš Kocijan Jozef Stefan Institute, Slovenia
Petia Koprinkova-Hristova IICT:Bulgarian Academy of Sciences, Bulgaria
Vladimir Kotev Bulgarian Academy of Sciences, Bulgaria
Vladik Kreinovich University of Texas at El Paso, USA
Claudia Krull Otto-von-Guericke University, Germany
Jean Le Fur IRD (Inst. Res. Development), France
Willem le Roux CSIR, South Africa
Sanghyun Lee University of Michigan, USA
Richard Lipka University of West Bohemia, Czech Republic
Antonio Lope University of Porto, Portugal
Maria Celia Lopes COPPE-UFRJ, Brazil
Adolfo Lopez-Paredes University of Valladolid, Spain
Ulf Lotzmann University of Koblenz, Germany
Johannes Lüthi FH Kufstein Tirol, Austria
José Machado Institute of Engineering, Polytechnic of Porto,
Portugal
Andrea Marin University of Venice, Italy
Carla Martin-Villalba UNED, Spain
Moreno Marzolla University of Bologna, Italy
x Organization

Radek Matušu Tomas Bata University in Zlin, Czech Republic


Nuno Melão Instituto Politécnico de Viseu, Escola Superior de
Tecnologia e Gestão de Viseu, Portugal
Francesco Mercaldo National Research Council of Italy (CNR), Italy
Adel Mhamdi RWTH Aachen University, Germany
Qi Mi University of Pittsburgh, USA
Bozena Mielczarek Wroclaw University of Science Technology,
Poland
Federico Milani CHEM.CO Consultant, Italy
Gabriele Milani Politecnico di Milano, Italy
Ramzi Mirshak Defence R&D Canada, Canada
Vikram Mittal United States Military Academy, USA
Roberto Montemanni University of Modena and Reggio emilia, Italy
Jairo Montoya-Torres Universidad de La Sabana, Colombia
Nobuhiko Mukai Tokyo City University, Japan
Bertie Müller Swansea University, UK
Ivan Mura Duke Kunshan University, China
Navonil Mustafee University of Exeter, UK
Nazmun Nahar University of Jyvaskyla, University of Tartu,
Finland
Àngela Nebot Universitat Politècnica de Catalunya, Spain
Bao Nguyen Defence R&D Canada and University of Ottawa,
Canada
Lialia Nikitina Fraunhofer Institute for Algorithms and Scientific
Computing (SCAI), Germany
Paulo Novais Universidade do Minho, Portugal
Paulo Oliveira Universidade de Tras os Montes e Alto Douro,
Portugal
Feng Pan Liaoning Normal University, China
María Parra Santos University of Valladolid, Spain
George Pavlidis “Athena” Research Centre, Greece
Alessandro Pellegrini University of Rome, Italy
Sapienza
L. Felipe Perrone Bucknell University, USA
Alexandre Petrenko CRIM, Canada
Alexandr Petukhov Lobachevsky State University of Nizhni
Novgorod, Russian Federation
Régis Plateaux SUPMECA, France
Tomas Potuzak University of West Bohemia, Czech Republic
Jerzy Respondek Silesian University of Technology, Poland
M. Riazi Kuwait University, Kuwait
Ella Roubtsova Open University of the Netherlands, Netherlands
Jaroslav Rozman Brno University of Technology, Czech Republic
Cristina Ruiz-Martin Carleton University, Canada
Organization xi

Katarzyna Rycerz Institute of Computer Science, AGH, Krakow,


Poland
Paulo Salvador Instituto de Telecomunicações, DETI, University
of Aveiro, Portugal
Antonella Santone University of Molise, Italy
Jean-François Santucci SPE UMR CNRS 6134:University of Corsica,
France
Frederik Schaff Ruhr-Universität Bochum, Germany
Xiao Song Beihang University, China
James Spall The Johns Hopkins University, USA
Mu-Chun Su National Central University, Taiwan,
Republic of China
Peter Summons University of Newcastle, Australia
Antuela Tako Loughborough University, UK
Halina Tarasiuk Warsaw University of Technology, Poland
Mamadou Traoré University of Bordeaux, France
Klaus Troitzsch University of Koblenz-Landau, Koblenz Campus,
Germany
Zhiying Tu Harbin Institute of Technology, China
Alfonso Urquia Universidad Nacional de Educación a Distancia,
Spain
Durk-Jouke van der Zee University of Groningen, Netherlands
Svetlana Bulgarian Modeling and Simulation Association
Vasileva-Boyadzhieva (BULSIM), Bulgaria
Vladimír Veselý Faculty of Information Technology, Brno
University of Technology, Czech Republic
Maria Viamonte Instituto Superior de Engenharia do Porto,
Portugal
Manuel Villen-Altamirano Universidad de Malaga, Spain
Antonio Virdis University of Pisa, Italy
Friederike Wall Alpen-Adria-Universität Klagenfurt, Austria
Frank Werner Otto-von-Guericke-Universität Magdeburg,
Germany
Kuan Yew Wong Universiti Teknologi Malaysia, Malaysia
Hui Xiao Southwestern University of Finance
and Economics, China
František Zboril Faculty of Information Technology,
Czech Republic
Houxiang Zhang Norwegian University of Science
and Technology, Norway
Lin Zhang Beihang University, China
xii Organization

Additional Reviewers
Clarissa Gonzalez Chalmers University of Technology, Sweden
Yingze Hou JHU, USA
Ninan Theradapuzha Mathew Chalmers University of Technology, Sweden
Shihong Wei JHU, USA

Invited Speakers
Hans Vangheluwe University of Antwerp, Belgium
Gregory Zacharewicz IMT:Mines Ales, France
Tuncer Ören University of Ottawa, Canada
Contents

Hint-Based Configuration of Co-simulations with Algebraic Loops . . . . 1


Bentley James Oakes, Cláudio Gomes, Franz Rudolf Holzinger,
Martin Benedikt, Joachim Denil, and Hans Vangheluwe
Shift of Paradigm from Model-Based to Simulation-Based . . . . . . . . . . . 29
Tuncer Ören
Assessment of Learning Achievement in an Electronics Program
Supported by an Online Simulation Applet . . . . . . . . . . . . . . . . . . . . . . 46
David Valiente, Fernando Rodríguez, Juan Carlos Ferrer,
José Luis Alonso, and Susana Fernández de Ávila
Application of Artificial Neural Networks for Active Roll Control
Based on Actor-Critic Reinforcement Learning . . . . . . . . . . . . . . . . . . . 61
Matthias Bahr, Sebastian Reicherts, Philipp Sieberg, Luca Morss,
and Dieter Schramm
Optimal Trigger Sequence for Non-iterative Co-simulation
with Different Coupling Step Sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Franz Rudolf Holzinger, Martin Benedikt, and Daniel Watzenig
Complete Lyapunov Functions: Determination of the Chain-
Recurrent Set Using the Gradient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Carlos Argáez, Peter Giesl, and Sigurdur Freyr Hafstein
A Study on the Dynamic Behavior of a Slurry Mixing
and Pumping Process: An Industrial Case . . . . . . . . . . . . . . . . . . . . . . . 122
Ridouane Oulhiq, Khalid Benjelloun, Yassine Kali, Maarouf Saad,
and Laurent Deshayes
Dynamic Simulation of Two Kinds of Hydraulic Actuated Long
Boom Manipulator in Port-Hamiltonian Formulation . . . . . . . . . . . . . . 144
Lingchong Gao, Mei Wang, Haijun Peng, Michael Kleeberger,
and Johannes Fottner

xiii
xiv Contents

Simulating Species Dominance in Mixed Mangrove Forests


Considering Species-Specific Responses to Shading, Salinity,
and Inundation Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Ian Estacio and Ariel Blanco

Author Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185


Hint-Based Configuration
of Co-simulations with Algebraic Loops

Bentley James Oakes1,2(B) , Cláudio Gomes1,2 , Franz Rudolf Holzinger3 ,


Martin Benedikt3 , Joachim Denil1,2 , and Hans Vangheluwe1,2
1
University of Antwerp, Antwerp, Belgium
bentley.oakes@uantwerpen.be
2
Flanders Make vzw, Lommel, Belgium
3
Virtual Vehicle Research GmbH, Graz, Austria

Abstract. Co-simulation is a powerful technique for performing full-


system simulation. Multiple black-box models and their simulators are
combined together to provide the behaviour for a full system. However,
the black-box nature of co-simulation and potentially infinite configu-
ration space means that configuration of co-simulations is a challenging
problem for today’s practitioners.
Our previous work on co-simulation configuration operated on the
notion of hints, which allow system engineers to encode their knowledge
and insights about the system. These hints, combined with state-of-the-
art best practices, can then be used to semi-automatically configure the
co-simulation.
We summarize our previous hint-based configuration work here, and
explore the challenging problem of scheduling co-simulations which
contain algebraic loops. Solving or “breaking” these loops is required
for scheduling, yet this breaking process can induce errors in the co-
simulation. This work formalizes this scheduling problem, presents our
insights gained about the problem, and details an optimal search algo-
rithm as well as greedy scheduling algorithms. These heuristic algorithms
are evaluated on (synthetic) co-simulation scenarios to determine their
relative speedup and optimality.

1 Introduction
Cyber-Physical Systems (CPS) marry the complexities of software with the real-
ities of the physical world [24], and are becoming essential systems in today’s
world. For example, an airplane or self-driving car relies on safety-critical com-
munication between sensors, controller software, and actuators. A large driver
in the complexity of CPS is that their analysis spans multiple domains. Simulat-
ing these therefore requires integrating heterogeneous models. For example, the
integration of multi-body system models with communication network models.
The technique of co-simulation is designed to combine multiple co-simulation
units (simulators, each with their own model), in order to compute the behavior
of the combined models over time [16,21]. Each unit has its own interface for
c Springer Nature Switzerland AG 2021
M. S. Obaidat et al. (Eds.): SIMULTECH 2019, AISC 1260, pp. 1–28, 2021.
https://doi.org/10.1007/978-3-030-55867-3_1
2 B. J. Oakes et al.

getting/setting inputs and outputs, and for computing the behaviour of its model
over a given interval of time. An example of such an interface is the Functional
Mockup Interface (FMI) Standard [7,10]. A master algorithm is then responsible
for scheduling the execution and communication of each co-simulation unit.
Co-simulation is therefore very promising for representing: a) systems assem-
bled from models in various domains, each with their own most appropriate sim-
ulator, and b) black-box models which hide internal details, allowing third-party
units to be integrated together, as happens in supplier-integrator relationships in
industry. These key benefits have led to multiple modeling and simulation tools
allowing the import and export of units implementing the FMI Standard [9],
and a wide variety of applications [16].
However, it can be difficult to ensure that the results produced by a co-
simulation can be trusted. This is due to not only the black box nature of
units, but also to the many ways in which a co-simulation can be computed
(i.e., communication frequency between differential-equation-based units, event
propagation order, etc. . . ). The correct configuration of a co-simulation also
depends on the numerical properties of the participating units. This challenge
is aggravated when units themselves may be modified as part of an optimiza-
tion loop (e.g., design space exploration) and/or impact analysis of sub-model
refinements, because the co-simulation user may be unaware of how to account
for these modifications in the master algorithm.

Prior Work. Our earlier work [18] focused on the core challenge that users
do not always know how to configure the co-simulation [25]. To tackle this, we
proposed a method, and a tool called HintCO which is summarized in Sect. 2
and available online [13]. In this tool, a user or engineer can write “hints”
about the co-simulation and involved units. HintCO then applies state of the
art heuristics to configure and run multiple promising co-simulations. This is
similar to design-space exploration techniques [28,30]. This approach works well
in practice because users usually can tell what properties a correctly configured
co-simulation should satisfy. This is demonstrated by an industrial case study
in [18], where state of the art co-simulation algorithms failed to produce expected
‘smooth’ (non-oscillatory) results. After specifying a few hints, the top candidate
results produced by HintCO were smooth.

Motivation. One limitation of HintCO was the assumption that the co-simulation
unit couplings do not form algebraic loops, as explained in Sect. 3. However,
when differential-algebraic-equation-based units are coupled, algebraic loops can
be formed [1]. The ideal technique to solve algebraic loops in co-simulations is
fixed point iteration (see, e.g., [15, Section 4] and [26]). However, this technique
requires that units support state rollback, which is an optional feature of the FMI
standard and is therefore seldom implemented currently. Therefore, the most
common technique is to “break” the algebraic loop by employing extrapolations
in one (or more) variables in the loop [3,5]. Naturally, variables have different
dynamics, hence, care must be taken when choosing the variables to break the
loop [19].
Hint-Based Configuration of Co-simulations with Algebraic Loops 3

Our prior work [18] naı̈vely generates all possible ways in which algebraic
loops can be broken, without regard for the dynamics of the variables involved. In
the current work, we build on [19] to formalize the problem of breaking algebraic
loops in co-simulations, and propose an optimal algorithm to solve it, plus a few
cost-effective approximation algorithms.

Contributions. Our contributions in this paper are: a) a formalization of the


problem of breaking algebraic loops in co-simulations, b) an optimal, but costly,
algorithm to solve it, and c) multiple cost-effective heuristic algorithms.

1.1 Paper Layout


The next section (Sect. 2) will provide a brief introduction to the HintCO frame-
work, including the hints and how they shape the search space for finding a
correct co-simulation master algorithm. While HintCO has been shown to be
effective for an industrial case [18], in Sect. 3 we demonstrate an example with
an algebraic loop, where the previous version of the HintCO framework was
unable to efficiently schedule this co-simulation.
Section 4 formalizes the essential components of our approach. We intro-
duce co-simulation and its involved concepts, as well as the background for
our improved approaches to co-simulation scheduling. The concrete problem
of scheduling co-simulations in the presence of algebraic loops is formalized in
Sect. 5 and a optimal yet costly algorithm is provided.
Candidate greedy algorithms for scheduling co-simulations with algebraic
loops are presented in Sect. 6, and evaluated on synthetic examples in Sect. 7.
Following this, Sect. 8 will discuss related work in the field and compare our
approach to past approaches. Finally, we conclude in Sect. 9 with a summary of
our research and the steps to extend our framework further.

2 HintCO Framework
This section briefly introduces relevant aspects of the HintCO framework, such
that the importance of the contributions made in this paper to the auto-
mated configuration of co-simulations can be appreciated. In particular, this
section adapts text from [18] to briefly describe the problem statement tack-
led by the HintCO framework and the elements of the HintCO workflow. This
includes exemplifying some of hints the user can state about a co-simulation,
and a description of the process for generating candidate configurations for co-
simulations.

2.1 The Configuration Problem


As described in [18] and explored in-depth in the thesis of Gomes [14], it can be
challenging to configure a co-simulation which satisfies properties to the same
degree as the original system. This is due to the inherent approximation of the
4 B. J. Oakes et al.

original system’s behaviour trace by the co-simulation’s behaviour trace, and due
to the many possible manners in which a co-simulation can be computed.
Assuming that co-simulation units are correctly implemented, the configu-
ration problem can be stated as: given a set of co-simulation units and their
interconnections, and a set of properties that the coupled system should satisfy,
find the master algorithm that produces co-simulation results satisfying those
properties (Problem 1 in [18]).

Fig. 1. The ExecRate and PowerBond hints.

Since the correct co-simulation configuration is not available as our reference


oracle, we are forced to rely on the user’s hints as a proxy for the correct set
of properties to satisfy. This assumption of hint correctness is quite strong, but
allows us to guide the search for a correct co-simulation configuration based on
a mapping from these hints to state-of-the-art configuration techniques.

2.2 Workflow
HintCO has four main components, briefly introduced here as part of the HintCO
workflow:

a) HintCO Hint Language: The user first specifies hints about the system by
selecting and configuring built-in hints relevant to the domain of the units
involved.
b) Generation of Candidate Master Algorithms: HintCO automatically
generates candidate co-simulation configurations based on those hints. This
is performed by translating those hints into adaptations on the configura-
tions, using state-of-the-art heuristics.
c) Scheduling the Co-simulation: A co-simulation schedule is then generated
for each candidate configuration using the techniques described in this paper.
d) Execution of the Co-simulation: Finally, the co-simulation variants are
executed in a ranked order (as determined by the hints) and the results
presented to the user for inspection.
Hint-Based Configuration of Co-simulations with Algebraic Loops 5

2.3 Hints

Hints are defined in a small domain-specific language (DSL). DSLs allow experts
in the problem space (the system engineers) to describe hints, without having
to become experts in the solution space (the co-simulation domain) [29].
As an example, Fig. 1 shows the hints exemplified in [18]. The first hint speci-
fies the frequency of a unit, which is useful to find a communication rate between
units, and determines whether a unit represents a time triggered software con-
troller. The second hint defines a power-bond, which declares that energy should
not be lost or gained in the communication between two units.
Each hint has a number of fields. The description field is for unstructured
text, as is commonly seen in industrial requirements. Following this are state-
ments, which can be events or properties. Finally, scopes and patterns specify
when the hint is valid. These scopes and patterns have been sourced from [2]
and have been utilized for verification of safety-critical automotive requirements
in another domain of our work [6].

2.4 Generating a Configuration Search Space

As will be detailed later in Definition 7, a co-simulation configuration (or master


algorithm) has three dimensions in our formalization:

– the rate at which co-simulation units execute;


– the concrete operations or execution order of those units;
– the semantic adaptations (described below) applied to the co-simulation
units.

It is not feasible to explore all possible configurations, so the hints are used
as a way to build a finite ranked list of possible candidate configurations.
Semantic adaptations are a technique to create a new co-simulation unit by
wrapping the old units [17] (also see Definition 4), thereby changing it’s behavior
when inputs are provided, when output are requested, or when time stepping is
performed. Some example semantic adaptations are:

Extrapolation/Interpolation: Applies the approximation to the input port.


Multi-rate: Adapt a co-simulation unit to perform multiple executions per one
larger co-simulation step.
Power-bond: Whenever two units share a power connection, one of the input
ports will correct for the energy dissipated using the technique from [4].
XOR: Is combined with other adaptations to represent alternative configura-
tions.

The following exemplifies a search space.


Example 1. Figure 2a shows the configuration space used in [18]. Possible adap-
tations are shown on each co-simulation unit and port: the Load and Plant
co-simulation units have a PowerBond adaptation on the v and f ports, and
6 B. J. Oakes et al.

the Environment unit has an XorAdaptation with two alternative multi-rate


adaptations.
This space represents four alternative master algorithms, because of the two
possible rates for the Environment unit. These adaptations are represented in
the figure as the execution rate R = {100, 10}, and two possible communication
step sizes H = 1 × 10−7 , 1 × 10−6 .
The key operation of the HintCO framework is to transform the user’s hints
into semantic adaptations, as exemplified in Fig. 2a. This is described in [18,
Procedure 1].
Having a configuration space, HintCO then generates a variant diagram,
as exemplified in Fig. 2b. This diagram reflects the weighting of the variants
as defined by the hints, and each path from root to leave node represents
a co-simulation configuration (a variant). HintCO employs a weighted depth-
first search to traverse this tree and generate the variants for scheduling and
execution.
For example, in Fig. 2b, the search will first select the adaptations of H =
1 × 10−7 for the step-size and then R = 100 for the Environment unit rate, due
to the highest weight. The user can opt for generate all variants, or only the
top n.

(a) Possible adaptations. (b) Variant diagram.

Fig. 2. Case study introduced in [18].

2.5 Scheduling and Execution


To properly configure a co-simulation, HintCO must take a variant, and define
a concrete operation schedule for how the co-simulation units in the scenario
are executed and how values are passed between units. Operation schedules
and their creation are further explored in Sect. 4.2. This schedule must comply
with the requirements imposed by the adaptations chosen in the variant. These
requirements refer to the order in which: inputs can be set; outputs computed;
and time advancement operations performed. Thus, the schedule can be different
for different variants.
Hint-Based Configuration of Co-simulations with Algebraic Loops 7

Fig. 3. Example operation schedule for the co-simulation scenario in Fig. 2a [18].

Figure 3 demonstrates an example of an operation schedule for the co-


simulation scenario in Fig. 2a, as replicated from [18]. The left-hand side of
the figure defines the dependencies of function calls, as given by the interac-
tion between the variant’s adaptations and rules defining a valid co-simulation
configuration (Definition 9). The right-hand side of the figure depicts a schedule
of those operations, as given by a topological ordering of the dependencies.
The execution of the variants by HintCO is performed behind-the-scenes by
the tool, based on the concrete operation schedule automatically produced. The
user receives the co-simulation traces for each variant and can decide whether
to continue with the variant tree search or not. In this way, the variant tree
generation and the scheduling process are hidden to reduce complexity for the
system engineer.
An example trace for the Load co-simulation unit from Fig. 2a is shown on the
left-hand side of Fig. 4 before applying the hints and adaptation. The smoothed
results on the right-hand side of Fig. 4 are the result of the top variant, demon-
strating how HintCO can assist in configuring co-simulations.

(a) Signal before adapation (b) Signal after adapation

Fig. 4. Load signal before and after HintCO adaptations are applied [18].

3 Motivating Example

This example motivates our current work regarding scheduling, as the input/out-
put relationships of the units in the co-simulation form a dependency loop. This
is termed as an algebraic loop.
The version of HintCO proposed in [18] could produce an operation schedule
in the presence of algebraic loops, but HintCO would not consider the dynamics
of each connection in deciding which dependency was the least important and
8 B. J. Oakes et al.

could be removed to break the algebraic loop. As discussed in [19] and Sect. 5.3, a
lower co-simulation error can be achieved by choosing a more appropriate point
to break the loop.

3.1 Example Description

Fig. 5. Example co-simulation network with algebraic loops.

The notion which leads to algebraic loops is feed-through (formalized in Defini-


tion 5), where the output of a co-simulation unit algebraically depends on its
inputs. That is, when the input value of a unit is modified, the connected output
value immediately changes, without the unit executing.
Figure 5 shows an co-simulation scenario from [19]. Feed-through is repre-
sented in Fig. 5 by the dashed arrows within the co-simulation units.
For this motivating example, we consider the case where the user does not
provide sufficient hints for HintCO to break the feed-through dependency loops.
If a dependency graph (such as Fig. 3) was generated by HintCO, the function
calls of these units would produce a graph with a cycle. Then, HintCO would
have to make a decision about the best dependency to break.
In the previous version of HintCO, this decision was performed without con-
sidering the dynamics of the connections. The current work attempts to formalize
this problem and present exact and heuristic solutions, such that HintCO can
be improved to better schedule these co-simulation scenarios.

4 Formalization of Co-simulation Concepts


This section formalizes the key concepts involved in co-simulation configuration,
in a refinement of those presented in our earlier work [18]. In particular, we
recall definitions for co-simulation units and co-simulation configuration. These
formalizations are required to support Sect. 5 which details the problem of co-
simulation scheduling in the presence of algebraic loops.
Hint-Based Configuration of Co-simulations with Algebraic Loops 9

4.1 Co-simulation Units and Relevant Characteristics


The following definitions focus on the concepts of a co-simulation unit and the
relevant characteristics which affect co-simulation behaviour. As with our ear-
lier formalization [18], we consider general co-simulation units in our scheduling
approach. This notion of co-simulation unit is inspired by and includes the Func-
tional Mockup Units (FMUs). As in our earlier work [18], we follow the notations
introduced in [8] and omit the details of initialization.
Definition 1 (Co-simulation Unit). [18, Definition 3]
A co-simulation unit with identifier c is a structure
Sc , Uc , Yc , Rc , setc , getc , doStepc  , where:
– Sc represents the state space;
– Uc and Yc the set of input and output variables, respectively;
– Rc : Uc → {true, false} the reactivity of each input (see Definition 3);
– Dc ⊆ Uc × Yc the set of input/output feed-through dependencies (see
Definition 5);
– setc : Sc × Uc × V → Sc and getc : Sc × Yc → V are functions to set the
inputs and get the outputs, respectively (we abstract the set of values that each
input/output variable can take as V); and
– doStepc : Sc × R≥0 → Sc is a function that instructs the co-simulation unit
to compute its state after a given time duration.
When configuring co-simulations, it is crucial to reason about the current
time of each co-simulation unit. The following definition defines the state times-
tamp for each unit, which the FMI Standard leaves implicit.
Definition 2 (State Timestamp). [18, Definition 4]
Given a communication step size H ∈ R≥0 and H > 0, we say that the state
sc ∈ Sc of an co-simulation unit c has timestamp t, denoted as ϕ(sc ) = t when
doStepc has been called Ht times with H as parameter.
Definition 2 implies that if a co-simulation unit is in state sc at time t, then
doStepc (sc , H) will approximate the state at time t + H. If the correspond-
ing model is a continuous one, then an approximation function will be used to
estimate the values of the inputs in the interval [t, t + H].

Input Approximation Functions. There are two relevant approximation


functions we focus on. There can be an extrapolation on an input, where the
value of a input is calculated forward from the last received value. Otherwise
there can be an interpolation, where an intermediate value is calculated between
the last received value and a value from the sending unit at either the current
timestamp, or a (relative) future timestamp.
Assumptions can be made about relating these approximation functions to
the behaviour of co-simulation units. For example, as mentioned in Sect. 2 the
user can provide a hint that an co-simulation unit represents a software con-
troller. As software controllers rely on data from sampled sensors, the software
10 B. J. Oakes et al.

controllers assume that their input readings are not from a future timestamp.
Therefore, it can be inferred that a software controller is using an extrapolation
approximation function.
As interpolations can only be employed when the sending unit can already
calculated the value, the choice of scheduling of co-simulation units can also
impact which approximation can be used. The interpolation/extrapolation choice
also affects the error of the system, as discussed in Sect. 5.3. Extrapolations
can induce more error in the co-simulation [19], but can be employed to break
algebraic loops as the dependency between units in the same timestep is then
removed.
In our notation, we choose to leave the approximation function implicit in
the doStepc , as reflected in version 2.0 of the FMI Standard. However, we make
explicit the requirements of each kind of input approximation in the form of the
reactivity Rc .
Intuitively, a co-simulation unit c with a reactive input [16] must wait until
the co-simulation unit d, which feeds that input to c, executes a step. Then, c
may receive that input value.

Definition 3 (Reactivity). [18, Definition 5]


For a given co-simulation unit c with input u ∈ Uc , Rc (u) = true if the function
doStepc makes use of an interpolation of input u.
Let t be the timestamp of the state sc prior to a call to doStepc (sc , H), and
let d denote the co-simulation unit whose output y ∈ Yd is connected to u.
 Rc (u) = true means
Then,  that sc must have been produced from a call
to setc . . . , u, getd (sd , y) where the state sd of co-simulation unit d satisfies
ϕ(sd ) = t + H.
Conversely,
 Rc (u) = false
 means that sc must have been produced from a call
to setc . . . , u, getd (sd , y) where ϕ(sd ) = t.

As the FMI Standard version 2.0 does not include information about reac-
tivity, we make the following assumption for all co-simulation units:

Assumption 1. If an co-simulation unit c does not disclose its input approx-


imation scheme for an input u, then we assume that u is approximated with a
constant extrapolation. Therefore, Rc (u) = false.

We employ the technique of semantic adaptation, introduced in Sect. 2.4 to


control the input approximation scheme and reactivity for co-simulation units.

Definition 4 (Semantic Adaptation). [18, Definition 2]


Semantic adaptation is a technique that allows a new co-simulation unit c to be
constructed from a set of co-simulation units, using a custom implementation of
the setc ,getc , and doStepc functions [17].

Feed-Through. The concept of feed-through is crucial for the current work. If


a co-simulation unit has feed-through, then an output value of a co-simulation
unit is a function of the input.
Hint-Based Configuration of Co-simulations with Algebraic Loops 11

Definition 5 (Feed-Through). The input u ∈ Uc of co-simulation unit c


feeds-through to output y ∈ Yc , that is, (u, y) ∈ Dc , when there exists two values
v1 , v2 ∈ V and some state sc ∈ Sc , such that

getc (setc (sc , u, v1 ), y) = getc (setc (sc , u, v2 ), y).

This means that the value of y obtained with getc is an algebraic function of the
value set for u. Hence, getc should be called to get the value of y only after setc
has been called to set the value of u, before doStepc is invoked.

Co-simulation units with feed-through will immediately change output values


when the corresponding input value changes, even without the co-simulation
unit executing a time-step. It is this ‘instant’ change which can form algebraic
loops when multiple co-simulation units have feed-through, as in the motivating
example in Sect. 3.

4.2 Co-simulation Scenario and Master Algorithms


A co-simulation scenario is a collection of co-simulation units and the input/out-
put connections between them. An example of a co-simulation scenario with four
co-simulation units and six connections is shown in Fig. 5 on page 7.

Definition 6 (Co-simulation Scenario). [18, Definition 7]


A co-simulation scenario is a structure C, L where each co-simulation unit
identifier c ∈ C is associated with an co-simulation unit, as defined in Definition
1,
 and L(u) = y  means that the output y is connected to input u. Let U =
U
c∈C c and Y = c∈C Yc , then L : U → Y .

Master Algorithms. A master algorithm is the configuration to compute


the behaviour of a co-simulation scenario. As stated in Definition 7, a master
algorithm combines the co-simulation scenario, the step size, and a scheduling
sequence for the scenario. As described previously in Sect. 2.4, our approach is
to guide a search through the variation of these parameters, which each induce
a different co-simulation behaviour.

Definition 7 (Master Algorithm). [18, Definition 10] Given a co-simulation


scenario C, L, a step size H, and an
 operation schedule
 (f )i∈N , a master algo-
rithm is a structure defined as A = C, L, H, (f )i∈N .

Co-simulation
 Step. The execution of a master algorithm A = C, L, H,
(f )i∈N is thus the application of the operation schedule on the co-simulation
scenario. One application of this sequence is a co-simulation step. Precisely,
executing this schedule in a co-simulation scenario C, L where all co-simulation
units c ∈ C have a state sc satisfying ϕ(sc ) = t, will update each co-simulation
unit’s state sc to satisfy ϕ(sc ) = t + H, where H is the argument of every call to
12 B. J. Oakes et al.

doStep. Repeated co-simulation steps thus advance the state of the co-simulation
scenario, producing a co-simulation behaviour trace.
Readers may note that the definition of operation schedule provided in Def-
inition 8 was referred to as a co-simulation step in [18]. This redefinition was
performed in order to allow the co-simulation step concept to also refer to the
execution of a trigger sequence of co-simulation units, which is further described
in Sect. 5.1.
This presentation omits the handling of hierarchical co-simulation units,
which themselves contain a co-simulation scenario. However, this is accounted for
in our treatment, as we consider the sub-scenario to execute whenever the hier-
archical co-simulation unit itself executes. Thus, we create the schedule for the
top-level elements separately from the schedule for each individual hierarchical
co-simulation unit.

Operation Schedules. In Definition 7 a master algorithm contains an opera-


tion schedule. This operation schedule represents the sequence of function exe-
cution for each co-simulation unit in the scenario. That is, the sequence of oper-
ations get, set, doStep) which are executed on each port of each co-simulation
unit. We formalize this operation schedule concept in Definition 8.

Definition 8 (Operation Schedule). [Modified from Definition 8 of [18]]


Given a co-simulation scenario C, L, an operation schedule is an ordered
sequence of co-simulation unit function calls (f )i∈N with

f ∈F = {setc , getc , doStepc } ,


c∈C

and i denoting the order of the function call. A function call fi comes before a
function call fj , written as fi  fj , if i < j, and comes immediately before,
written as fi → fj , if i = j − 1.

Definition 9 states the restrictions on a well-formed master algorithm, and


how the hints provided to HintCO affect this schedule. For example, if an input
is reactive (it performs an interpolation approximation - Definition 3), then that
input’s get step must occur after the doStep of the preceding co-simulation
unit.

Definition 9 (Valid Master Algorithm). [Modified from Definition 9 of


[18]]
A master algorithm is valid with respect to reactivity and the co-simulation sce-
nario couplings if it satisfies the following conditions:
1. A co-simulation step size H > 0.
2. Each function call uses the most recent co-simulation unit state as parameter.
For example, if fj = getc (sc , y) then sc must be the result of the most recent
call to setc or doStepc , that is, the maximal i such that i < j, and fi =
setc (. . .) or fi = doStepc (. . .).
Hint-Based Configuration of Co-simulations with Algebraic Loops 13

3. For every c ∈ C, there exists one, and only one, call to doStepc , and it is
done with argument H.
4. Each call to doStepc for c ∈ C must come after every call to setc on the
input variables of c.
5. Each call to get is immediately followed by a sequence of calls to set to set
the affected input variables.
6. For each c ∈ C and (u, y) ∈ Dc , any call to getc (y, . . .) must be preceded by
a call to setc (. . . , u) without any call to doStepc in between.
7. For each c ∈ C and u ∈ Uc satisfying Rc (u) = true, doStepd 
getd (L(u), . . .), where L(u) ∈ Yd and d ∈ C.
8. For each c ∈ C and u ∈ Uc satisfying Rc (u) = false, setc (. . . , u)  doStepd ,
where L(u) ∈ Yd and d ∈ C.
Remark 1. Regarding Definition 9:
– The most common master algorithms will satisfy conditions 2–4;
– Condition 5 is not mandatory but it facilitates the description of Conditions
7 and 8. Furthermore, it makes the implementation simpler.
– Conditions 7 and 8 ensure that the reactivity of each input is respected,
according to Definition 3.
• If Rc (u) = true, then the input approximation is interpolated, and the
preceding co-simulation unit must perform doStep before the get call
• If Rc (u) = false, then the input approximation is extrapolated, and the
set call is performed before the preceding co-simulation unit performs
doStep.

Generating an Operation Schedule. A particular variant co-simulation


configuration (discussed in Sect. 2.4) could define interpolation or extrapola-
tion adaptations on co-simulation units or their input ports. These adaptations
interact with the rules defined in Definition 9, which specify the dependencies
between the function calls in the operation schedule. This then induces a depen-
dency graph of the function calls in the co-simulation scenario. An example of
these ordering dependencies is demonstrated on the left-hand side of Fig. 3 on
page 3. In this dependency graph, the operation at the tail of an edge must be
executed before the operation at the head of an edge.
The dependency graph in Fig. 3 does not contain any cycles, due to the lack
of feed-through in the co-simulation scenario (shown in Fig. 2a). A topological
sort is therefore sufficient to generate an operation schedule to execute the co-
simulation units, as seen on the right-hand side of Fig. 3.
This operation schedule approach allows for a great deal of flexibility in the
concrete order of operations, as all topological orderings are considered to be
behaviourally equivalent. A Prolog-based algorithm for specifying co-simulation
scenarios and determining a valid operation schedule is presented in [12].
However, if cycles are present in this dependency graph (as in the motivat-
ing example in Sect. 3), the cycle will need to be broken to produce an opera-
tion schedule. As this cycle breaking produces errors (due to the extrapolation
approximation used), an optimization approach is required to determine the best
scheduling, as discussed in the following sections.
14 B. J. Oakes et al.

5 Scheduling with Algebraic Loops


This section will detail our approach to scheduling co-simulation scenarios with
algebraic loops. This approach is based on co-simulation trigger sequences, which
are an intuitive scheduling of co-simulation units at a high level. We also present
how trigger sequence can be transformed into operation schedules to be exe-
cuted by HintCO. Third, the cost function for a trigger sequence is defined,
determined by the connections within the co-simulation scenario. Finally, we
discuss a directed search approach to calculating the optimal trigger sequence.

5.1 Trigger Sequences


As described in Sect. 4.2, execution of a co-simulation scenario requires the pro-
duction of an operation schedule, which details the precise sequence of function
calls within the scenario. However, another (possibly more intuitive and more
elegant) approach is to define a trigger sequence for the co-simulation scenario,
as is done in [19]. Following this trigger sequence, each co-simulation unit would
be visited and executed in turn, with input and output approximation and prop-
agation handled as required.
The motivation for defining and utilizing trigger sequences is therefore to
consider co-simulation scenarios at an abstract level. The presence of algebraic
loops leads to a ‘strong component’ notion, where co-simulation units must be
reasoned about as one entity. In particular, the problem statement in Sect. 5.3
deals with co-simulation units, not their individual function calls.

Example and Definition. Consider the motivating example co-simulation sce-


nario in Fig. 5, which contains four co-simulation units S1, S2, S3, and S4. There
are 24 different permutations of these units, and therefore 24 possible trigger
sequences (Definition 10) can be created, such as {S1, S2, S3, S4} or {S2, S4,
S3, S1}.
Definition 10 (Trigger Sequence). Given a co-simulation scenario C, L,
trigger sequence is an ordered sequence of co-simulation unit executions (ci ) with
c ∈ C and i denoting the order of the co-simulation unit execution.

5.2 Transformation to Operation Schedule


The definition of a master algorithm in Definition 7 contains a schedule of func-
tion calls on the co-simulation units. Therefore, a transformation from a trigger
sequence to an operation schedule is required for co-simulation execution.
This transformation must respect the constraints defined in Definition 9 for
a valid master algorithm. In particular, condition 5 must be followed, in which
each call to get an output is immediately followed by a call to set for the
associated input.
A trigger sequence is thus transformed into an operation schedule by
Procedure 1.
Another random document with
no related content on Scribd:
Westermarck that he had suffered from painful boils through entering
a granary in a state of uncleanness.57.1 The same rule applies in
Morocco to a vegetable garden. Only the sexually clean may enter it,
otherwise both the vegetables and the person entering would be the
worse for it.57.2
The Dinkas of the Upper Nile believe that incest
Incest supposed by angers the ancestral spirits (jok), who punish the
the Dinkas to be
punished with girl by making her barren. Even should she marry,
sterility. she will have no children until she has confessed
her sin, and atonement has been made for it. Her
lover must provide a bullock for sacrifice. His father kills the animal,
and the girl’s father takes some of the contents of the large intestine
and smears it on his daughter’s abdomen and on that of her guilty
partner. Thus the taint of sin is removed, and the woman is rendered
capable of bearing children.57.3 The Maloulekes and Hlengoues, two
tribes of Southern Africa to the north of the Thonga, think that if a
young man gets a girl, who is not his wife, with child, people will die
in the village. Hence, when the girl’s pregnancy is discovered, the
lover has to provide a girl by way of fine.57.4
It is very remarkable, however, that among
Incest enjoined in tribes which strongly disapprove of incestuous
certain cases as a
mode of ensuring relations in general, the act of incest is
good luck. nevertheless positively enjoined in certain
circumstances as a mode of ensuring good luck.
Thus in the Thonga tribe of South-Eastern Africa, round about
Delagoa Bay, there is a class of men who devote themselves to the
business of hunting hippopotamuses on the rivers. In the pursuit of
their trade they observe a number of curious superstitions which
have been handed down among them for generations from father to
son. For example, they inoculate themselves with a certain drug
which is supposed to endow them with such a power over the
hippopotamuses that when the hunter wounds one of them the
animal cannot go far away and the man can track and despatch it.
During the day the hunter fishes in the river, keeping his eye all the
time on the unwieldy monsters disporting themselves in the water or
lumbering through the thickets on the banks. “When he sees that the
propitious season has come and when he is ready to undertake a
hunting expedition of one month, he first calls his
Incest of Thonga own daughter to his hut and has sexual relations
hippopotamus
hunter with his with her. This incestuous act, which is strongly
daughter. taboo in ordinary life, has made of him a
‘murderer’: he has killed something at home; he
has acquired the courage for doing great deeds on the river.
Henceforth he will have no sexual relations with his wives during the
whole campaign. On the same night, immediately after the act, he
starts with his sons; they close the drift where the beasts leave the
river by putting a canoe across the track.” Meantime the
hippopotamuses are browsing in the forest or trampling down the
crops of the fields in their clumsy fashion. As they come trooping
back to the river they are stopped by the canoe in the path, and
while they are examining the strange obstacle, the hunters, lying in
ambush, dart their spears into the thick hides of the beasts. The
handles of the spears are loosely attached to the blades, but
connected with them by a long string, so that when the wounded
monster, crashing irresistibly in his rage through the thicket, plunges
into the river and sinks out of sight in the water, the handle of the
spear becomes detached from the blade and floats like a buoy on
the surface, shewing the direction taken by the beast. As soon as the
hunter has thrown his spear he runs home to tell his wife. She must
at once shut herself up in the hut and remain perfectly quiet, without
eating or drinking or crushing her mealies; for were she to do any of
these things, the wounded hippopotamus would shew fight and
might kill her husband, whereas if she keeps quiet, the animal will be
quiet too. All the hunters in the village are then called up, and
embarking in a canoe, paddle away after their prey, whose retreat is
marked by the bobbing of the spear-handle on the surface of the
water and the occasional emergence of a great flat snout to breathe.
When the beast has been despatched, and the carcase landed on
the bank, it is turned on its back and the hunter creeps between its
legs from behind and along its belly and chest as far as the mouth.
Then he goes away. By this ceremony the man is supposed to take
upon himself the defilement, possibly the nature, of the animal, so
that in future when he meets hippopotamuses the animals will not
perceive him to be a man but will mistake him for an hippopotamus;
and thus he will be able to slaughter the deluded creatures with
impunity.59.1
So far as we can guess at the meaning of these
Suggested curious rites, their general intention seems to be to
explanation of the
Thonga practice. identify the hunter and his family with the game
which he hunts in order to give him full power over
the animals. This intention is manifested in the behaviour of the
hunter’s wife while the hippopotamus is wounded; she so far
identifies herself with the animal that whatever she does he is
supposed to do. If she goes about her work briskly and refreshes
herself with food and drink, the hippopotamus also will be brisk and
refreshed, and will give warm work to his pursuers; whereas if she
keeps perfectly still, the animal will make no resistance but follow the
hunters like a sheep to the slaughter. Perhaps the same train of
thought partially explains the incest which the hunter has to commit
with his own daughter before he sets out for the chase. Can it be that
by this violence done to his offspring he is supposed to acquire
power over the beast? It may be so, yet it is difficult to see why the
violence should take this particular form, and why, on the principles
of homoeopathic or imitative magic, a pretence of wounding and
killing the girl with a spear would not have served his turn better.
Another tribe of savages who imagine that in
Incest prescribed certain circumstances incest is the road to fortune
among the
Antambahoaka of are the Antambahoaka of South-Eastern
Madagascar. Madagascar. Before setting out for the chase or
the fishing or war or other enterprise, every
Antambahoaka arranges to have sexual relations with his sister or
with his nearest female relation; he thinks in this way to ensure the
success of his expedition.59.2 What the exact train of thought may be
which prompts these exceptional and deliberate aberrations from the
usual rules of morality, it is difficult to understand; I mention the facts
because they apparently contradict the ordinary savage view of
conduct, and so far help us to perceive how little as yet we really
know about the inmost workings of the savage mind.
Leaving out of account these remarkable and as
Similar beliefs as to
the disastrous effect
yet not fully explained exceptions to the rule,60.1
of sexual crimes we may say generally that among many savage
among the civilized races breaches of the marriage laws are believed
peoples of antiquity.
to draw down on the community public calamities
of the most serious character, and that in particular they are thought
to blast the fruits of the earth through excessive rain or excessive
drought. Traces of similar beliefs may perhaps be detected among
the civilized races of antiquity. Thus among the
The Hebrews. Hebrews we read how Job, passionately
protesting his innocence before God, declares that
he is no adulterer; “For that,” says he, “were an heinous crime; yea it
were an iniquity to be punished by the judges: for it is a fire that
consumeth unto Destruction, and would root out all mine
increase.”60.2 In this passage the Hebrew word translated “increase”
commonly means “the produce of the earth”;60.3 and if we give the
word its usual sense here, then Job affirms adultery to be destructive
of the fruits of the ground, which is precisely what many savages still
believe. This interpretation of his words is strongly confirmed by two
narratives in Genesis, where we read how Sarah, Abraham’s wife,
was taken by a king into his harem, and how thereafter God visited
the king and his household with great plagues, especially by closing
up the wombs of the king’s wife and his maid-servants so that they
bare no children. It was not till the king had discovered and
confessed his sin, and Abraham had prayed God to forgive him, that
the king’s women again became fruitful.61.1 These narratives seem
to imply that adultery, even when it is committed in ignorance, is a
cause of plague and especially of sterility among women. Again, in
Leviticus, after a long list of sexual crimes, we read:61.2 “Defile not ye
yourselves in any of these things: for in all these the nations are
defiled which I cast out from before you: and the land is defiled:
therefore I do visit the iniquity thereof upon it, and the land vomiteth
out her inhabitants.” This passage seems to imply that the land itself
was somehow physically affected by sexual transgressions in such a
way that it could no longer support the inhabitants.
The Greeks. Apparently the ancient Greeks entertained a
similar view of the wasting effect of incest; for
according to Sophocles the land of Thebes suffered from blight,
pestilence, and the sterility both of women and cattle under the reign
of Oedipus, who had unwittingly slain his father and married his
mother; the country was emptied of its inhabitants, and the Delphic
oracle declared that the only way to restore prosperity to it was to
banish the sinner.61.3 No doubt the poet and his hearers set down
these public calamities in part to the guilt of parricide which rested on
Oedipus; but probably they also laid much of the evil at the door of
the incest which he had committed with his mother. In the reign of
the emperor Claudius a Roman noble was
The Romans. accused of incest with his sister. He committed
suicide, his sister was banished, and the emperor
ordered that certain ancient ceremonies derived from the laws of
King Servius Tullius should be performed, and that expiation should
be made by the pontiffs at the sacred grove of Diana.61.4 As Diana
appears to have been a goddess of fertility in general and of the
fruitfulness of women in particular,62.1 the expiation for incest offered
at her sanctuary may perhaps be accepted as evidence that the
Romans, like other peoples, attributed to sexual immorality a
tendency to blast the fruits both of the earth and of the womb.
According to an ancient Irish legend Munster
Blighting effect was afflicted in the third century of our era with a
attributed to incest
by the ancient Irish. failure of the crops and other misfortunes. When
the nobles enquired into the matter, they learned
that these calamities were the result of an incest which the king had
committed with his sister. In order to put an end to the evil they
demanded of the king his two sons, the fruit of this unholy union, that
they might consume them with fire and cast their ashes into the
running stream.62.2 Again, Irish legend relates that Cairbre Musc
“had two sons by his sister. Her name was Duben, and theirs were
Corc and Cormac respectively. The children were twins, and the
story of their birth is no less strange than that of Dylan and Llew, for
one of them was found to have nipped off his brother’s ears before
his birth. The crime of their parents caused the crops to fail, which,
according to the idea prevalent in ancient Ireland, was its natural
result, and Cairbre was obliged to confess his guilt to the nobles of
his realm, who, when the children were born, ordered them to be
burnt, that the incest might not remain in the land. ‘Give me,’ said
Cairbre’s druid, ‘that Corc62.3 there, that I may place him outside
Erinn, so that the incest may not be within it.’ Corc was given to the
druid, and the latter, with his wife, whose name was Bói, took him to
an island. They had a white cow with red ears, and an ablution was
performed by them every morning on Corc, placed on the cow’s
back; so in a year’s time to the day the cow sprang away from them
into the sea, and she became a rock in it; to wit, the heathenism of
the boy had entered into her. Bó Búi, or Bói’s Cow, is the name of
the rock, and Inis Búi, or Bói’s Isle, that of the island. The boy was
afterwards brought back into Erinn. Such is the story how Corc was
purged of the virulence of his original sin, and the scene is one of the
three islets called the Bull, the Cow and the Calf, not far from Dursey
Island, in the gulf called Kenmare River.”63.1
Thus it appears that in the opinion of many
Thus sexual peoples sexual irregularities, whether of the
irregularities are
often supposed to married or the unmarried, are not merely moral
endanger the whole offences which affect only the few persons
community. immediately concerned; they are believed to
involve the whole people in danger and disaster
either directly by a sort of magical influence or indirectly by rousing
the wrath of gods to whom these acts are offensive. Nay they are
often supposed to strike a blow at the very existence of the
community by blighting the fruits of the earth and thereby cutting off
the food supply. Wherever these superstitions prevail, it is obvious
that public opinion and public justice will treat sexual offences with
far greater severity than is meted out to them by peoples who, like
most civilized nations, regard such misdemeanours as matters of
private rather than of public concern, as sins rather than crimes,
which may perhaps affect the eternal welfare of the individual sinner
in a life hereafter, but which do not in any way imperil the temporal
welfare of the innocent community as a whole.
Hence the extreme And conversely, wherever we find that incest,
rigour with which
sexual crimes have adultery, and fornication are treated by the
been punished by community with extreme rigour, we may
many races. reasonably infer that the original motive for such
treatment was superstition; in other words, that
wherever a tribe or nation, not content with leaving these
transgressions to be avenged by the injured parties, has itself
punished them with exceptional severity, the reason for doing so has
probably been a belief that the effect of all such delinquencies is to
disturb the course of nature and thereby to endanger the whole
people, who accordingly must protect themselves by effectually
disarming and, if necessary, exterminating the delinquents. This may
explain, for example, why the Indian Laws of Manu
Ancient codes. decreed that an adulteress should be devoured by
dogs in a public place, and that an adulterer
should be roasted to death on a red-hot iron bed;64.1 why the
Babylonian code of Hammurabi sentenced an adulterous couple to
be strangled and cast into the river; and why the same code
punished incest with a mother by burning both the culprits.64.2 On the
same supposition we can understand the severity of the
punishments meted out to certain sexual offences by the Mosaic law.
Thus, for example, under it an adulteress and her paramour were
sentenced to death:64.3 a woman who at marriage was found not to
be a maid was stoned:64.4 the unchaste daughter of a priest was
burned with fire;64.5 and if a man married a woman and her daughter,
he and they were in like manner doomed to the flames.64.6
Many African tribes repress sexual crimes by
Rigorous penalties rigorous penalties, or did so until their moral
inflicted in Africa.
standard was modified by contact with Europeans.
Among the Baganda of Central Africa, “though
The Baganda, their death was usually the punishment inflicted for
punishments for
breaches of sexual adultery, an offender’s life would sometimes be
morality. spared, and he be fined two women, if he were
able to pay them; the culprit was, however,
maimed; he lost a limb, or had an eye gouged out, and showed by
his maimed condition that he had been guilty of a crime. A slave
taken in adultery with one of his master’s wives was invariably put to
death. Women were compelled by torture to name their seducers; if
the accused man denied the charge, the woman was asked to
describe some personal peculiarity of his, or some mark on his body
which could be identified; then if the man was found to have the
peculiarity, he was either fined or put to death. In order to arrive at
the truth, a man who denied a charge made against him was
sometimes stretched out with his arms and feet tied to stakes driven
firmly into the ground, a piece of barkcloth was then fastened about
his private parts, and set smouldering. As soon as the fire reached
his body, the pain became too great to bear, and the man would own
himself guilty in order to be released from torture. He would then be
either killed or fined. An adulterer was called a murderer (musi),
because he was looked upon as a man who deliberately set about to
compass the death of the woman’s husband; either directly, for he
would go armed to visit the woman, and if he was disturbed, he
would not hesitate to strike; or indirectly, by offending the fetiches.
Men knew that, if they were caught in the act of adultery, the penalty
would be death, unless they were related to the person wronged, in
which case the latter might be willing to accept a fine, and might
content himself with mutilating the culprit. The worst consequence to
the injured husband was the anger of his fetiches and gods, whose
custodian was his wife. By her action the wife had involved her
husband in their displeasure; he was thus left exposed to the malice
of any enemy, and his danger was increased in the time of war,
because the gods had withdrawn their protection from him.”65.1 Thus
among the Baganda adultery was regarded not simply as a civil
offence but as a sin, which brought down the anger of the gods, not
as we might expect, on the adulterer, but on the injured husband.
Further, the Baganda were divided into a number of totemic clans,
and members of any one clan were strictly prohibited from marrying
or having sexual relations with each other. “Sexual intercourse with a
member of the same clan (kive), or with a woman of the mother’s
clan, was punished by the death of both parties, because they were
considered to have brought the god’s displeasure on the whole
clan.”65.2
Among the Basoga, who border on the Baganda
Fornication, to the east, when a man got a virgin with child, the
adultery, and incest
severely punished guilty couple used to be dragged off to the River
by other African Ntakwe; there stones were tied to their ankles and
tribes. legs, and, along with a sacrificial sheep, they were
thrown into the water and drowned. However, this
rigorous penalty was abolished and a fine substituted before the
country came under British rule.65.3 Among the Kavirondo, who
border on the Basoga to the east, “until quite recently adultery on the
part of a wife was punished with death, and death equally was meted
out to young men and girls who were found guilty of fornication. It
was thought a shameful thing if a girl was not found to be a virgin on
her wedding day.”66.1 Among the Nandi, who border on the
Kavirondo to the north-east, “incest, intercourse with a step-mother,
step-daughter, cousin or other near relation, is punished by what is
known as injoket. A crowd of people assemble outside the house of
the culprit, who is dragged out, and the punishment is inflicted by the
women, all of whom, both young and old, strip for the occasion. The
man is flogged, his houses and crops destroyed, and some of his
stock confiscated.”66.2 Among the Barea, a tribe on the borders of
Abyssinia, when a single woman, whether maid or widow, is found
with child, she is strangled by her father or brother, and the same
punishment is inflicted on her seducer; the child of their unlawful
union is stabbed. This custom is rigorously carried out, except when
the seducer is a noble and his paramour a vassal; in that case both
are spared, but the infant is killed.66.3 Among the Beni Amer, another
tribe of the same region, an unmarried girl found pregnant is put to
death by her own brother, whatever her rank, and the seducer is
killed by his own brother; the child also is slain. But the law is not so
severe on a widow or divorced wife who is detected in a slip; her
seducer has only to pay a fine; but the child is buried alive. The Beni
Amer will not suffer a bastard to live.66.4 Among the Anyanja of
British Central Africa adultery was punished by drowning and
shooting. If one of the culprits was a chief’s wife, she was tied to her
paramour, and the pair were then thrown into a river to drown or left
in the open space of the village to die of hunger and exposure. A
man who had committed a rape was bound, weighted with stones,
and cast into the lake.66.5 Among the Awemba of Northern Rhodesia,
when a husband detected his wife in the act of adultery, he killed
both her and her partner in guilt. For such execution he might not be
indicted for murder or manslaughter. He would merely return the
blood-stained spear to the woman’s father, who by his words in the
marriage ceremony, “You shall spear the man who lusts after your
wife,” was estopped from taking vengeance for the death of his
daughter. If the husband spared the erring couple and the wife was
again taken in adultery, the villagers themselves decreed the
punishment. The unfaithful wife and her lover were dragged outside
the village and impaled on sharp stakes amid the taunts and jeers of
the bystanders, who only desisted from their mockery when death
had stilled the writhing agony of the sufferers.67.1 “The Hottentots,”
says an old writer, “allow not marriages between first or second
cousins. They have a traditionary law, which ordains, that both man
and woman, so near to each other in blood, who shall be convicted
of joining together either in marriage or fornication, shall be cudgel’d
to death. This law, they say, has prevail’d through all the generations
of ’em; and that they execute it at once, upon a conviction, without
any regard to wealth, power or affinity.”67.2
We have seen that in the East Indies sexual
Incest and adultery crimes, particularly incest, adultery, and
severely punished
in the East Indies. fornication, are often viewed with grave
displeasure because they are believed to draw
down the wrath of the higher powers on the whole community.
Hence it is natural that such offences should be treated as high
treason and the offenders punished with death. A common
punishment is drowning. For example, when incest between a parent
and a child or between a brother and a sister has been detected
among the Kubus, a primitive aboriginal tribe of Sumatra, the culprits
are enclosed in a large fish-trap, made of rattan or bamboo, and
sunk in a deep pool of the river. However, they are not pinioned; nay,
they are even furnished with a tin knife, and if they can cut their way
out of the trap, rise through the bubbling water to the surface, and
swim ashore, they are allowed to live.68.1 In the island of Bali incest
and adultery are punished by drowning; the criminals are sewed up
in a sack half-filled with stones and rice and cast into the sea. A like
doom is incurred by a woman who marries a man of a lower caste;
but sometimes she dies a more dreadful death, being burnt alive.
Both modes of execution may be adopted in order
Modes of execution to avoid shedding the blood of the sinners; for in
adopted which
avoid the shedding Bali, the ordinary way of despatching a criminal is
of blood. to stab him to the heart with a creese (kris) or
crooked Malay sword.68.2 In the island of Celebes,
as we saw, the blood of persons who have been guilty of certain
sexual crimes is believed to blast the ground on which it falls;68.3 so
that it is natural in their case to resort to a bloodless mode of
execution such as drowning or burning. In Mamoedjoe, a district on
the west coast of Celebes, the incest of a father with his daughter or
of a brother with his sister is punished by binding the culprits hand
and foot, weighting them with stones, and flinging them into the
sea.68.4 Among the Bugineese of Southern Celebes persons of
princely rank who have committed this crime are placed on a raft of
bamboos and set floating away out to sea.68.5 In
Persons guilty of
incest buried alive.
Semendo, a district of Sumatra, the punishment
for incest and murder used to be to bury the
criminals alive. Before they were led to their doom, it was customary
for the villagers to feast them, every family killing a fowl for the
purpose. Then the whole population escorted the culprits to their
grave outside the village and saw the earth shovelled in upon them.
In the year 1864, at the village of Tandjong Imam, this doom was
executed on a man and his deceased wife’s sister, with whom he
had been detected in an intrigue. “Great was my emotion and
indignation,” said the humane Dutch governor, “when I stood by the
grave of these poor wretches along with the unworthy chiefs who
had sat on the bench of justice during the enforced absence of
Pangeran Anom and pronounced this sentence. I told them in plain
language that judges who pronounced such a sentence of death on
grounds so trivial (the request of the family concerned) deserved
themselves to undergo the same punishment.” The Dutch
Government has since issued stringent orders that no one
henceforth is to be buried alive, and has threatened with death any
person who shall dare to disregard its orders.69.1 The same
punishment for incest is, or used to be, inflicted by the Pasemhers,
another tribe of Sumatra, but more merciful than the people of
Semendo they gave the culprits at least a chance for their life. The
guilty pair were bound back to back and buried in a deep hole, but
from the mouth of each a hollow bamboo communicated with the
upper air; and if when the grave was opened after seven days the
wretches were found to have survived a prolonged agony far worse
than death, they were granted their life.69.2 Nor was even this
dreadful fate the worst that could befall the sinner who broke the
rules of sexual morality in Sumatra. The Battas or
Adulterers killed Bataks of Central Sumatra condemned an
and eaten.
adulterer to be killed and eaten; strictly speaking
he should be speared to death first and eaten afterwards, but as the
injured husband and his friends were commonly the judges and
executioners, it sometimes happened that, passion proving too
strong for a strict adherence to the letter of the law, they cut the flesh
from his living body, ate it, and drank his blood, before it occurred to
them to terminate his sufferings by a spear-thrust. However, an
adulterer occasionally escaped with his life on the payment of a fine,
always provided that his accomplice was not the wife of a chief; for in
that case there was no help for it but he must be killed and eaten.69.3
Even trivial misdemeanours or acts which we should deem
perfectly innocent may draw condign punishment on the thoughtless,
the imprudent, the light-hearted in the Indian Archipelago. Thus we
read that in the island of Lombok “the men are
Extreme severity of exceedingly jealous and very strict with their
the code of sexual
morality in Lombok. wives. A married woman may not accept a cigar or
a sirih leaf from a stranger under pain of death. I
was informed that some years ago one of the English traders had a
Balinese woman of good family living with him—the connexion being
considered quite honourable by the natives. During some festival this
girl offended against the law by accepting a flower or some such
trifle from another man. This was reported to the Rajah (to some of
whose wives the girl was related), and he immediately sent to the
Englishman’s house ordering him to give the woman up as she must
be ‘krissed.’ In vain he begged and prayed, and offered to pay any
fine the Rajah might impose, and finally refused to give her up
unless he was forced to do so. This the Rajah did not wish to resort
to, as he no doubt thought he was acting as much for the
Englishman’s honour as for his own; so he appeared to let the matter
drop. But some time afterwards he sent one of his followers to the
house, who beckoned the girl to the door, and then saying, ‘The
Rajah sends you this,’ stabbed her to the heart. More serious
infidelity is punished still more cruelly, the woman and her paramour
being tied back to back and thrown into the sea, where some large
crocodiles are always on the watch to devour the bodies. One such
execution took place while I was at Ampanam, but I took a long walk
into the country to be out of the way till it was all over.”70.1
As the Malay peoples of the Indian Archipelago,
The severity of the from whom the foregoing examples are drawn,
code based at
bottom on have reached a fair level of culture, it might
superstition. perhaps be thought that the extreme severity with
which they visit offences against their code of
sexual morality springs from an excessive refinement of feeling
rather than from a crude superstition; and no doubt it may well
happen that extreme sensitiveness on the point of honour, of which
the Malays are susceptible, contributes in many cases to sharpen
the sword of justice and add fresh force to the stroke. Yet under this
delicacy of sentiment there appears to lie a deep foundation of
superstition, as we may see by the extraordinary and disastrous
influence which in the opinion of these people sexual crime exerts,
not so much on the criminals themselves, as on the whole realm of
nature, drawing down deluges of rain from the clouds till the crops
rot in the fields, shaking the solid earth beneath men’s feet, and
blowing up into flames the slumbering fires of the volcano, till the sky
is darkened at noon by a black canopy of falling ashes and illumined
at night by the sullen glow of the molten lava shot forth from the
subterranean furnace.71.1 And however much an
A similar severity in
sexual matters
over-refinement of feeling may be invoked to
observed among explain the more than Puritanical severity of the
the Australian Malay moral code in sexual matters, no such
aborigines, the
lowest of existing explanation can be applied to the like emotion of
savages. horror which similar offences excite among the
savage aborigines of Australia, the lowest and the
least refined probably of all the races of men about whom we
possess accurate information. These rude savages also treated with
rigorous severity all breaches of that widely ramified network of
prohibitions in which throughout the Australian continent, before it fell
under English rule, the two sexes lived immeshed. The whole
community of a tribe or nation was commonly subdivided into a
number of minute bodies, which we are accustomed to call classes
or clans according to the principle on which they were variously
constituted. No man might marry a woman of his own class or clan,
and in most tribes his freedom of choice was still further limited by
complex rules of marriage and descent which excluded him from
seeking a wife in many more subdivisions of the tribe, and
sometimes compelled him to look for her only in one out of them all.
And the ordinary penalty for any violation of these rules was death.
The offender was lucky who escaped with his life and a body more
or less riddled with spear wounds. Thus one who
Severe knew the aborigines of Victoria well in the old
punishments
inflicted for sexual days, before they were first contaminated and then
offences among the destroyed by contact with European civilization,
aborigines of tells us that “no marriage or betrothal is permitted
Victoria.
without the approval of the chiefs of each party,
who first ascertain that no ‘flesh’ relationship exists, and even then
their permission must be rewarded by presents. So strictly are the
laws of marriage carried out, that, should any signs of affection and
courtship be observed between those of ‘one flesh,’ the brothers, or
male relatives of the woman beat her severely; the man is brought
before the chief, and accused of an intention to fall into the same
flesh, and is severely reprimanded by the tribe. If he persists, and
runs away with the object of his affections, they beat and ‘cut his
head all over’; and if the woman was a consenting party she is half
killed. If she dies in consequence of her punishment, her death is
avenged by the man’s receiving an additional beating from her
relatives. No other vengeance is taken, as her punishment is legal. A
child born under such conditions is taken from the parents, and
handed over to the care of its grandmother, who is compelled to rear
it, as no one else will adopt it. It says much for the morality of the
aborigines and their laws that illegitimacy is rare, and is looked upon
with such abhorrence that the mother is always severely beaten by
her relatives, and sometimes put to death and burned. Her child is
occasionally killed and burned with her. The father of the child is also
punished with the greatest severity, and occasionally killed. Should
he survive the chastisement inflicted upon him, he is always
shunned by the woman’s relatives, and any efforts to conciliate them
with gifts are spurned, and his presents are put in the fire and
burned. Since the advent of the Europeans among them, the
aborigines have occasionally disregarded their admirable marriage
laws, and to this disregard they attribute the greater weakness and
unhealthiness of their children.”72.1
Again, in the Wakelbura tribe of eastern
Severe Queensland the law was extremely strict as to
punishments
inflicted for sexual unlawful connexions or elopements between
offences in the persons too nearly related to each other. Such
Wakelbura tribe of persons might be, for example, those whom we
Queensland.
call cousins both on the father’s and the mother’s
side, as well as those who belonged to a forbidden class. If such a
man carried off a woman who had been betrothed to another, he
would be pursued not only by the male relations of the woman and of
her betrothed husband, but also by the men of his own tribal
subdivision, whom he had outraged by his breach of the marriage
law; and wherever they overtook him, he would have to fight them
all. His own brothers would challenge him to fight by throwing
boomerangs or other weapons at him; and if he did not accept the
challenge, they would turn on the woman and cripple or kill her with
their weapons, unless she could escape into the bush. Nay, the
woman’s own mother would cut and perhaps slay her with her own
hands. Sooner or later the ravisher had to engage in single combat
with the man he had injured. Both were fully armed with shield,
spear, boomerang and knife. When they had exhausted their
missiles, they closed on each other with their knives, a dense ring of
blacks generally forming round the combatants to see fair play. In
such a fight the man who had broken the tribal law always came off
worst; for even if he got the better of his adversary, the other men
and even his own brothers would attack him and probably gash him
with their knives. Fatal stabs were sometimes given in these fights,
but more usually, it would seem, the onlookers interfered and
wrested the weapons from the two combatants before they
proceeded to extremities. In any case the woman who had eloped
was terribly mauled with knives, and if she survived the ordeal was
restored to the man whom she had deserted.73.1
Among the tribes in the central parts of North-West Queensland, if
a man eloped with a single woman whom he might lawfully marry,
but who for any reason was forbidden to him by
Severe punishment the tribal council, he had on returning to camp with
inflicted for sexual
offences among the his wife to run the gauntlet of the outraged
aborigines of other community, who hacked his buttocks and
parts of Australia. shoulders with knives, beat his head and limbs
with sticks and boomerangs, and pricked the
fleshy parts of his thighs with spears, taking care, however, not to
inflict fatal injuries, lest they should incur blood revenge. But if the
woman with whom the man had eloped was of a class into which he
might not marry, both the culprits were put to death, the relations on
both sides tacitly consenting to the execution.74.1 In the Yuin tribe of
New South Wales, if a man eloped with a woman of his own tribal
subdivision, all the men would pursue him; and if he refused to give
the woman up, the sorcerer of the place would probably say to his
men, “This man has done very wrong, you must kill him”; whereupon
somebody would thrust a spear into him, his relatives not interfering
lest the same fate should befall them.74.2 The same punishment was
inflicted for the same offence by the Wotjobaluk tribe of North-
Western Victoria; but their western neighbours, the Mukjarawaint
tribe, not content with killing the guilty man, cut off the flesh off his
thighs and upper arms, roasted and ate it, his own brother partaking
of the cannibal meal. As for the rest of the body, they chopped it up
small and left it lying on a log. The same custom is said to have been
observed by the Jupagalk tribe.74.3 Among many tribes of Western
Australia, as well as of other parts of that continent, persons who
bear the same class-name may not marry. Any such marriage is
regarded as incest and rigorously punished. For example, “the union
of Boorong and Boorong is to the natives the union of brother and
sister, although there may be no real blood relationship between the
pair, and a union of that kind is looked upon with horror, and the
perpetrators very severely punished and separated, and if the crime
is repeated they are both killed.”74.4 On the other side of the
continent the Kamilaroi of New South Wales similarly inflicted
condign punishment on both the culprits who persisted in marrying
each other contrary to the tribal law; the male relations of the man
killed him, and the female relations of the woman killed her. The
Kamilaroi of the Gwydir River went further; they killed any man who
so much as spoke to or held any communication
Penalty of death
inflicted for the
with his mother-in-law,75.1 for one of the most
crime of speaking tostringent laws of savage etiquette is that which
a mother-in-law. prohibits any direct social intercourse between a
man and his wife’s mother. The law has been
variously explained,75.2 but a large body of evidence points to the
conclusion that this custom of mutual avoidance is simply a
precaution to prevent improper relations between the two. Hence a
brief consideration of it is appropriate in this place; for to all
appearance the custom, though it may be wholesome and beneficial
in practice, has originated purely in superstition. But before giving my
reasons for thinking so it may be well, for the sake of those who are
unfamiliar with savage etiquette, to illustrate the practice itself by a
few examples.75.3
Speaking of the Boloki, a Bantu tribe of the
The custom of Upper Congo, an experienced missionary, the
avoiding a mother-
in-law and other Rev. John H. Weeks, writes as follows: “Perhaps
relations by this will be the best place in which to make a few
marriage among the remarks on the mother-in-law. She and her son-in-
Boloki of the
Congo. law may never look on each other’s face. I have
often heard a man say, ‘So-and-so, your mother-
in-law is coming,’ and the person addressed would run into my
house and hide himself until his wife’s mother had gone by. They can
sit at a little distance from each other, with their backs to one
another, and talk over affairs when necessary. Bokilo means mother-
in-law, daughter-in-law, brother-in-law, father-in-law, sister of mother-
in-law, brother of father-in-law, wife of wife’s brother, and in fact any
relation-in-law. Bokilo, the noun, is derived from kila = to forbid,
prohibit, taboo, and indicates that all bearing the relationship of
bokilo can have no intimate relationship with one another, for it is
regarded as incestuous; and it is according to native ideas just as
wrong for a daughter-in-law to speak or look at her husband’s father,
as for the son-in-law to speak or look at his wife’s mother. Some
have told me that this was to guard against all possibility of
cohabitation, ‘For a person you never look at you never desire.’
Others have said, ‘Well, don’t you see, my wife came from her
womb.’ I am strongly inclined to the opinion that the former is the real
reason.”76.1
From this statement it appears that a man and his wife’s mother
are not the only persons who are bound to avoid each other in
society; the same rule of social avoidance is incumbent on a man
and his son’s wife, and on many other persons of opposite sex who
are connected with each other by marriage; and in regard to all such
persons it is held that any intimate relationship between them would
be incestuous. Hence we see, what is important to bear in mind, that
the rule of social avoidance incumbent on a man and his wife’s
mother is by no means solitary of its kind, and cannot be considered
apart from a large number of similar rules of avoidance observed
between other persons. The same large extension
The custom of of the rule appears in the customs of the Batamba,
avoiding relations
by marriage among a Bantu tribe of Busoga, a country on the north
the Batamba of side of the Lake Victoria Nyanza. A Catholic
Busoga. missionary, who has laboured among the Batamba
for nine years, describes their practice in this
matter as follows:—
“There is a very strange custom which may be considered here. If
a son marries or if a daughter does the same, then if they are grown
up, from the day the son or daughter marries, the mother, father of
both parties, the brothers and sisters of both parties are not allowed
to sleep under the same roof. If a man marries, then he builds a
house for himself, and should his parents live with him, or his
brothers and sisters, then they must have a separate house near by.
They are not forbidden to go in and visit him or her, but are not
allowed to sleep there. The reason is this. They say that otherwise
sickness is caused, and this is called endivade ya buko, the sickness
of relationship, literally taken. The sickness is called bujugumiro,
trembling, from the verb kujugumira, to shiver or tremble. This
cannot be got out of their heads, and no amount of talking or arguing
will convince them of the opposite. I have attended many cases of
this disease and I have not known one to recover.
“Again, the father and mother of the bride and bridegroom, the
aunts and uncles of bride and bridegroom may no more shake hands
or touch in any way the bride and bridegroom, or else the same
disease, bujugumiro, will follow. Of course much less will they
commit themselves between each other for the fear of the same
reason. And it is never heard of that a brother and sister, aunt and
nephew, niece and uncle have ever committed themselves seriously.
They are so afraid of the disease they say will follow, that, as a man
here over seventy years of age tells me, he has never in his whole
life heard of such a misbehaviour. The people say, ‘Jekiyinzika = it is
impossible for such a thing to happen.’ And no doubt one is struck
with the care they take. The disease following does not come as a
punishment from the gods, but they say, ‘Endwada ejja yokka, the
illness comes by itself.’ ”77.1
From the foregoing account it appears that
Avoidance of blood among the Batamba the rules of social avoidance
relations as well as
of connexions by are observed between blood-relations of opposite
marriage. sexes, such as brothers and sisters, uncles and
nieces, aunts and nephews, as well as between
connexions by marriage. This is a further extension of the rule of
social avoidance which it is important to bear in mind. We shall recur
to it presently. For our present purpose it deserves also to be noticed
that breaches of the custom are believed to be punished by a
disease of trembling or shivering, which, though it probably springs
purely from the imagination of the culprits, nevertheless appears to
be always fatal. Further, we learn that the mere apprehension of this
disease acts as a most efficient check upon improper relations
between persons who are connected with each other by blood or
marriage.
Among the Akamba, a Bantu tribe of British East
The custom of Africa, “if a man meets his mother-in-law in the
avoiding mother-in-
law and own road they both hide their faces and pass by in the
daughter among the bush on opposite sides of the path. If a man did
Akamba of British not observe this custom and at any time wanted to
East Africa.
marry another wife, it would prove a serious
stigma, and parents would have nothing to do with him. Moreover, if
a wife heard that her husband had stopped and spoken to her
mother in the road, she would leave him. If a man has business he
wishes to discuss with his mother-in-law, he goes to her hut at night,
and she will talk to him from behind the partition in the hut.… If a girl
of the age of puberty meets her father in the road, she hides as he
passes, nor can she ever go and sit near him in the village until the
day comes when he tells her that it has been arranged for her to
marry a certain man. After marriage she does not avoid her father in
any way.”78.1 Thus among the Akamba a man must avoid his own
marriageable, but unmarried, daughter exactly as he avoids his
wife’s mother; but the custom of avoidance ceases when his
daughter marries. This extension of the rule to a man’s own
daughter, and its limitation to the time during which the girl is nubile
but single, are most significant, and point plainly to a fear of improper
relations between father and daughter. To that point we shall return
shortly.
Among the Bakerewe, a Bantu people inhabiting
The custom of a large and fertile island in Lake Victoria Nyanza,
avoiding parents-in-
law among various “the wife, whether the first (omukuru) or the last
tribes of Central (omwenga), must always belong to a family other
and East Africa. than that of the husband, for marriages are not
contracted between relations. Never in any case
will the new household establish itself in the immediate
neighbourhood of the wife’s parents. The reason is that the son-in-
law (omukwerima) and his mother-in-law (mazara), according to their
customs, may not see each other nor look upon each other; hence in
order not to run the risk of breaking a rule to which everybody
attaches grave importance, they go as far away as possible.”78.2
Among some tribes of Eastern Africa which formerly acknowledged
the suzerainty of the sultan of Zanzibar, before a young couple had
children they might meet neither their father-in-law nor their mother-
in-law. To avoid them they must make a long roundabout. But if they
could not do that, they must throw themselves on the ground and
hide their faces till the father-in-law or mother-in-law had passed
by.79.1
Among the Anyanja, a Bantu people of British
The custom of Central Africa, “a man used never to speak to his
avoiding parents-in-
law among the mother-in-law till after the birth of his first son.
tribes of British Neither a man nor his wife will eat in company of
Central Africa and their mother or father-in-law until after birth of a
Northern Rhodesia.
child. If a man sees his mother-in-law eat, he has

You might also like