// Created by libAntimony v2.13.0
model *Komarova2003_BoneRemodeling()

  // Compartments and Species:
  compartment compartment_;
  substanceOnly species x1 in compartment_, x2 in compartment_, $x1_bar in compartment_;
  substanceOnly species $x2_bar in compartment_, z in compartment_, y1 in compartment_;
  substanceOnly species y2 in compartment_;

  // Assignment Rules:
  x1_bar := (beta1/alpha1)^((1 - g22)/gamma_)*(beta2/alpha2)^(g21/gamma_);
  gamma_ := g12*g21 - (1 - g11)*(1 - g22);
  x2_bar := (beta1/alpha1)^(g12/gamma_)*(beta2/alpha2)^((1 - g11)/gamma_);

  // Reactions:
  R1:  -> x1; alpha1*x1^g11*x2^g21;
  R2: x1 -> ; beta1*x1;
  R3:  -> x2; alpha2*x1^g12*x2^g22;
  R4: x2 -> ; beta2*x2;
  R5: z -> ; flag_resorption*k1*(x1 - x1_bar);
  R6:  -> z; flag_formation*k2*(x2 - x2_bar);

  // Events:
  event_0000001: at x1 > x1_bar: flag_resorption = 1;
  event_0000003: at x1 <= x1_bar: flag_resorption = 0;
  event_0000002: at x2 > x2_bar: flag_formation = 1;
  event_0000004: at x2 <= x2_bar: flag_formation = 0;

  // Species initializations:
  x1 = 11/compartment_;
  x2 = 212/compartment_;
  z = 100/compartment_;
  y1 = 0;
  y2 = 0;

  // Compartment initializations:
  compartment_ = 1;

  // Variable initializations:
  beta1 = 0.2;
  alpha1 = 3;
  g22 = 0;
  beta2 = 0.02;
  alpha2 = 4;
  g21 = -0.5;
  g12 = 1;
  g11 = 0.5;
  flag_resorption = 0;
  flag_formation = 0;
  k1 = 0.24;
  k2 = 0.0017;

  // Other declarations:
  var gamma_, flag_resorption, flag_formation;
  const compartment_, beta1, alpha1, g22, beta2, alpha2, g21, g12, g11, k1;
  const k2;

  // Unit definitions:
  unit substance = item;
  unit time_unit = 86400 second;

  // Display Names:
  substance is "number";
  time_unit is "day";
  x1 is "Osteoclast";
  x2 is "Osteoblast";
  x1_bar is "Steady state osteoclast";
  x2_bar is "Steady state osteoblast";
  z is "Bone mass";
  y1 is "Cells actively resorbing bone";
  y2 is "Cells actively forming bone";
  R1 is "Osteoclast production";
  R2 is "Osteoclast removal";
  R3 is "Osteoblast production";
  R4 is "Osteoblast removal";
  R5 is "Bone resorption";
  R6 is "Bone formation";

  // CV terms:
  R1 hypernym "http://identifiers.org/go/GO:0045672"
  R2 hypernym "http://identifiers.org/go/GO:0045671"
  R3 hypernym "http://identifiers.org/go/GO:0045669"
  R4 hypernym "http://identifiers.org/go/GO:0045668"
  R5 identity "http://identifiers.org/go/GO:0045453"
  R6 hypernym "http://identifiers.org/go/GO:0001503"
end

Komarova2003_BoneRemodeling is "Komarova2003_BoneRemodeling"

Komarova2003_BoneRemodeling model_entity_is "http://identifiers.org/biomodels.db/MODEL6029826395"
Komarova2003_BoneRemodeling model_entity_is "http://identifiers.org/biomodels.db/BIOMD0000000148"
Komarova2003_BoneRemodeling description "http://identifiers.org/pubmed/14499354"
Komarova2003_BoneRemodeling taxon "http://identifiers.org/taxonomy/7711"
Komarova2003_BoneRemodeling hypernym "http://identifiers.org/go/GO:0046850"
Komarova2003_BoneRemodeling property "http://identifiers.org/doid/DOID:11476",
                                     "http://identifiers.org/doid/DOID:8398",
                                     "http://identifiers.org/doid/DOID:5408"
