Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change constraint to bound #241

Merged

Conversation

greg-neustroev
Copy link
Contributor

Pull request details

Describe the changes made in this pull request

Change constraint to lower bound for the flows

List of related issues or pull requests

Closes #224

Collaboration confirmation

As a contributor I confirm

  • I read and followed the instructions in README.dev.md
  • The documentation is up to date with the changes introduced in this Pull Request (or NA)
  • Tests are passing
  • Lint is passing

src/model.jl Outdated
lower_bound_asset_flow[f ∈ F, rp ∈ RP, B_flow ∈ K_F[(f, rp)]; f ∉ Ft],
flow[f, rp, B_flow] ≥ 0
)
for f ∈ setdiff(F, Ft), rp ∈ RP, B_flow ∈ K_F[(f, rp)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind trying to have the if condition here

Copy link

codecov bot commented Nov 8, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Files Coverage Δ
src/model.jl 100.00% <100.00%> (ø)

📢 Thoughts on this report? Let us know!

@greg-neustroev greg-neustroev merged commit 49a5b7f into TulipaEnergy:main Nov 8, 2023
6 checks passed
@greg-neustroev greg-neustroev deleted the 224-constraint-to-bound branch November 8, 2023 16:00
@datejada
Copy link
Member

datejada commented Nov 8, 2023

/run-benchmark

Copy link
Contributor

github-actions bot commented Nov 8, 2023

  Judge result
  ≡≡≡≡≡≡≡≡≡≡≡≡≡≡

  Benchmark Report for
 /home/runner/work/TulipaEnergyModel.jl/TulipaEnergyModel.jl
  ≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡

  Job Properties
  ================

    •  Time of benchmarks:
       • Target: 8 Nov 2023 - 16:22
       • Baseline: 8 Nov 2023 - 16:24

    •  Package commits:
       • Target: aa104f
       • Baseline: aa104f

    •  Julia commits:
       • Target: bed2cd
       • Baseline: bed2cd

    •  Julia command flags:
       • Target: None
       • Baseline: None

    •  Environment variables:
       • Target: None
       • Baseline: None

  Results
  =========

  A ratio greater than 1.0 denotes a possible regression (marked with :x:),
  while a ratio less than 1.0 denotes a possible improvement (marked with
  :whitecheckmark:). Only significant results - results that indicate possible
  regressions or improvements - are shown below (thus, an empty table means
  that all benchmark results remained invariant between builds).

                ID                 time ratio memory ratio
  –––––––––––––––– –––––––––––––––––––––––––– ––––––––––––
  ["io", "output"] 0.79 (5%) :whitecheckmark:    1.00 (1%)

  Benchmark Group List
  ======================

  Here's a list of all the benchmark groups executed by this job:

    •  ["io"]

    •  ["model"]

  Julia versioninfo
  ===================

  Target
  ––––––––

  Julia Version 1.9.3
  Commit bed2cd540a1 (2023-08-24 14:43 UTC)
  Build Info:
    Official https://julialang.org/ release
  Platform Info:
    OS: Linux (x86_64-linux-gnu)
        Ubuntu 22.04.3 LTS
    uname: Linux 6.2.0-1015-azure #15~22.04.1-Ubuntu SMP Fri Oct  6 13:20:44 UTC 2023 x86_64 x86_64
    CPU: AMD EPYC 7763 64-Core Processor: 
                speed         user         nice          sys         idle          irq
         #1  2892 MHz       1326 s          0 s        112 s       3152 s          0 s
         #2  2445 MHz       1276 s          0 s        110 s       3204 s          0 s
         #3  3241 MHz       1042 s          0 s        117 s       3427 s          0 s
         #4  3232 MHz       1587 s          0 s        103 s       2893 s          0 s
    Memory: 15.606914520263672 GB (13954.99609375 MB free)
    Uptime: 462.49 sec
    Load Avg:  1.06  1.01  0.52
    WORD_SIZE: 64
    LIBM: libopenlibm
    LLVM: libLLVM-14.0.6 (ORCJIT, znver3)
    Threads: 1 on 4 virtual cores

  Baseline
  ––––––––––

  Julia Version 1.9.3
  Commit bed2cd540a1 (2023-08-24 14:43 UTC)
  Build Info:
    Official https://julialang.org/ release
  Platform Info:
    OS: Linux (x86_64-linux-gnu)
        Ubuntu 22.04.3 LTS
    uname: Linux 6.2.0-1015-azure #15~22.04.1-Ubuntu SMP Fri Oct  6 13:20:44 UTC 2023 x86_64 x86_64
    CPU: AMD EPYC 7763 64-Core Processor: 
                speed         user         nice          sys         idle          irq
         #1  3241 MHz       1421 s          0 s        119 s       3871 s          0 s
         #2  3239 MHz       1318 s          0 s        120 s       3971 s          0 s
         #3  3013 MHz       1389 s          0 s        124 s       3892 s          0 s
         #4  2445 MHz       1926 s          0 s        109 s       3370 s          0 s
    Memory: 15.606914520263672 GB (14011.0078125 MB free)
    Uptime: 544.99 sec
    Load Avg:  1.01  1.0  0.57
    WORD_SIZE: 64
    LIBM: libopenlibm
    LLVM: libLLVM-14.0.6 (ORCJIT, znver3)
    Threads: 1 on 4 virtual cores

  ────────────────────────────────────────────────────────────────────────────

  Target result
  ≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡

  Benchmark Report for
 /home/runner/work/TulipaEnergyModel.jl/TulipaEnergyModel.jl
  ≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡

  Job Properties
  ================

    •  Time of benchmark: 8 Nov 2023 - 16:22

    •  Package commit: aa104f

    •  Julia commit: bed2cd

    •  Julia command flags: None

    •  Environment variables: None

  Results
  =========

  Below is a table of this job's results, obtained by running the benchmarks.
  The values listed in the ID column have the structure [parent_group,
  child_group, ..., key], and can be used to index into the BaseBenchmarks
  suite to retrieve the corresponding benchmarks. The percentages accompanying
  time and memory values in the below table are noise tolerances. The "true"
  time/memory value for a given benchmark is expected to fall within this
  percentage of the reported value. An empty cell means that the value was
  zero.

                         ID            time    GC time          memory allocations
  ––––––––––––––––––––––––– ––––––––––––––– –––––––––– ––––––––––––––– –––––––––––
            ["io", "graph"]   1.984 ms (5%)            175.84 KiB (1%)        4830
            ["io", "input"]  24.130 ms (5%)              1.50 MiB (1%)       32146
           ["io", "output"]  75.510 μs (5%)              4.01 MiB (1%)         118
  ["model", "create_model"] 974.983 ms (5%) 110.880 ms 651.97 MiB (1%)     9498332
   ["model", "solve_model"]   10.056 s (5%)              1.87 MiB (1%)       61043

  Benchmark Group List
  ======================

  Here's a list of all the benchmark groups executed by this job:

    •  ["io"]

    •  ["model"]

  Julia versioninfo
  ===================

  Julia Version 1.9.3
  Commit bed2cd540a1 (2023-08-24 14:43 UTC)
  Build Info:
    Official https://julialang.org/ release
  Platform Info:
    OS: Linux (x86_64-linux-gnu)
        Ubuntu 22.04.3 LTS
    uname: Linux 6.2.0-1015-azure #15~22.04.1-Ubuntu SMP Fri Oct  6 13:20:44 UTC 2023 x86_64 x86_64
    CPU: AMD EPYC 7763 64-Core Processor: 
                speed         user         nice          sys         idle          irq
         #1  2892 MHz       1326 s          0 s        112 s       3152 s          0 s
         #2  2445 MHz       1276 s          0 s        110 s       3204 s          0 s
         #3  3241 MHz       1042 s          0 s        117 s       3427 s          0 s
         #4  3232 MHz       1587 s          0 s        103 s       2893 s          0 s
    Memory: 15.606914520263672 GB (13954.99609375 MB free)
    Uptime: 462.49 sec
    Load Avg:  1.06  1.01  0.52
    WORD_SIZE: 64
    LIBM: libopenlibm
    LLVM: libLLVM-14.0.6 (ORCJIT, znver3)
    Threads: 1 on 4 virtual cores

  ────────────────────────────────────────────────────────────────────────────

  Baseline result
  ≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡

  Benchmark Report for
 /home/runner/work/TulipaEnergyModel.jl/TulipaEnergyModel.jl
  ≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡

  Job Properties
  ================

    •  Time of benchmark: 8 Nov 2023 - 16:24

    •  Package commit: aa104f

    •  Julia commit: bed2cd

    •  Julia command flags: None

    •  Environment variables: None

  Results
  =========

  Below is a table of this job's results, obtained by running the benchmarks.
  The values listed in the ID column have the structure [parent_group,
  child_group, ..., key], and can be used to index into the BaseBenchmarks
  suite to retrieve the corresponding benchmarks. The percentages accompanying
  time and memory values in the below table are noise tolerances. The "true"
  time/memory value for a given benchmark is expected to fall within this
  percentage of the reported value. An empty cell means that the value was
  zero.

                         ID            time    GC time          memory allocations
  ––––––––––––––––––––––––– ––––––––––––––– –––––––––– ––––––––––––––– –––––––––––
            ["io", "graph"]   1.996 ms (5%)            175.84 KiB (1%)        4830
            ["io", "input"]  25.357 ms (5%)              1.50 MiB (1%)       32146
           ["io", "output"]  95.828 μs (5%)              4.01 MiB (1%)         118
  ["model", "create_model"] 984.113 ms (5%) 121.705 ms 651.97 MiB (1%)     9498332
   ["model", "solve_model"]   10.011 s (5%)              1.87 MiB (1%)       61043

  Benchmark Group List
  ======================

  Here's a list of all the benchmark groups executed by this job:

    •  ["io"]

    •  ["model"]

  Julia versioninfo
  ===================

  Julia Version 1.9.3
  Commit bed2cd540a1 (2023-08-24 14:43 UTC)
  Build Info:
    Official https://julialang.org/ release
  Platform Info:
    OS: Linux (x86_64-linux-gnu)
        Ubuntu 22.04.3 LTS
    uname: Linux 6.2.0-1015-azure #15~22.04.1-Ubuntu SMP Fri Oct  6 13:20:44 UTC 2023 x86_64 x86_64
    CPU: AMD EPYC 7763 64-Core Processor: 
                speed         user         nice          sys         idle          irq
         #1  3241 MHz       1421 s          0 s        119 s       3871 s          0 s
         #2  3239 MHz       1318 s          0 s        120 s       3971 s          0 s
         #3  3013 MHz       1389 s          0 s        124 s       3892 s          0 s
         #4  2445 MHz       1926 s          0 s        109 s       3370 s          0 s
    Memory: 15.606914520263672 GB (14011.0078125 MB free)
    Uptime: 544.99 sec
    Load Avg:  1.01  1.0  0.57
    WORD_SIZE: 64
    LIBM: libopenlibm
    LLVM: libLLVM-14.0.6 (ORCJIT, znver3)
    Threads: 1 on 4 virtual cores

  ────────────────────────────────────────────────────────────────────────────

  Runtime information
  ≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡

  Runtime Info       
  ––––––––––––––– –––
  BLAS #threads   2  
  BLAS.vendor()   lbt
  Sys.CPU_THREADS 4  

  lscpu output:

  Architecture:                       x86_64
  CPU op-mode(s):                     32-bit, 64-bit
  Address sizes:                      48 bits physical, 48 bits virtual
  Byte Order:                         Little Endian
  CPU(s):                             4
  On-line CPU(s) list:                0-3
  Vendor ID:                          AuthenticAMD
  Model name:                         AMD EPYC 7763 64-Core Processor
  CPU family:                         25
  Model:                              1
  Thread(s) per core:                 2
  Core(s) per socket:                 2
  Socket(s):                          1
  Stepping:                           1
  BogoMIPS:                           4890.87
  Flags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext invpcid_single vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves clzero xsaveerptr rdpru arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload umip vaes vpclmulqdq rdpid fsrm
  Virtualization:                     AMD-V
  Hypervisor vendor:                  Microsoft
  Virtualization type:                full
  L1d cache:                          64 KiB (2 instances)
  L1i cache:                          64 KiB (2 instances)
  L2 cache:                           1 MiB (2 instances)
  L3 cache:                           32 MiB (1 instance)
  NUMA node(s):                       1
  NUMA node0 CPU(s):                  0-3
  Vulnerability Gather data sampling: Not affected
  Vulnerability Itlb multihit:        Not affected
  Vulnerability L1tf:                 Not affected
  Vulnerability Mds:                  Not affected
  Vulnerability Meltdown:             Not affected
  Vulnerability Mmio stale data:      Not affected
  Vulnerability Retbleed:             Not affected
  Vulnerability Spec rstack overflow: Mitigation; safe RET, no microcode
  Vulnerability Spec store bypass:    Vulnerable
  Vulnerability Spectre v1:           Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Vulnerability Spectre v2:           Mitigation; Retpolines, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected
  Vulnerability Srbds:                Not affected
  Vulnerability Tsx async abort:      Not affected

  Cpu Property       Value                                                     
  –––––––––––––––––– ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
  Brand              AMD EPYC 7763 64-Core Processor                           
  Vendor             :AMD                                                      
  Architecture       :Unknown                                                  
  Model              Family: 0xaf, Model: 0x01, Stepping: 0x01, Type: 0x00     
  Cores              16 physical cores, 16 logical cores (on executing CPU)    
                     No Hyperthreading hardware capability detected            
  Clock Frequencies  Not supported by CPU                                      
  Data Cache         Level 1:3 : (32, 512, 32768) kbytes                       
                     64 byte cache line size                                   
  Address Size       48 bits virtual, 48 bits physical                         
  SIMD               256 bit = 32 byte max. SIMD vector size                   
  Time Stamp Counter TSC is accessible via rdtsc                               
                     TSC runs at constant rate (invariant from clock frequency)
  Perf. Monitoring   Performance Monitoring Counters (PMC) are not supported   
  Hypervisor         Yes, Microsoft                                            


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't use @constraint for lower bound of flow
2 participants