delivered the opinion of the Court.
This proceeding was instituted by the town of Strasburg under the provisions of section 156b and section 164 of the constitution and the laws passed in pursuance thereof to compel the Winchester and Strasburg Railroad Company and its lessee, the Baltimore and Ohio Railroad Company, to run their *267trains from Strasburg Junction, a distance of about one mile, into the town of Strasburg. From the order entered in the premises by the State Corporation Commission this appeal has been taken by the two defendant railroad companies.
At the outset of our consideration of the questions raised by the petition for appeal we are confronted with the proposition that sections 155 and 156, Article XII, of the constitution of’ Virginia, and the statutes enacted in pursuance thereof, are unconstitutional and void; and that the State Corporation Commission, thereby established, is an illegitimate and invalid tribunal, without power to enter the order complained of. The ground urged in support of this contention is that the constitution and laws mentioned concentrate in the body thereby created legislative, executive and judicial functions, and require it to exercise the powers of all three of these departments of government, in contravention of section 5 of the Virginia Bill of Bights, which provides “That the legislative, executive and judicial departments of the state should be separate and distinct” ; and are also in violation of the Fourteenth Amendment to the constitution of the United States for the reason that both the organic law and the legislative enactments operate to deny the-equal protection of the laws to that class of companies and corporations over which the commission is given jurisdiction, and to deprive those companies of their property without due process-of law.
This court has recognized the validity of the State Corporation Commission as a legally constituted tribunal of the stater clothed with legislative, judicial and executive powers. Atlantic Coast Line v. Com'th, 102. Va. 599, 46 S. E. 911; Norfolk, &c., Co. v. Com'th, 103 Va. 291, 19 S. E. 39.
In the last-named case, at page 295, it is said: “The State-Corporation Commission, created by constitutional authority, is the instrumentality through which the state exercises its governmental power for the regulation and control of public ser*268vice corporation. Eor that purpose it has been clothed with legislative, judicial and executive powers.”
The concentration of these three powers of government in the Corporation Commission is not in contravention of the Bill of Eights. That declaration is part of the constitution, which expressly provides that “Except as hereinafter provided, the legislative, executive and judiciary departments shall be separate and distinct,” thereby recognizing the well accepted view that the administration of the government would be wholly impracticable if that general maxim were strictly, literally and unyieldingly applied in every possible situation.
The Federal government, as well as the state governments, abounds with illustrations of the intermingling of such powers in one person or body. The British constitution fully recognizes the wisdom of keeping separate these three great departments of the government, and yet it furnishes a most conspicuous illustration of the fact that it is impossible for any government to literally fulfill the terms of that maxim without any qualification—the House of Lords is a part of both the legislative and of the judicial branches of that government. It is undoubtedly true that a sound and wise policy should keep these great departments of the government as separate and distinct from each other as practicable. But it is equally true that experience has shown that no government could be administered where an absolute and unqualified adherence to that maxim was enforced. The universal construction of this maxim in practice has been that the whole power of one of these departments should not be exercised by the same hands which possess the whole power of either of the other departments, but that either department may exercise the powers of another to a limited extent.. This practical construction of the maxim has been recognized with approval by the Supreme Court of the Hnited States.
In the case of Calder v. Bull, 3 Dallas 386, 1 L. Ed. 648, which has been frequently cited, it appeared that the legislature of. the state of Connecticut had undertaken to set aside the *269judgment and award a new trial in a private litigation which had been concluded in the courts of that state. This action of the Connecticut legislature was attacked in the Supreme Court of the United States, and amongst other things it was charged to be invalid because it was a legislative invasion of the judiciary department of government. No one denied that this was true, but the court held that under the constitution of Connecticut the Legislature could perform judicial functions, and that there was nothing in the Federal constitution with which such a state of affairs conflicted; that the Legislature of Connecticut acted in a double capacity as a house of legislation with undefined authority, and as a court of judicature in certain exigencies.” Patterson, J., in Calder v. Bull, 3 Dallas 394-5. In pointing out that this combination of legislature and court in one body was not in violation of the Federal constitution, Iredell, J., in the same case, adverted to the fact that the House of Lords in England was the supreme appellate court of that country; and Cushing, J., said that “although the act (of the Connecticut legislature) is a judicial act, it is not touched by the Federal constitution.”
The same point was reiterated by the Supreme Court in Satterlee v. Matthewson, 2 Peters 380, 413, 7 L. Ed. 458, in which the court said: “There is nothing in the constitution of the United States which forbids the legislature of a state to exercise judicial functions. ... It may safely be affirmed that no case has ever been decided in this court upon a writ of error to a state court which affords the slightest countenance to this objection.”
The' doctrine that it is competent for a state to unite in one board or tribunal some of the legislative, executive and judicial powers of the government, as well as the further proposition, that when a state does this it violates no prohibition of the Federal constitution, and that any such question is one for the determination of the state, its action in the matter being accepted as final, is well supported by the more recent case of Dreyer v.
*270Illinois, 187 U. S. 57, 84, 47 L. Ed. 79, 23 Sup. Ct. 28, in which Mr. Justice Harlan, delivering the unanimous opinion -of the court, says: “Whether the-legislative, executive and judicial powers of a state shall he kept altogether distinct and •separate, or whether persons or collections of persons belonging "to one department may, in respect to some matters, exert powers which, strictly speaking, pertain to another department of gov■ernment, is for the determination of the state, and its determination one way or the other cannot he an element in the inquiry whether the due process of law prescribed by the Fourteenth Amendment has been respected by the state or its representatives when- dealing with matters involving life or liberty. ■'When we .speak,’ said Story, 'of a separation of the three great -departments of government, and maintain that that separation is indispensable to public liberty, we are to understand this maxim in a limited sense. It is not meant to affirm that they must be kept wholly and entirely separate • and distinct, and have no common link or dependence, the one upon the other, in the slightest degree. The true meaning is that the whole power of one of these departments should not he exercised by the same hands which possess the whole power of either of the •other departments; and that such exercise of the whole would subvert the principles of a free constitution.’ Story’s Const., 5th Ed. 393. Again: 'Indeed there is not a single constitution ■of any state in the union which does not practically embrace some acknowledgment of the maxim and at the same time some admixture of powers constituting an exception to it.’ Story’s Const., 5th Ed. 395.” See also Reetz v. Michigan, 188 U. S. 505, 47 L. Ed. 563, 32 Sup. Ct. 390; Lieberman v. Van De Carr, 199 U. S. 552, 50 L. Ed. 305, 26 Sup. Ct. 144.
A further ground of objection urged to sections 155 and Í56 •of the Virginia constitution, and the laws passed in pursuance •thereof, is that in so far as the constitution and laws of Virginia subject the companies mentioned in those sections, in the matter ■of their public duties and charges, to the control of a commis*271sion clothed with legislative, executive aud judicial functions, and deny to them access to the law courts of the state, which are not clothed with “legislative, executive and judicial functions,” such as every other person, private or corporate, has access to, said constitution and acts make a discrimination against such companies and deny to them the equal protection of the laws and deprive them of their property without due process of law.
There is no denial of the equal protection of the laws when all persons in like condition and under like circumstances are treated in the same way, made liable to the same regulations and subjected to the same penalties for failure to comply with the just requirements of such regulations. The jurisdiction complained of applies alike to all companies and persons engaged in the business of transportation, and there is no discrimination against any railroad or other transportation company, or in favor of any person, who. engages in the business of a common carrier. All stand alike and are dealt with alike. The Supreme Court of the United States has, in many cases, held that the Fourteenth Amendment does not impair the right of the states to classify, any subjects with which their laws deal, provided only that the classification is a reasonable and not a mere arbitrary one, without any reason to support it.
In Barbier v. Connolly, 113 U. S. 32, 28 L. Ed. 923, 5 Sup. Ct. 360, it is said: “Class legislation, discriminating’against some and favoring others, is prohibited, but legislation which, in carrying out a public purpose, is limited in its application, if within the sphere of its action it affects alike all persons similarly situated, is not within the amendment.”
In Missouri Ry. Co. v. Mackey, 127 U. S. 209, 32 L. Ed. 107, 8 Sup. Ct. 1163, it is said: “The objection that the law . . . deprives the railroad companies of the equal protection of the laws is even less tenable than the one considered. It seems to rest upon the theory that the legislation which is special in its character is necessarily within the constitutional inhibition, hut nothing can he further from the fact. The greater part of our *272legislation is special, either in the object sought to be attained by it or in the extent of its application . . . such legislation does not infringe upon the clause of the Fourteenth Amendment requiring equal protection of the laws because it is special in its character. . . . "When legislation applies to particular bodies or associations, imposing upon them additional liabilities, it is not open to the objection that it denies to them the equal protection of the laws, if all persons brought under its influence are treated alike under the same conditions.” See also Kentucky Ry. Tax Gases, 115 U. S. 322, 29 L. Ed. 414, 6 Sup. Ct. 57; Pac. Ex. Co. v. Seibert, 142 U. S. 339, 35 L. Ed. 1035, 12 Sup. Ct. 250; McGowan v. Ill. Trust & Sav. Bk. 170 U. S. 283, 42 L. Ed. 1037, 18 Sup. Ct. 594; Tinsley v. Anderson, 171 U. S. 106, 43 L. Ed. 91, 18 Sup. Ct. 805; Orient, &c., Co. v. Daggs, 172 U. S. 557, 43 L. Ed. 552, 19 Sup. Ct. 281; Field v. Barber Asphalt Co., 194 U. S. 621, 48 L. Ed. 1142.
In the last case cited the doctrine announced in many other cases is reiterated in these words: “It is not the purpose of the Eourteenth Amendment, as has frequently been held, to pre- „ vent the states from classifying the subjects of legislation and making different regulations as to the property of different individuals differently situated. The provision of the Federal constitution is satisfied if all persons similarly situated are treated alike in privileges conferred or liabilities imposed.”
•That the appellants are not deprived of their property without due process of law is clear from what has been already said and the authorities cited.
In Iowa, &c., Co. v. Iowa, 160 U. S. 393, 40 L. Ed. 467, 16 Sup. Ct. 345, it is said that “It is clear that the Eourteenth Amendment in no way undertakes, to control the power of a state to determine by what process legal rights may be asserted or legal obligations be enforced, provided the method of procedure adopted for these purposes gives reasonable notice and affords fair opportunity to be heard before the issues are decided.”
*273The constitutional provision creating the Corporation Commission expressly directs and requires that the proceedings before it shall be by “due process of law.”’ Under that proceeding the railroad companies are duly notified and summoned to appear at a specified time and place before an impartial tribunal provided by law to hear and determine the matter in dispute, and show cause, if any they can, why a suggested or proposed action should not be given effect. At such hearing the railroads are allowed, as a matter of right, to be represented by counsel, to examine and cross-examine witnesses, to produce any and all legal evidence in their behalf, and to be fully heard in their own behalf on all matters of law or fact which they may desire to allege or put forward in their own defense. And all this before any decision or action adverse to their interests can be rendered. It has been held that the right of appeal is noU an essential element in “due process of law.” Reetz v. Mich., 188 U. S. 508, 47 L. Ed. 563, 23 Sup. Ct. 390. Out of abundant caution, however, the constitutional provision authorizing this proceeding also authorized an appeal by the railroads from any decision of the commission in such proceedings, with which the railroads may be dissatisfied. And whereas, in almost every other case involving the rights of individuals the right of appeal is addressed to the sound discretion of the appellate court, yet in this case the appeal is given to railroads absolutely, as of right; and whereas, in most appeals involving the rights of individuals there is a jurisdictional amount limit, yet in this case the railroads are given an appeal without limit as to the amount involved. It is difficult to conceive of more complete provision for “due process of law” than is secured to the parties concerned by these proceedings.
ÍThat the state has the inherent power of regulating and controlling public service corporations operating within her borders, and of prescribing the facilities and conveniences which shall be furnished by them is no longer an open question in this country. The just regulation and control of such companies has *274been a difficult problem for many years. / The Virginia State Corporation Commission, as created and defined by Article XII of the constitution, was devised as a solution of that problem. The exigencies of the situation made it necessary that the commission should be clothed, to some extent, with legislative, executive and judicial functions, and in view of what has been said, and in the light of the authorities cited, we are of opinion that the section of the state constitution, and the statutes enacted in effectuation thereof, from w'hich the State Corporation Com■mission derives its existence and its powers, violate no provision of’ the Federal constitution, and are in conflict with no principle essential to the preservation of liberty. It follows, therefore, that the State Corporation Commission is a legitimate and valid tribunal, with full power to determine the subject matter of controversy presented by this proceeding.
We are further of opinion that the Corporation Commission did not err in disregarding the objection urged by the appellants to the sufficiency of the petition filed as the foundation of this proceeding by the' town of Strasburg. The petition was quite sufficient to inform appellants of the grievance complained of and the remedy asked for. The elaborate and comprehensive answer filed by the appellants shows conclusively that they were fully informed as to the case they were to meet and defend.
The power and authority of the Corporation Commission being established, we come now to consider its action with respect to the subject matter of this controversy.
It appears from the record that in April, 1867, the Winchester and Strasburg Eailroad Company was granted by the Virginia Legislature a charter to build a railroad from the town of Winchester, in Frederick county, to the town of Strasburg, in the county of Shenandoah. The road was not built as contemplated by the charter, but was constructed so as to pass about one mile west of the town of Strasburg, where it formed a junction with the Manassas Gap railroad. In July, 1870, the Baltimore and Ohio Eailroad Company leased the Win-*275Chester and Strasburg railroad, and from that time until now has controlled and operated the same under successive contracts of lease, by the terms of which it hound itself to conform in all respects to the legal obligations of its lessor. The Winchester and Strasburg road not having been completed, as contemplated by its charter, to the town of Strasburg, the matter was brought to the attention of the Legislature, and by an act approved February 26, 1877, the original charter granted in 1867 was modified with respect to completing the road to the town of Strasburg upon certain terms and conditions set forth therein. This act recites the charter obligation to construct the railroad to the town of Strasburg; its construction, in fact, to a point on the Manassas Gap railroad, near the town of Strasburg; and that by means of the use of the Manassas Gap railroad the Winchester and Strasburg Railroad Company was willing to run, or procure to be run by its lessee, trains to the town of Strasburg at and from a convenient and suitable depot to be erected or constructed on the line of'the Manassas Gap railroad, in the limits of the town of Strasburg, at or near the Oaton crossing, and is willing to treat and regard said depot, when so erected or constructed, as a regular station on its road for such trains as are accustomed to stop at stations of a similar character and dignity on its own road, and by the acceptance of the provisions of this act signifies its assent to the amendment of its charter as therein made and provided. After these recitals it is enacted that the Winchester and Strasburg Railroad Company is released from the obligation of the charter to further construct its road and relieved of all penalties or forfeitures for any failure to so construct it to the town of Strasburg or to further comply with the terms of its charter in reference thereto; provided “the said company shall erect or construct, keep and use for the convenience of the people of Strasburg and vicinity the depot aforesaid; and provided further, that upon the failure of the said company to so keep said depot, the provisions of this act shall be deemed and held to be null and void.” The true intent and *276meaning of this act is, on its face, declared to be to treat and regard the keeping of the depot at or near Oaton’s crossing, in the town of Strasburg, as a full compliance with the terms of the charter of the company with reference to the town of Strasburg.
The record shows that the Baltimore and Ohio Railroad Company, lessee, is practically the owner of the Winchester and Strasburg railroad; that the capital stock of the last-named company is six thousand shares, of which the Baltimore and Ohio owns 5,680 shares; that the officers of the two companies are the same; and that the control and operation of the Winchester and Strasburg railroad has been in the hands of its lessee, the Baltimore and Ohio, since it was constructed. The Baltimore and Ohio Bailroad Company accepted the terms of the compromise act of 1877 by building the depot in the town of Strasburg, and running its trains thereto until the latter part of the year 1896, a period of about nineteen years. About that time the Baltimore and Ohio Bailroad Company ceased to run its trains to that station, and has since failed to comply with the terms of the act of 1877, or to comply with the terms of the original charter granted in 1867, which obligated the Winchester and Strasburg Bailroad Company to build its line to the town of Strasburg. The conclusion reached by the State Corporation Commission was “that under all the facts and circumstances appearing to the commission in this proceeding it necessarily follows that the Winchester and Strasburg Bailroad Company was and is under a public obligation to the state of Virginia to operate its road and its trains as a continuous operation into the town of Strasburg, and to the depot erected by it in said town in accordance with the requirements of the act referred to; that the Baltimore and Ohio Bailroad Company, as lessee, under the terms of the lease of said railroad undertook to carry out the said public legal obligation, and is, therefore, now legally bound to do so.”
We are of opinion that there is no error in this conclusion-*277It is unnecessary to decide whether the appellants shall run their trains to the Catón crossing depot in pursuance of their obligation to do so under the act of February, 1877, or in pursuance of their original charter obligation to run them to the town of Strasburg. It is immaterial to the citizens of Strasburg which of these methods is adopted. In any aspect of the case appellants are bound to run their trains to the town of Strasburg, and it is for them to adopt the means of properly performing that duty.
It is contended that the Winchester and Strasburg Railroad Company has not the financial ability to run its trains to the town of Strasburg in either of the two ways open to it, and that it is therefore impossible for it to obey the order of the commission.
The record shows that this company receives in consideration of the lease of its road to the Baltimore and Ohio a four per cent, annual dividend upon its stock. This sum appropriated to the discharge of its public duty would seem to have been sufficient in the last ten years, during which it has failed to perform, that duty, to have put it in a position to run its trains into the town of Strasburg. But, be that as it may, there is no suggestion in the record that the Baltimore and Ohio Railroad Company is not financially able to perform this duty, and it has, as lessee, undertaken to carry out and perform the public legal obligations of the Winchester and Strasburg Railroad Company, and is therefore legally bound to do so.
It is further contended that the appellant companies can no longer use the one mile of the Manassas Gap Railroad Company, heretofore used by them, except upon terms with the Southern Railway Company, the present owner, so onerous as to preclude the acceptance of the' same; and that to construct their own line for the distance of one mile to the town of Strasburg would entail a loss in view of any business that would result from such construction.
We are of opinion that there was no error in the action of *278the Corporation Commission in declining to admit the evidence offered in support of these contentions. These companies sought and accepted the obligation imposed upon them by the terms of the act of February, 1877, and they cannot now be permitted to disregard that obligation merely because they find it onerous or unprofitable. ISTor can they be excused from their charter obligation to complete their own road, if that is necessary to take their trains to the town of Strasburg, because they find it will cost them more to do so than the resulting business would justify. It must have been contemplated when the charter was granted that it would cost something to build this mile of road. At any rate, by accepting the charter, appellants obligated themselves to construct it and reiterated and acknowledged that obligation in the act of February, 1877. We do not see that the question of financial or other convenience is involved in this case. These two companies are carrying on their operations in violation of their obligation to run their trains to the town of Strasburg, and the sole question is whether or not they are to be permitted to continue to disregard this plain obligation and public duty, at the expense of the public convenience and right.
It is further contended that the matter involved in this proceeding is res adjudicata by reason of the action of this court in the mandamus proceeding of the Town of Strasburg v. The Winchester & Strasburg Railroad Company and Others, reported in 94 Va. 647, 27 S. E. 493.
This contention cannot be sustained. In 1897 the town of Strasburg applied to this court for a writ of mandamus to compel the appellants to make provision for running their trains to the town of Strasburg. The writ was denied because the court would have been powerless to make the writ effectual; it being a fundamental principle in the law of mandamus not to grant that extraordinary remedy when to do so would be fruitless and unavailing. At the time the writ was asked for the Baltimore and Ohio Railroad Company and all the railroads leased or *279controlled by it, including the Winchester and Strasburg railroad, were in the bands of receivers appointed by the Circuit Court of the United States for the District of Maryland. Tbe established doctrine of both tbe state and Federal courts was recognized and followed, that tbe receivers could not be disturbed, nor their operation of the Winchester and Strasburg road interfered with, by any court other than that which appointed them. The merits of the question presented by the petition in that case were not touched, and nothing was concluded by the action of this court in refusing the writ. An order denying a writ of mandamus is not such a judgment as concludes further inquiry as to the grounds on which the writ is sought. Booth v. Strippleman, 61 Tex. 378. The refusal to grant the writ on one day will not prevent the court from granting tbe same writ on another day, if tbe ends of justice require it.
At that time this court was powerless to enforce any relief, and therefore granted none. But now tbe conditions are wholly different. ISTot only is there now no receiver and no other court in control, but there is a tribunal, since established by tbe constitution and laws of tbe state, with exclusive original jurisdiction to bear and determine such controversies, and to require transportation companies to perform their public obligations and to comply with tbe provisions of their charters and tbe laws of tbe commonwealth.
We are of opinion that tbe town of Strasburg bad tbe right to apply to tbe Corporation Commission for relief from tbe grievance it complains of, notwithstanding tbe action of this court in denying to it the writ of mandamus applied for in 1896.
While tbe conclusion reached by tbe Corporation Commission that tbe appellants are bound to run their trains into the town of Strasburg is, as we have seen, free from error, tbe form of tbe order is plainly erroneous. So far as necessary to be quoted, tbe form of tbe order is as follows: “That tbe said two companies, the Winchester and Strasburg and the Balti*280more and Ohio Eailroad Company do, on or before the first day of October, 1906, make arrangements and pnt themselves in condition to comply with the terms of the act of February, 1877, so that on and after that date, the said first day of October, 1906, they shall by means of the use of the track of the. Manassas Gap Eailroad, said track being now controlled, owned and operated by the Southern Eailway, run or procure to be run, trains on reasonable schedules to said town of Strasburg; that is, to and from the depot or station erected as shown in the evidence within the limits of said town of Strasburg at or near Oaton crossing.”
The Southern Eailway Company had not been served with any process or notice, as required by law, and was not a party to the proceeding. Under such circumstances it was error for the commission to make any order affecting the rights of the Southern Eailway Company.
It was further error to require the appellants to adopt the mode provided by the act of February, 1877, as a means of •reaching Strasburg with their trains. Appellants have a choice of two methods of running their trains into the town of Strasburg—that provided for by the act of February, 1877, and that provided for by the original charter of 1867. The order should, therefore, have required the appellants to run their trains to the depot at Oaton crossing, in the town of Strasburg, within a given time, leaving them to determine which of the two ways mentioned they would adopt as a means of complying with such order; failure to perform which would subject appellants to the penalties provided by law in such cases.
For these reasons the order complained of must be reversed, and the case remanded to the Corporation Commission for further proceedings not in conflict with the views herein expressed.