Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/javierbarbero/DataEnvelopmentAnalysis.jl
23 February 2026, 20:13:11 UTC
  • Code
  • Branches (3)
  • Releases (21)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/gh-pages
    • refs/heads/master
    • refs/tags/v0.1.0
    • v0.9.2
    • v0.9.1
    • v0.9.0
    • v0.8.2
    • v0.8.1
    • v0.8.0
    • v0.7.3
    • v0.7.2
    • v0.7.1
    • v0.7.0
    • v0.6.1
    • v0.6.0
    • v0.5.2
    • v0.5.1
    • v0.5.0
    • v0.4.0
    • v0.3.1
    • v0.3.0
    • v0.2.0
    • v0.1.2
    • v0.1.1
  • 766f446
  • /
  • docs
  • /
  • src
  • /
  • economic
  • /
  • profit.md
Raw File Download Save again
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
  • release
origin badgecontent badge
swh:1:cnt:eb7aa21ed0647389e6d12430683bf6e2ffd0122e
origin badgedirectory badge
swh:1:dir:7efd141b75e24121401741f1fcd00eb64fa081c4
origin badgerevision badge
swh:1:rev:170e789b88af9fa69e2865a2fc6ee9b5cc08d341
origin badgesnapshot badge
swh:1:snp:372a1c00c635560cb2bb7453a7757cfc66b2f21e
origin badgerelease badge
swh:1:rel:ad5d91d74105d68e6f3c5bf6fcb55c83cdd0dbbb

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
  • release
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 170e789b88af9fa69e2865a2fc6ee9b5cc08d341 authored by Javier Barbero on 28 June 2021, 14:36:45 UTC
Version 0.5.1
Tip revision: 170e789
profit.md
```@meta
CurrentModule = DataEnvelopmentAnalysis
DocTestSetup = quote
    using DataEnvelopmentAnalysis
end
```

# Profit Models

## Profit Efficiency Model with Directional Distance Function Technical Efficiency

 The profit function defines as $\Pi\left(\mathbf{w},\mathbf{p}\right)=\max \Big\{ \sum\limits_{i=1}^{s}{{p}_{i}}{{y}_{i}}-\sum\limits_{i=1}^{m}{{w}_{i}}{{x}_{i}} \,|  $
 $ {\mathbf{x}} \geqslant X\mathbf{\lambda},\;{\mathbf{y}} \leqslant Y{\mathbf{\lambda },\;{\mathbf{\mathbf{e\lambda=1}, \lambda }} \geqslant {\mathbf{0}}} \Big\}$. Calculating maximum profit along with the optimal output and input quantities $\mathbf{y^{*}}$and $\mathbf{x^{*}}$ requires solving:

```math
\begin{aligned}
 & \underset{\mathbf{x,y,\lambda} }{\mathop{\max }}\,\quad \quad \quad \;\ \Pi\left(\mathbf{w},\mathbf{p}\right)=\mathbf{py^{*}-wx^{*}}  \\
 & \text{subject}\ \text{to} \\
 & \quad \quad \quad \quad \quad \ {{\mathbf{x}}}\ge X\mathbf{\lambda=x } \\
 & \quad \quad \quad \quad \quad  \; {{\mathbf{y}}}  \le Y\mathbf{\lambda =y} \\
 & \quad \quad \quad \quad \quad \; \mathbf{e\lambda=1} \\
 & \quad \quad \quad \quad \quad \ \mathbf{\lambda }\ge \mathbf{0}.  
\end{aligned}
```

*Profit efficiency* defines as the difference between maximum profit and observed profit. Following the duality results introduced by *Chambers, Chung and Färe (1998)* it is possible to decompose it into technical and allocative efficiencies under variable returns to scale. Profit efficiency can be then decomposed into the directional distance fucntion and the residual difference corresponding to the *allocative profit efficiency*. Allocative efficiency defines then as the difference between maximum profit and profit at the technically efficient projection on the frontier. The approach relies on the directional vector to normalize these components, thereby ensuring that their values can be compared across DMUs.

In this example we compute the profit efficiency measure under variable returns to scale:
```jldoctest 1
julia> X = [1 1; 1 1; 0.75 1.5; 0.5 2; 0.5 2; 2 2; 2.75 3.5; 1.375 1.75];

julia> Y = [1 11; 5 3; 5 5; 2 9; 4 5; 4 2; 3 3; 4.5 3.5];

julia> P = [2 1; 2 1; 2 1; 2 1; 2 1; 2 1; 2 1; 2 1];

julia> W = [2 1; 2 1; 2 1; 2 1; 2 1; 2 1; 2 1; 2 1];

julia> deaprofit(X, Y, W, P, Gx = :Monetary, Gy = :Monetary)
Profit DEA Model 
DMUs = 8; Inputs = 2; Outputs = 2
Returns to Scale = VRS
Gx = Monetary; Gy = Monetary
─────────────────────────────────────
   Profit     Technical    Allocative
─────────────────────────────────────
1     2.0   0.0           2.0
2     2.0  -5.41234e-16   2.0
3     0.0   0.0           0.0
4     2.0   0.0           2.0
5     2.0   0.0           2.0
6     8.0   6.0           2.0
7    12.0  12.0          -1.77636e-15
8     4.0   3.0           1.0
─────────────────────────────────────
```

### deaprofit Function Documentation

```@docs
deaprofit
```

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API