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
SimBERT升级版(SimBERTv2)!

RoFormer-Sim RoFormer-Sim,又称SimBERTv2,是我们之前发布的SimBERT模型的升级版。 介绍 https://kexue.fm/archives/8454 训练 tensorflow 1.14 + keras 2.3.1 + bert4keras 0.10.6 下载

317 Dec 23, 2022
Training and evaluation codes for the BertGen paper (ACL-IJCNLP 2021)

BERTGEN This repository is the implementation of the paper "BERTGEN: Multi-task Generation through BERT" (https://arxiv.org/abs/2106.03484). The codeb

<a href=[email protected]"> 9 Oct 26, 2022
DiY Oxygen Concentrator based on the OxiKit

M19O2 DiY Oxygen Concentrator based on / inspired by the OxiKit, OpenOx, Marut, RepRap and Project Apollo platforms. About Read about the project on H

Maker's Asylum 62 Dec 22, 2022
A Practitioner's Guide to Natural Language Processing

Learn how to process, classify, cluster, summarize, understand syntax, semantics and sentiment of text data with the power of Python! This repository contains code and datasets used in my book, Text

Dipanjan (DJ) Sarkar 1.5k Jan 03, 2023
Train BPE with fastBPE, and load to Huggingface Tokenizer.

BPEer Train BPE with fastBPE, and load to Huggingface Tokenizer. Description The BPETrainer of Huggingface consumes a lot of memory when I am training

Lizhuo 1 Dec 23, 2021
Reformer, the efficient Transformer, in Pytorch

Reformer, the Efficient Transformer, in Pytorch This is a Pytorch implementation of Reformer https://openreview.net/pdf?id=rkgNKkHtvB It includes LSH

Phil Wang 1.8k Dec 30, 2022
Twitter-NLP-Analysis - Twitter Natural Language Processing Analysis

Twitter-NLP-Analysis Business Problem I got last @turk_politika 3000 tweets with

Çağrı Karadeniz 7 Mar 12, 2022
Common Voice Dataset explorer

Common Voice Dataset Explorer Common Voice Dataset is by Mozilla Made during huggingface finetuning week Usage pip install -r requirements.txt streaml

Ceyda Cinarel 22 Nov 16, 2022
Tools and data for measuring the popularity & growth of various programming languages.

growth-data Tools and data for measuring the popularity & growth of various programming languages. Install the dependencies $ pip install -r requireme

3 Jan 06, 2022
Code for CodeT5: a new code-aware pre-trained encoder-decoder model.

CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation This is the official PyTorch implementation

Salesforce 564 Jan 08, 2023
String Gen + Word Checker

Creates random strings and checks if any of them are a real words. Mostly a waste of time ngl but it is cool to see it work and the fact that it can generate a real random word within10sec

1 Jan 06, 2022
Hierarchical unsupervised and semi-supervised topic models for sparse count data with CorEx

Anchored CorEx: Hierarchical Topic Modeling with Minimal Domain Knowledge Correlation Explanation (CorEx) is a topic model that yields rich topics tha

Greg Ver Steeg 592 Dec 18, 2022
LSTM model - IMDB review sentiment analysis

NLP - Movie review sentiment analysis The colab notebook contains the code for building a LSTM Recurrent Neural Network that gives 87-88% accuracy on

Sundeep Bhimireddy 1 Jan 29, 2022
基于pytorch_rnn的古诗词生成

pytorch_peot_rnn 基于pytorch_rnn的古诗词生成 说明 config.py里面含有训练、测试、预测的参数,更改后运行: python main.py 预测结果 if config.do_predict: result = trainer.generate('丽日照残春')

西西嘛呦 3 May 26, 2022
PUA Programming Language written in Python.

pua-lang PUA Programming Language written in Python. Installation git clone https://github.com/zhaoyang97/pua-lang.git cd pua-lang pip install . Try

zy 4 Feb 19, 2022
A method for cleaning and classifying text using transformers.

NLP Translation and Classification The repository contains a method for classifying and cleaning text using NLP transformers. Overview The input data

Ray Chamidullin 0 Nov 15, 2022
American Sign Language (ASL) to Text Converter

Signterpreter American Sign Language (ASL) to Text Converter Recommendations Although there is grayscale and gaussian blur, we recommend that you use

0 Feb 20, 2022
Implementation of Fast Transformer in Pytorch

Fast Transformer - Pytorch Implementation of Fast Transformer in Pytorch. This only work as an encoder. Yannic video AI Epiphany Install $ pip install

Phil Wang 167 Dec 27, 2022
🛸 Use pretrained transformers like BERT, XLNet and GPT-2 in spaCy

spacy-transformers: Use pretrained transformers like BERT, XLNet and GPT-2 in spaCy This package provides spaCy components and architectures to use tr

Explosion 1.2k Jan 08, 2023
GPT-2 Model for Leetcode Questions in python

Leetcode using AI 🤖 GPT-2 Model for Leetcode Questions in python New demo here: https://huggingface.co/spaces/gagan3012/project-code-py Note: the Ans

Gagan Bhatia 100 Dec 12, 2022