{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "edb387b3-ffab-46f9-b608-3a4977cfc2ce",
   "metadata": {},
   "source": [
    "# Restraints\n",
    "\n",
    "MobsPy has some restraints for modeling regarding the characteristics combinations.\n",
    "In this model, we will discuss them."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "cc42c2c5-1eb5-45c9-b2e2-94f2b855fd55",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\u001b[91mERROR: A characteristic must be unique for each species \n",
      "Repetition in: C, A \n",
      "Characteristics: {'aaa', 'ccc'}, {'aaa', 'bbb'} \n",
      "\u001b[0m\n"
     ]
    }
   ],
   "source": [
    "from mobspy import *\n",
    "\n",
    "try:\n",
    "    # Here we define two base Species\n",
    "    A, C = BaseSpecies(2)\n",
    "\n",
    "    # We them add two characteristics to characteristics to each of them\n",
    "    A.aaa, A.bbb\n",
    "    C.aaa, C.ccc\n",
    "\n",
    "    # And add them to the simulation object\n",
    "    MySim = Simulation(A | C)\n",
    "    MySim.compile()\n",
    "except SystemExit:\n",
    "    pass"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b139ce63-e188-42ad-9576-9c084c1f12b7",
   "metadata": {},
   "source": [
    "MobsPy does not allow for the same characteristic to be added to two different meta-species to allow for the proper query structure. Characteristics can only be shared through inheritance. This model does not compile because both A and C have the characteristic 'aaa' added to them."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "70234c6e-5553-43ca-9cca-1b9dc552c0c5",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
