This is the 25 + 1 year anniversary version of the 1995 Rachford-Rice contest

Overview

Rachford-Rice Contest

This is the 25 + 1 year anniversary version of the 1995 Rachford-Rice contest. Can you solve the Rachford-Rice problem for all these cases? With the initiative of Curtis Hays Whitson, and the extensive help by Aaron Zick, the original Rachford-Rice contest offered $1000 to any student who could solve the problem for all cases. Only three people were able to develop procedures that passed all the test, and none of these were students.

Today we are happy to re-release the Rachford-Rice contest, but now for Python. There are several differences between the original contest and this version, the main one being that this version will focus mainly on passing all the tests and not that much on speed. A timer will be set for your calculations, so if you want to optimize for speed as well you are free to do so.

To access the original version of the Rachford-Rice contest, go to this link.

Table of Contents

How do you access the code?

You can either use Git to clone the repository using

git clone https://github.com/WhitsonAS/Rachford-Rice-Contest.git

If you do not want to use Git or know how to use Git, you can manually download the repository by clicking the green code button and press the option called "Download ZIP".

Code download button

How do you enter your code?

The main stucture of the code is not to be modified at all, so you are only supposed to write code in certain designated files or functions. The file that contains the function which you have to change is called rachford_rice_solution.py and the function is called rachford_rice_solver(). This is the only place where you can change anything.

The function takes in the number of components (Nc) as an integer, the composition (zi) as a numpy array, and the K-values (Ki) as a numpy array.

The output of the function must be given in the following order, as the following types. The number of iterations used (N) as an integer, the vapor molar composition (yi) as a numpy array, the liquid molar composition (xi) as a numpy array, the vapor molar fraction (V) as a float, and the liquid molar fraction (L) as a float.

For debugging purposes, there is an option in section (3) in the main.py file in the function called is_converged() where you can turn on an optinal variable called print_to_console (which is False by default) by setting it to True. This feature will print some useful information about which tests pass / fail for each case.

See video 5 for an example of how to add you code.

Note that you're not allowed to change the floating point precision to get the desired threshold! The goal is that your algorithm should be able to have a threshold equal to your floating point precision. Any solution based on floating point manipulation of this kind will be disqualified.

When you have developed a code that you want to submit, make a folder within the folder called Solutions with the date of your submission (YYYYMMDD) and your name (e.g. 20211015-Markus-Hays-Nielsen) and add a file called solution.py within this folder (the relative path should look like this: Solutions/20211015-Markus-Hays-Nielsen/solution-py). The solution file should be possible to copy and paste straight into rachford_rice_solution.py and run with no modifications needed. If there is any issue with running your solution, you will be contacted and asked to fix the issue. If no answer is recived, the solution will be removed. This is meant to make everything easier for the reviewer and anyone else who wants to try your code.

The procedure for adding your code to the repository is to first make a new branch with your name (e.g. markus-hays-nielsen) and once you are ready to submit you can create a pull request with your file(s) in the structure detailed above. Once your code has been reviewed, we will add your code to the main branch and it will become public.

If you want to submit you solution privately, please contact us by mail at [email protected].

Basic theory about Rachford-Rice problem

The Rachford-Rice equation is a combination of (1) the material balance equation, (2) the assumption that the vapor (yi) and liquid (xi) compositions are defined by a constant set of K-values (Ki) and (3) that the sum of vapor and liquid molar fractions sum to one.

The equation is given by

equation

where zi is the total molar composition of component i, and V is the vapor molar fraction defined by

equation

where nV is the total molar amount of the vapor phase and nL is the total molar amount of the liquid phase.

The constraints for passing the contest are given by a set of test functions (R) and are given by

Vapor composition test

equation

Liquid composition test

equation

Vapor and liquid fraction test

equation

Material balance test

equation

K-value test

equation

where the threshold value (εt) is set to be 10-15.

The tests will be judged based on their severity which is given by

equation

For more information about the Rachford-Rice solution, watch the following videos:

List of participants who have successfully completed

  • Aaron Zick
  • Michael Michelsen
  • Kim Knudsen
FewCLUE: 为中文NLP定制的小样本学习测评基准

FewCLUE: 为中文NLP定制的小样本学习测评基准

CLUE benchmark 387 Jan 04, 2023
Uses Google's gTTS module to easily create robo text readin' on command.

Tool to convert text to speech, creating files for later use. TTRS uses Google's gTTS module to easily create robo text readin' on command.

0 Jun 20, 2021
Sample data associated with the Aurora-BP study

The Aurora-BP Study and Dataset This repository contains sample code, sample data, and explanatory information for working with the Aurora-BP dataset

Microsoft 16 Dec 12, 2022
A multi-voice TTS system trained with an emphasis on quality

TorToiSe Tortoise is a text-to-speech program built with the following priorities: Strong multi-voice capabilities. Highly realistic prosody and inton

James Betker 2.1k Jan 01, 2023
Pytorch code for ICRA'21 paper: "Hierarchical Cross-Modal Agent for Robotics Vision-and-Language Navigation"

Hierarchical Cross-Modal Agent for Robotics Vision-and-Language Navigation This repository is the pytorch implementation of our paper: Hierarchical Cr

44 Jan 06, 2023
Beautiful visualizations of how language differs among document types.

Scattertext 0.1.0.0 A tool for finding distinguishing terms in corpora and displaying them in an interactive HTML scatter plot. Points corresponding t

Jason S. Kessler 2k Dec 27, 2022
New Modeling The Background CodeBase

Modeling the Background for Incremental Learning in Semantic Segmentation This is the updated official PyTorch implementation of our work: "Modeling t

Fabio Cermelli 9 Dec 28, 2022
FastFormers - highly efficient transformer models for NLU

FastFormers FastFormers provides a set of recipes and methods to achieve highly efficient inference of Transformer models for Natural Language Underst

Microsoft 678 Jan 05, 2023
Simple tool/toolkit for evaluating NLG (Natural Language Generation) offering various automated metrics.

Simple tool/toolkit for evaluating NLG (Natural Language Generation) offering various automated metrics. Jury offers a smooth and easy-to-use interface. It uses datasets for underlying metric computa

Open Business Software Solutions 129 Jan 06, 2023
The first online catalogue for Arabic NLP datasets.

Masader The first online catalogue for Arabic NLP datasets. This catalogue contains 200 datasets with more than 25 metadata annotations for each datas

ARBML 94 Dec 26, 2022
Finetune gpt-2 in google colab

gpt-2-colab finetune gpt-2 in google colab sample result (117M) from retraining on A Tale of Two Cities by Charles Di

212 Jan 02, 2023
In this project, we compared Spanish BERT and Multilingual BERT in the Sentiment Analysis task.

Applying BERT Fine Tuning to Sentiment Classification on Amazon Reviews Abstract Sentiment analysis has made great progress in recent years, due to th

Alexander Leonardo Lique Lamas 5 Jan 03, 2022
Use AutoModelForSeq2SeqLM in Huggingface Transformers to train COMET

Training COMET using seq2seq setting Use AutoModelForSeq2SeqLM in Huggingface Transformers to train COMET. The codes are modified from run_summarizati

tqfang 9 Dec 17, 2022
Various Algorithms for Short Text Mining

Short Text Mining in Python Introduction This package shorttext is a Python package that facilitates supervised and unsupervised learning for short te

Kwan-Yuet 466 Dec 06, 2022
Materials (slides, code, assignments) for the NYU class I teach on NLP and ML Systems (Master of Engineering).

FREE_7773 Repo containing material for the NYU class (Master of Engineering) I teach on NLP, ML Sys etc. For context on what the class is trying to ac

Jacopo Tagliabue 90 Dec 19, 2022
Text classification is one of the popular tasks in NLP that allows a program to classify free-text documents based on pre-defined classes.

Deep-Learning-for-Text-Document-Classification Text classification is one of the popular tasks in NLP that allows a program to classify free-text docu

Happy N. Monday 2 Mar 17, 2022
Python code for ICLR 2022 spotlight paper EViT: Expediting Vision Transformers via Token Reorganizations

Expediting Vision Transformers via Token Reorganizations This repository contain

Youwei Liang 101 Dec 26, 2022
Model parallel transformers in JAX and Haiku

Table of contents Mesh Transformer JAX Updates Pretrained Models GPT-J-6B Links Acknowledgments License Model Details Zero-Shot Evaluations Architectu

Ben Wang 4.9k Jan 04, 2023
Write Python in Urdu - اردو میں کوڈ لکھیں

UrduPython Write simple Python in Urdu. How to Use Write Urdu code in سامپل۔پے The mappings are as following: "۔": ".", "،":

Saad A. Bazaz 26 Nov 27, 2022
Lyrics generation with GPT2-based Transformer

HuggingArtists - Train a model to generate lyrics Create AI-Artist in just 5 minutes! 🚀 Run the demo notebook to train 🚀 Run the GUI demo to test Di

Aleksey Korshuk 65 Dec 19, 2022