<commit_before>module Model (Model, initial, animate, navigateToWarehouse, navigateToHouse, State(..)) where

import Random
import Time exposing (Time)
import AnimationState
import DeliveryPerson exposing (DeliveryPerson)
import Article exposing (Article)
import Request exposing (Request)
import Obstacle exposing (Obstacle)
import House exposing (House)
import Warehouse exposing (Warehouse)
import Pathfinder exposing (obstacleTiles)
import Category

type State = Paused | Playing | Stopped

type alias Model =
  { animationState : AnimationState.AnimationState
  , state : State
  , seed : Random.Seed
  , tileSize : Int
  , gridSize : (Int, Int)
  , deliveryPerson : DeliveryPerson
  , articles : List Article
  , requests : List Request
  , obstacles : List Obstacle
  , houses : List House
  , warehouses : List Warehouse
  }


initial : Model
initial =
  { animationState = Nothing
  , state = Stopped
  , seed = Random.initialSeed 0
  , tileSize = 40
  , gridSize = (24, 14)
  , deliveryPerson = DeliveryPerson.initial (10, 10)
  , articles =
    [ { category = fst (Category.random (Random.initialSeed 0))
      , state = Article.Picked
      , id = Random.initialSeed 0
      }
    , fst (Article.dispatch (Warehouse.warehouse (19, 4)) (Random.initialSeed 2))
    , fst (Article.dispatch (Warehouse.warehouse (19, 4)) (Random.initialSeed 3))
    , fst (Article.dispatch (Warehouse.warehouse (19, 4)) (Random.initialSeed 5))
    , fst (Article.dispatch (Warehouse.warehouse (19, 4)) (Random.initialSeed 4))
    , fst (Article.dispatch (Warehouse.warehouse (1, 10)) (Random.initialSeed 1))
    ]
  , requests =
    [ Request.Order (House.house (8, 10)) (Category.Shirt 1) {elapsed = 0}
    , Request.Order (House.house (8, 10)) (Category.Shirt 2) {elapsed = 0}
    , Request.Order (House.house (8, 10)) (Category.Shirt 3) {elapsed = 0}
    , Request.Return
        (House.house (12, 7))
        { category = fst (Category.random (Random.initialSeed 0))
        , state = Article.AwaitingReturn (House.house (12, 7))
        , id = Random.initialSeed 0
        }
        {elapsed = 0}
    ]
  , obstacles =
    [ Obstacle.fountain (10, 5)
    , Obstacle.fountain (20, 1)
    , Obstacle.tree (1, 5)
    , Obstacle.tree (15, 3)
    ]
  , houses =
    [ House.house (8, 10)
    , House.house (12, 7)
    , House.house (16, 10)<commit_msg>Fixed intial data for return<commit_after>module Model (Model, initial, animate, navigateToWarehouse, navigateToHouse, State(..)) where

import Random
import Time exposing (Time)
import AnimationState
import DeliveryPerson exposing (DeliveryPerson)
import Article exposing (Article)
import Request exposing (Request)
import Obstacle exposing (Obstacle)
import House exposing (House)
import Warehouse exposing (Warehouse)
import Pathfinder exposing (obstacleTiles)
import Category

type State = Paused | Playing | Stopped

type alias Model =
  { animationState : AnimationState.AnimationState
  , state : State
  , seed : Random.Seed
  , tileSize : Int
  , gridSize : (Int, Int)
  , deliveryPerson : DeliveryPerson
  , articles : List Article
  , requests : List Request
  , obstacles : List Obstacle
  , houses : List House
  , warehouses : List Warehouse
  }


initial : Model
initial =
  { animationState = Nothing
  , state = Stopped
  , seed = Random.initialSeed 0
  , tileSize = 40
  , gridSize = (24, 14)
  , deliveryPerson = DeliveryPerson.initial (10, 10)
  , articles =
    [ { category = fst (Category.random (Random.initialSeed 0))
      , state = Article.Picked
      , id = Random.initialSeed 0
      }
    , { category = fst (Category.random (Random.initialSeed 0))
      , state = Article.AwaitingReturn (House.house (12, 7))
      , id = Random.initialSeed 0
      }
    , fst (Article.dispatch (Warehouse.warehouse (19, 4)) (Random.initialSeed 2))
    , fst (Article.dispatch (Warehouse.warehouse (19, 4)) (Random.initialSeed 3))
    , fst (Article.dispatch (Warehouse.warehouse (19, 4)) (Random.initialSeed 5))
    , fst (Article.dispatch (Warehouse.warehouse (19, 4)) (Random.initialSeed 4))
    , fst (Article.dispatch (Warehouse.warehouse (1, 10)) (Random.initialSeed 1))
    ]
  , requests =
    [ Request.Order (House.house (8, 10)) (Category.Shirt 1) {elapsed = 0}
    , Request.Order (House.house (8, 10)) (Category.Shirt 2) {elapsed = 0}
    , Request.Order (House.house (8, 10)) (Category.Shirt 3) {elapsed = 0}
    , Request.Return
        (House.house (12, 7))
        { category = fst (Category.random (Random.initialSeed 0))
        , state = Article.AwaitingReturn (House.house (12, 7))
        , id = Random.initialSeed 0
        }
        {elapsed = 0}
    ]
  , obstacles =
    [ Obstacle.fountain (10, 5)
    , Obstacle.fountain (20, 1)
    , Obstacle.tree (1, 5)
    , Obstacle.tree (15, 3)
    ]
  , houses =
    [ House.house (8, 10)
    , House.house (12, 7)
    , House.house (16, 10)
{'fraction_non_alphanumeric': 0.12161051766639278, 'fraction_numerical': 0.03307313064913722, 'mean_word_length': 3.2673093777388256, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7258413', 'n_tokens_mistral': 1773, 'n_tokens_neox': 1574, 'n_words': 446}