text:
Interview: Basement Jaxx
For all his international acclaim and house-tinged pop smashes, Basement Jaxx's Simon Ratcliffe still comes across as extremely down to earth. Defying the fame-related party clichés tracks like the notoriously raucous 'Where's Your Head At' lead you to expect, Ratcliffe still lives in the same corner of Brixton in which he once – together with partner in crime Felix – launched the 'Rooty' club night that set Basement Jaxx on the long road to international notoriety. Ratcliffe summarizes the area he lives in as "far from glamorous", and his studio apartment as "probably not big enough" now that he's bringing up a three-year-old daughter. He still cycles to work every morning, and dismisses the five-star perks that come with being part of a noted touring band as "great, but you have to keep your feet on the ground". This down-to-earth attitude to fame goes a long way to explaining why 'Jaxx are so rarely in the press for anything other than their music, and why – a decade down the line – they're still as influential as ever.
If you ask Simon for tour stories, he'll admit there have been a few wild times ("but you can't live like that all the time, we try to keep our sanity in check"), and – highlighting the abundant female singers accompanying the group – portrays the atmosphere as "almost mothering. If we were just blokes together we'd probably be a bit more naughty. But there's a really good chemistry, all kinds of characters". The pumping live show and manic videos are not so much a portrayal of the duos lifestyle, but "in a spirit of fun, humor, imagination and experimentation". All, it seems, is not quite as chaotic as public image has led us to believe.
Kish Kash was evidently a massive breakthrough for the duo on a personal level. Having always relied heavily on guest vocals, Jaxx graduated from "grabbing people off the street" to working with an up and coming (and yet to be signed) Dizzee Rascal and Siouxsie Sioux. The latter, in fact, is the product of a conversation about the title track during which the duo described their need for someone 'like Siouxsie Sioux' to sing the vocals, and found they had the draw to get a proper pop star on board. "From that moment on, we felt that we could venture out and ask a few more people who are established. We've always had guest vocalists, but now they're people who have their own careers. We look for people with real character and personality, and most of the people who have that are already established."
Simon describes latest effort Scars as "Basement Jaxx ten years after 'Remedy'", and therefore "more mature and reflective, as that's where we were when we were making it, you can't rock the world when you're five or six albums down the line". Despite acknowledging the new album's successes live, it sounds like Basement Jaxx are their own harshest critics. "I'd have loved it if Scars had sold millions of copies and gone to number one all over the world. You put your heart and soul into something for two years…"
The house to Scars pop is Zephyr, an EP originally slated to stand alongside Scars as a double album. Simon describes the two efforts as "the two parts of the Basement Jaxx brain. Zephyr's more influenced by jazz and experimental music, and we know there are people out there who like that side to what we do. In a way that comes from the original meditative deep house music, which was very soulful and reflective. It's less like a set of songs, and more just a stretch of music". By separating the two, Jaxx also hope to make Zephyr distinct from a 'bonus CD', and while they're certainly not expecting much commercial success from the EP, they plan to promote it as the more experimental effort that it is, as well as marking it out as distinctly different to the new album without the less pop-focused audience switching off.
They'll be plenty of chances to air their more experimental side live, too: "the live show's wicked for us, it's a chance to reinterpret stuff. I'm more in the mood for the DJ side of things right now, rather than the songwriting, so we'll be taking the chance to do a little bit of what we were dong twelve years ago. New voices give you new ideas, so we rearrange the songs. Obviously we can't have Yoko Ono, Dizzee Rascal etc. on tour with us every time, but there are about ten people on stage. It always goes off in Ireland. People are not portentous; they get stuck in. If people will come, we'll be there."
It's hard to push Simon on where things might head next. The remixes seem to be a thing of the past, with Simon pointing out "the last thing we need is any distractions, and people are really good at doing mixes with their laptops. We were known for our part in the mash-up, bootleg scene, and everyone's doing that now. It seems a little bit pointless, and the desire isn't quite there at the moment. Vampire Weekend asked us recently, though. That could be interesting." There's a sense that it depends a lot on where the next spark of genius comes from, but Basement Jaxx are certainly at something of a creative junction: "Scars was the fifth album of a five album contract, and now we're looking back at the DJing. It's all very cyclical in a way. Ten years we've been with XL. Now the future's open. The final date of the tour is the 28th of February in Japan, and that will be kind of the end of an era. After that, I think we're both keen to take a break, maybe do a few things just for fun". At a push? "I'd like to do some more stuff like Zephyr, and we're thinking about doing some film music. I'd like to get together with someone who's making a film". There it is, then: Basement Jaxx, coming soon to a stage and a screen near you.
As published in State Magazine, December 2009. Click here to view the original.


The world's ultimate observation deck, a control tower for robotics in space, and a sunroom like no other, has arrived at NASA's Kennedy Space Center (KSC). It is bound for the International Space Station.
Built in Italy for the United States segment of the Station, the Cupola traveled part way around the world to reach KSC. One day it will circle the Earth every 90 minutes, and crewmembers will peer through its 360-degree windows. It will serve as a literal skylight to control some of the most sophisticated robotics ever built.
The crew will use Cupola windows, six around the sides and one on the top, for line-of-sight monitoring of outside activities, including spacewalks, docking operations and exterior equipment surveys. The Cupola will be used specifically to monitor the approach and berthing of the Japanese H-2 supply craft and other visiting vehicles. The Cupola will serve as the primary location for controlling Canadarm2, the 60-foot Space Station robotic arm.
Space Station crews use two robotic control workstations in the Destiny laboratory to operate the arm. One of the robotic control stations will be placed inside the Cupola. The view from the Cupola will enhance an arm operator's situational awareness, supplementing television cameras and graphics.
Construction of the Cupola by Alenia Spazio, under a contract with the European Space Agency (ESA), is finished. It was delivered to KSC on Oct. 7, where it will undergo acceptance testing and launch preparations.
After initial inspections conducted in the Space Station Processing Facility, the Cupola was secured inside its transportation container for storage until launch preparations begin. Before launch, KSC and European Space Agency (ESA) engineers will conduct a joint inspection leading to the turnover of the Cupola to NASA.
The Cupola is scheduled to launch on Station assembly mission 14A (Shuttle mission STS-133) in early 2009. It will be installed on the forward port of Node 3, a connecting module to be installed in 2008. The Cupola was provided by ESA to NASA as part of a barter agreement. The agreement covers launch of external payloads on the Shuttle for installation on the External Facility of the European Columbus research module.


text:
Helidon Xhixha
27 Jun — 29 Oct 2017 at the Gallerie degli Uffizi in Florence, Italy
Helidon Xhixha. Courtesy of Uffizi Gallery
Contemporary artist Helidon Xhixha, whose sculpture at the inaugural 2016 London Design Biennale won the prestigious public award, has been invited by the Director of Florence's respected Uffizi Gallery, Eike Schmidt, to present a major new personal sculpture exhibition this summer, set within the stunning surroundings of the famed Boboli Gardens.
In Ordine Sparso sees Xhixha explore the ideas of chaos and order through his extraordinary series of thirteen monumental sculptures and installations. Breathtaking in design and execution, they invite us to explore and investigate the very idea of "chaos". The works pay homage to how historically this concept has been portrayed and the role of the artist seeking to represent chaos and how it is interpreted in the natural world.
During his career Xhixha has developed a unique and now iconic style of sculpture and is known for his extraordinary ability to manipulate mirror polished stainless steel into amazing abstract objects of immense grandeur and beauty. Xhixha creates a visual commentary on the interplay between metal and light, between the physical and the intangible, with a perfectly flat flawless plain suddenly transformed, distorted and disturbed. Recent successes at the 2015 Venice Biennale and the 2016 London Design Biennale have secured his position within the international art world and his work is now some of the most instantly recognisable and highly sought after sculpture today.
To be asked by the Uffizi to create his vision in this incomparable setting is a great honour and Xhixha has risen to the challenge. Exploring the themes of chaos and order, he has taken his inspiration from nature and the principles of the sacred geometry. In the Limonaia of the Boboli Gardens the artist has looked to nature to understand chaos. Inspired by the Crystal Caves in Naica, Mexico he has designed a complex response to their seemingly random formation. He has created in the Limonaia his signature aesthetic response, great towering columns of mirror polished stainless steel entice the visitor to enter and explore the artist's vision.
Mirroring this is the work representing order, inspired by the concepts behind the sacred geometry. These monumental structures are formed in response to the Golden Ratio, mathematical principles whose roots are found in nature.
Situated either side of the entrance of the Palazzo Pitti Xhixha presents Conoscenza and Infinito: Conoscenza reminds us of the spiralling Nautilus shell, nature's most recognisable answer to the Golden Ratio. Giant curved segmented steel spiral outwards from a central point, increasing in size as they oscillate. Infinito reminds us of the fundamental concepts of order, balance and regularity.
The artist has created two sloping forms, fragmented and rising in opposite directions they sit side by side. They are at once the same yet entirely different and they parallel not only each other, but the entire exhibition. Xhixha allows us to see how opposites can be understood not as disparate entities but as a single concept.
Through their shapes and reflective surfaces, the thirteen breathtaking sculptural installations by Helidon Xhixha offer new perspectives on the intertwining of art and nature, promoted by the Medici in Sixteenth and Seventeenth centuries.
In Ordine Sparso is curated by Uffizi Gallery Director Eike Schmidt and Dr Diego Giolitti. 2017 sees Leonardo da Vinci's L'Adoration of the Magi return to the Uffizi Gallery after a careful six year restoration. This year the museum will also exhibit works by Bill Viola and a series of exhibitions dedicated to women artists.
Albanian by origin, now living and working between Milan and Dubai, Xhixha was born into a family of artists, with his passion for sculpting coming from his father at a young age. He has achieved continued success for his iconic stainless steel structures, which now feature in public and private collections globally.
Xhixha is perhaps most widely known for his Iceberg sculpture, tackling the subject of climate change,which became the first installation to be given permission to travel along the world famous Grand Canal at the 2015 Venice Biennale and was featured in The New York Times, The Guardian and CNN.
Gallerie degli Uffizi
Gallerie degli Uffizi is one of the most famous museums in the world for its extraordinary collections of ancient sculptures and paintings (from the Middle Ages to the modern age). The collections of paintings of the fourteenth and the Renaissance contain some absolute masterpieces of art of all time: just mention the names of Giotto, Simone Martini, Piero della Francesca, Fra Angelico, Filippo Lippi, Botticelli, Mantegna, Correggio, Leonardo, Raffaello , Michelangelo, Caravaggio, as well as masterpieces of European painting, especially German, Dutch and Flemish.
Museum profile
More from Gallerie degli Uffizi
Inaugurata la nuova sala dedicata a Raffaello e Michelangelo
Permanent event
Imperatrici, Matrone, Liberte
3 Nov 2020 — 14 Feb 2021
Pietro Aretino e l'arte del Rinascimento
27 Nov 2019 — 1 Mar 2020
Programma delle mostre alle Gallerie degli Uffizi nel 2019
8 Jan 2019 — 1 Mar 2020
More in Italy
Tutankhamon. 100 anni di misteri
29 Oct — 31 May 2023 at Palazzo Zaguri in Venice
Feni Chulumanco. Behind the walls
27 Jan — 11 Mar 2023 at Osart Gallery in Milan
Yourself in my shoes
18 Jan — 18 Feb 2023 at Tube Culture Hall Gallery in Milan
Peter Frederiksen. Coward
17 Jan — 11 Mar 2023 at The Flat in Milan
Get updates on the Meer

redpajama_set_name: RedPajamaCommonCrawl


text:
namespace ts {
    export interface EmitOutput {
        outputFiles: OutputFile[];
        emitSkipped: boolean;
        /* @internal */ diagnostics: readonly Diagnostic[];
    }

    export interface OutputFile {
        name: string;
        writeByteOrderMark: boolean;
        text: string;
        /* @internal */ buildInfo?: BuildInfo
    }
}

redpajama_set_name: RedPajamaGithub


FAYETTEVILLE (KFSM) – A 26-win team was no test for the Arkansas women's basketball team.
In the second round of the WNIT, the Razorbacks welcomed UAB to Bud Walton in what was arguably the most impressive offensive performances of the year. The Hogs tallied their first triple-digit scoring of the year in the 100-52 win.
Arkansas jumped out to a 16-point lead after just a quarter of play. The Hogs never gave that up in a lopsided match where Arkansas had as much as a 51-point advantage.
Five Hogs finished with double-digit scoring. Alexis Tolefree lead the way for Arkansas with 17 points, while Malica Monk (15), Chelsea Dungee (13), Bailey Zimmerman (11) and Jailyn Mason (11) didn't follow too far behind. Every player on the roster scored in the win.
Arkansas set a new school record for three-pointers with 15. The previous record was 12. The Razorbacks also blew past UAB in field goals, making 37-72 (51.4 percent) to the Blazers' 20-67 (29.9 percent). Arkansas also racked up 52 rebounds in the game.


Our 3rd annual Summer Solstice Night Market returns May 31st -June 1st in its new location, Magnuson Park Hangar 30.
Shops snack and dance your way over 150 booths along with a summer beer festival with live music!
Previously, this festival has been held at our South Lake Union Saturday Market. Join us in a larger venue over two days. Music stage will be hosted inside the summer beer festival garden, so you must be 21+ to enter.
There is a required cash donation that benefits a local non-profit with a suggested donation of $3 per person, 2 for $5. Thank you for your kind donation.


Thailand is a country famous for its rich culture, religion, people, food and their Costume…!!!
Thailand may not have always been a performer when it comes to beauty pageant, but the same holds contradictory when it comes to national costume round. They always manage to come up with something new, something modern yet extremely creative.
They have experimented many things in past, like you can see in collage, imitating elephant and its owner, various warriors, Thai goddess, Thai animals and what not?? They have always been excelling into the field of National costume. Even though they might not win every time, but we can't deny the fact that their costumes are always the center of attractions and the sweet charms of Thai girls just adds up to the overall look…!!!!


text:
Sayyed Arishfa Khan is an Indian actress and model popularly known for portraying
Nick Name Aru Profession Actress and Model Date of Birth 3 April 2003
Young Gunjan in Starplus show Ek Veer Ki Ardaas Veera (2012). Most recently, she is famous for having highest number (25 Million) of followers on Instagram.
Sayyed Arishfa Khan creates content around multiple verticals and has the power to appeals a huge community.
Sayyed Arishfa Khan is one of the most followed social media Influencers in India. Arishfa was born in Shahjahanpur Lucknow.
The actress came into the LimeLight after her appearance in TV serials like "Papa By Chance" and "Meri Durga".
Arishfa Khan has continued to entertain her audience on Instagram. The digital creator has a following of 29.3M with an engagement rate of 0.7%.
The content Arishfa creates is centred around dance singing, acting, comedy and travel.
The Indian youtuber usually posts vlogs, beauty, skin care, fashion, health, lifestyle and fitness content for her audience
The Diva created her YouTube channel on 27 June 2018; currently she has 2.54M subscribers. Currently she has uploaded 126 videos which account for 180M views.


Short films are supposed to wet the appetite of moviegoers.
In a very short window, the filmmaker has to tell virtually a complete story and leave the audience wanting a full-length feature film.
New filmmaker Marcus Freeman does that and more in "The Prank," a short film about a practical joke played on a classmate at the 15-year reunion of Joseph McBride High School.
Doug (Gregory Malonson) is that cat from high school that has not gotten over the wrongs done to him in the past.
He still has feelings for his high school sweetheart even though almost two decades have passed.
Furthermore, Doug still blames Kevin (Kedrin Birdwell) for breaking him and Dawn (Greta Jordan-Williams) up in high school.
While the rest of the class of McBride is eager to catch up and reminiscence on old times, Doug is out for revenge on Kevin.
He sets Kevin up with Francesca, a young "lady" with a controversial past.
Her metamorphosis makes her almost unrecognizable at the reunion.
However, before Kevin realizes the prank that has been played on him, a catastrophe erupts at the reunion that will make it impossible to correct an innocent joke.
"The Prank" is brilliant in its writing and its suspense.
Some filmmakers cannot set up a story and leave audiences on the edge of their seat after 120 minutes, and Freeman has managed to accomplish that feat in a mere 17 minutes.
The actors did a superb job with their performances, producing the type of emotion from audiences that veteran actors get paid the big bucks for.
Doug will be hated because of his childishness and pettiness, and people will have sympathy for Kevin and his predicament.
Unfortunately, some of the actors look a lot older than they would if they were only 15 years removed from high school.
Likewise, the reunion is held at a private home instead of a hotel or resort like many class reunions.
However, those minor details are due to circumstances not the brilliant talent of Freeman and his cast.
What Freeman is able to do with just 17 minutes and a small budget, makes one wonder what he could accomplish with a full-length feature and a big budget at his disposal.
The possibilities and promise of this new filmmaker has definitely wet the appetite of those who know his potential.
For more information on "The Prank" click here.


You must pay your tuition and applicable fees by the deadline each term. The deadline is published in the Academic Schedule.
Tuition fees are assessed by credit. Your amount owing will be listed in myStudentSystem once you enrol in courses. If you adjust your enrolment, changes to your account balance will be updated overnight. Make sure you check myStudentSystem the next day to verify the amount you owe.
$222 per billing credit. Each course is 3 billing credits.
per 3-credit course $666 Fees vary depending on number of credits per term.
Each course is 3 billing credits. Fees vary depending on number of credits per term. See International Tuition & Term Fees.
You can make a secure payment on your account through myStudentSystem. If you prefer not to pay online, there are several other ways to make a payment.
Under the Alberta Students Finance program, students are eligible for a maximum of 12 months of funding for Open Studies, which will be used as part of the "Years of Program +1" time limit. More specific information is available by contacting a financial advisor.
In general, Open Studies students are not eligible for MacEwan University scholarships, awards and bursaries.


I have worked on this since I posted the scale photo! The single image is the correct one!
This painting is a rework of one I did last year. I could not figure out what had me unsatisfied with the painting until I had a summer of painting under my belt again.The painting was nice before but lacked a certain amount of detail that I have added in this more recent version. It is my vision of the Cowpasture River from above and I finally feel I have nailed the look of the summer fields from a plane, or in this case, a helicopter, that helped me see closer, and more accurately what I wanted to convey.
I LOVE to work large. The problem comes in when I try to move them. I literally cannot hold this painting alone because yes, it is heavy, but my arm span is not big enough. Which can make for a challenging time when I am even painting it much less trying to photograph it. Thankfully I am married to someone a little taller and willing to help, It made me realize how key it is to take photos of the paintings in an actual space because I was convinced it was going to be too big for this space and in fact, is perfect. Painting large is one of my favorite things but there are so many hurdles to doing it that I only really let myself do it about half the amount I would really like to with the challenges it presents.


I must say I really don't like those lyrics!
And it's an interesting parallel you draw between the messages in Christianity and how they can be found in the superhero / comics genre. I did a display in my school library (CofE School) about how key messages and themes from Christianity can be found in many of the books the children read.


text:
Michigan to part ways with defensive backs coach Mike Zordich
The facelift of the coaching staff of Michigan Wolverines head coach Jim Harbaugh continues, with several new faces heading to Ann Arbor while also bidding goodbye to more than a few mainstays. The latest name that will be departing the Michigan sidelines is defensive backs coach Mike Zordich, who won't be retained by the Wolverines. … Read more
Categories U of M Tags Jim Harbaugh, Michigan Wolverines, Mike Zordich Leave a comment
Michigan set to hire Dallas Cowboys assistant coach as new co-defensive coordinator
The new-look staff of Michigan Wolverines head coach Jim Harbaugh continues to take shape, and they're reportedly zeroing in on a new co-defensive coordinator. Per multiple reports, the Wolverines are set to bring aboard Maurice "Mo" Linguist as the team's co-defensive coordinator, though a formal announcement hasn't been made yet. He'll be paired up with … Read more
Categories U of M Tags Dallas Cowboys, Jim Harbaugh, Maurice "Mo" Linguist, Michigan Wolverines Leave a comment
Michigan Wolverines head coach Jim Harbaugh has a new contract, and he's putting together a new look staff for the upcoming season. Having already hired Wolverines legend Mike Hart and former Ravens LB coach Mike Macdonald as defensive coordinator, Harbaugh is bringing in another outside hire. Maryland special teams coordinator and ILBs coach George Helow … Read more
Categories U of M Tags George Helow, Jim Harbaugh, Michigan Wolverines Leave a comment
Former Michigan G Caris LeVert out indefinitely after mass found on kidney
Former Michigan Wolverines forward Caris LeVert will be out indefinitely. LeVert, who was recently acquired by the Indiana Pacers from the Nets as part of the four-team trade that sent Victor Oladipo to the Houston Rockets, was discovered to have a small mass on his kidney following an MRI. "On behalf of my family and … Read more
Categories U of M Tags Caris LeVert, Michigan Wolverines Leave a comment
Jim Harbaugh's personal goals for 2021 include winning National Title
The Michigan Wolverines caught the attention of everyone nationally when they made the decision to re-sign head coach Jim Harbaugh at a greatly reduced (albeit incentive laiden) salary through 2025. During an appearance at the Michigan High School Football Coaches Association clinic, Harbaugh laid out a list of his personal goals for 2021 and beyond. … Read more
Categories U of M Tags Jim Harbaugh, Michigan Wolverines Leave a comment
Mike Hart releases statement after return to Michigan Wolverines
January 14, 2021 January 13, 2021 by Michael Whitaker
The Michigan Wolverines brought back a legend this afternoon as a key addition to head coach Jim Harbaugh's staff. Mike Hart, who earned three-time first-team All-Big Ten selections while setting school records for rushing yards and carries, will be in charge of the team's running backs. He's spent the last four years as running backs … Read more
Categories U of M Tags Jim Harbaugh, Michigan Wolverines, Mike Hart Leave a comment
Former Michigan coach Rich Rodriguez hired as Louisiana-Monroe OC
Former Michigan Wolverines head coach Rich Rodriguez has landed a new gig. He's taken the offensive coordinator position at Louisiana-Monroe under head coach Terry Bowden, whose brother Terry originally hired Rodriguez as his offensive coordinator at Tulane. Rodriguez has also served as head coach at West Virginia and Arizona. His son Rhett Rodriguez will be … Read more
Categories General Topic Tags Michigan Wolverines, Rich Rodriguez Leave a comment
Michigan surges while Michigan State drops out of latest AP Top 25 poll
It's a tale of two opposites with the latest release of the AP Top 25 College Basketball poll. The surging Michigan Wolverines now occupy the No. 7 spot on the poll following two straight wins of at least 19 points, including a 25 pt. destruction of the Minnesota Golden Gophers. Meanwhile, the Michigan State Spartans … Read more
Categories MSU, U of M Tags Michigan State Spartans, Michigan Wolverines, Tom Izzo Leave a comment
Desmond Howard shares thoughts on Michigan extending Jim Harbaugh
January 9, 2021 by Michael Whitaker
The news was made official earlier in the week – Jim Harbaugh isn't going anywhere. Harbaugh, who took over as Michigan's head coaching position in 2015, will remain with the University through at least the 2025 season. He'll be making a base salary of $4 million, with each year of the contract carrying a $3.475 … Read more
Categories U of M Tags Desmond Howard, Jim Harbaugh, Michigan Wolverines Leave a comment
COVID-19 issues postpone matchup between Michigan and Penn State
The Michigan Wolverines were set to take on the Penn State Nittany Lions on the hardwood this weekend. Now, that matchup has been delayed. Due to issues within the Penn State program, the game has been postponed, marking the 4th game the Nittany Lions have delayed. Penn State men's basketball has paused all team-related activities … Read more
Categories U of M Tags Michigan Wolverines, Penn State Nittany Lions Leave a comment
AP Top 25 poll sees Michigan and Michigan State move 6 spots in opposite direction
It's a tale of two opposites in the latest AP Top 25 College Basketball poll. The undefeated Michigan Wolverines have cracked the top 10 teams in the country, while the Michigan State Spartans have slipped six spots all the way down to 23. Conversely, Michigan climbed six spots following road victories over Maryland and Northwestern. … Read more
Categories MSU, U of M Tags Michigan State Spartans, Michigan Wolverines Leave a comment
Report suggests Jim Harbaugh contract extension will be wrapped up soon
The "will he or won't he" rumors surrounding the future of Jim Harbaugh and the University of Michigan could soon be put to rest. According to FOX Sports College Football reporter Bruce Feldman, a contract extension for Harbaugh set to run through 2026 is on the horizon. SOURCE: There is optimism inside Michigan that Jim … Read more
Dabo Swinney jokes about running for governor of Michigan while talking Ohio State
Clemson Tigers head coach Dabo Swinney is catching a bit of heat from fans of the Ohio State Buckeyes who didn't take kindly to rank them No. 11 in his Amway Coaches Poll from USA Today, and now he's speaking out about it. Promising that he didn't mean his ranking of the Buckeyes to be … Read more
Categories College Sports Tags Clemson, Dabo Swinney, Michigan Wolverines, Ohio State Buckeyes Leave a comment
Michigan leapfrogs Michigan State in latest AP poll
The Michigan Wolverines are cruising right now, having won their first seven games of the 2020-21 season. And as such, they've improved from No. 19 to No. 16 in the latest edition of the AP Poll. They're now the highest ranked team from the Mitten State. Meanwhile, things haven't been running as smoothly for the … Read more
4-star CB Ceyair Wright includes Michigan in top schools list
Los Angeles Loyola 2021 four-star prospect Ceyair Wright has included the Michigan Wolverines in his final seven schools he's deciding between, along with USC, Stanford, Oregon, Notre Dame, Nebraska and Arizona State. 7🖤 pic.twitter.com/uWPkUPIOPw — Ceyair (@ceyairr) December 24, 2020 The 6-foot-1, 175 lb. Wright visited Ann Arbor in November and had nothing but good … Read more
Categories U of M Tags Ceyair Wright, Michigan Wolverines Leave a comment
Fans have mixed reaction to Michigan dismissing Don Brown
The first major change to the coaching staff of Michigan Wolverines head coach Jim Harbaugh was announced earlier this afternoon, as maligned defensive coordinator Don Brown was given his pink slip after five years on the job in Ann Arbor. And while Brown earned the wrath of the fan base over the years following several … Read more
Categories U of M Tags Don Brown, Jim Harbaugh, Michigan Wolverines Leave a comment
GM Brad Holmes has message for skeptical Detroit Lions' fans
Super Bowl prop bet features Detroit Lions QB Matthew Stafford
Brad Holmes absolutely kills his first press conference as Detroit Lions' GM [Video]
christian felan on NFL executive approves of trade that would send Detroit Lions' QB Matthew Stafford home
ThisWebsiteIsClickbaitScam on Adrian Peterson's replacement just became available for the Detroit Lions


text:
\section{Introduction}

Uncertain renewable energy sources (RES) challenge the efficiency of existing wholesale electricity markets, which still lack risk-hedging financial instruments, \cite{bose2019some}.
As a result, electricity markets are incomplete with respect to uncertainty and risk, i.e. they do not provide market participants with a mechanism to secure their positions relative to all probable future states of the system.
{\color{black}
Motivated by the previously developed chance-constrained optimal power flow formulation in \cite{bienstock2014chance}, we developed a \textit{chance-constrained} stochastic electricity market design in \cite{kuang2018pricing, dvorkin2019chancemarket,mieth2019risk,mieth2019distribution},
}%
which internalizes the RES uncertainty and  produces uncertainty-aware electricity prices that support welfare efficiency, revenue adequacy and cost recovery.
{\color{black}
However, \cite{kuang2018pricing, dvorkin2019chancemarket,mieth2019risk,mieth2019distribution} assume (i) risk-neutrality and (ii) a single common belief on the system uncertainty.
In reality, market participants are likely to trade (i) in a risk-averse manner and (ii) with different uncertainty beliefs.
Thus, decisions are more conservative and lead to less efficient market outcomes if there is no opportunity to compensate the risk of uncertain cost with financial securities, \cite{ralph2011pricing}.}

Although common in the fields of stochastic optimization and finance \cite{rockafellar2007coherent}, the notion of risk aversion has only recently gained attention in power system operations and electricity markets.
For example, Hans \textit{et al.} \cite{hans2019risk} developed risk-averse control strategies for decentralized generation resources and Kazempour \textit{et al.} \cite{kazempour2016effects} explored the effects of risk-averse electricity producers in a two-stage market equilibrium.
However, while hedging uncertain cost against risk using the conditional value-at-risk (CVaR),  \cite{hans2019risk,kazempour2016effects} do not consider risk trading.
{\color{black}
On the other hand, building on the theoretical groundwork of Ralph and Smeers \cite{ralph2011pricing,ralph2015risk}, Philpott \textit{et al.} \cite{philpott2016equilibrium} proposed a risk-complete multi-stage scenario-based stochastic energy market by introducing risk-trading via Arrow-Debreu Securities (ADS). This risk completeness, i.e.  risk trading via financial instruments parallel to all other traded assets and services, provably enabled the existence of a risk-averse competitive equilibrium, if all market participants are endowed with a coherent risk measure.
}
{Gérard \textit{et al.} \cite{gerard2018risk} applied the result from \cite{philpott2016equilibrium} to a two-stage stochastic electricity market and showed that a risk-averse equilibrium might not be unique.
In line with \cite{philpott2016equilibrium,gerard2018risk}, Cory-Wright and Zakeri \cite{cory2018stochastic} demonstrated that different risk perceptions of market participants may encourage them to act strategically, thus causing suboptimal market outcomes, which can be avoided in risk-complete electricity markets. }

Departing from  scenario-based stochastic programming used in market designs in \cite{kazempour2018stochastic,martin2014stochastic,wong2007pricing,philpott2016equilibrium,kazempour2016effects,gerard2018risk}, this paper explores risk trading via ADS in the chance-constrained electricity market proposed in \cite{kuang2018pricing,dvorkin2019chancemarket,mieth2019risk,mieth2019distribution}.
{\color{black}
Unlike  data-demanding scenario-based approaches, chance constraints only require statistical moments to  internalize uncertainty in the market design using  continuous probability distributions.
Therefore, we first develop a general risk-complete chance constrained electricity market with continuous, infinite-dimensional ADS. Second, we show that ADS can be  discretized to enable  practical risk contracts for a given set of uncertain outcomes.
}
Finally, this paper   analyzes risk-averse market outcomes and investigates the effects of risk trading on market prices.

\section{Chance-constrained  Electricity Market}

Consider a chance-constrained electricity market as in \cite{dvorkin2019chancemarket,mieth2019risk,kuang2018pricing}. Let $\set{N}$, $\set{G}$, $\set{U}$ be sets of nodes, conventional generators, and RES. The market operator solves:
\allowdisplaybreaks
\begin{subequations}
\begin{align}
     \min_{p_{G,i}, \alpha_i}  \quad &
     \RM_0 \left[\sum_{i\in\set{G}} c_i(p_{G,i}(\bm{\omega}))\right] \label{base:objective}\\
    \text{s.t.} \quad
    & p_{U,i}(\bm{\omega}_i) = p_{U,i} + \bm{\omega}_i && \forall i \in \set{U} \label{base:uncert_res}\\
    & p_{G,i}(\bm{\omega}) = p_{G,i} - \alpha_i^{\top} \bm{\omega} && \forall i \in \set{G} \label{base:uncert_generation}\\
    (\delta_i^+): \quad
        & \Prb[p_{G,i}(\bm{\omega}) \leq \overline{p}_{G,i}] \geq 1-\epsilon_g && \forall i \in \set{G}  \label{base:upper_gen_cc}\\
    (\delta_i^-): \quad
        & \Prb[p_{G,i}(\bm{\omega}) \geq \underline{p}_{G,i}] \geq 1-\epsilon_g && \forall i \in \set{G} \label{base:lower_gen_cc}  \\
    (\theta): \quad
        & \Prb[F(p_{G}(\bm{\omega}), p_{U}(\bm{\omega}), p_{D}) \in \set{F}] \geq 1-\epsilon_f \hspace{-2cm}&& \label{base:flowconstraints} \\
    (\lambda_i): \quad
        &  p_{G,i} + p_{U,i} + p_i(F)  = p_{D,i} && \forall i \in \set{N}\label{base:enerbal}\\
    (\chi_u): \quad
        & \sum_{i\in\set{G}} \alpha_{i,u} = 1 && \forall u \in \set{U} \label{base:balbal},
\end{align}%
\label{mod:base-cc}%
\end{subequations}%
\allowdisplaybreaks[0]%
where  \cref{base:objective} minimizes the system operating cost evaluated by measure $\RM_0$ (e.g. expectation, if $\RM_0 \equiv \Eptn$) over the random vector of RES forecast errors $\bm{\omega}=[\bm{\omega}_i, i\in\set{U}]$ and given the cost function of each generator $c_i(p_{G,i})$. Eq.~\cref{base:uncert_res} models the uncertain RES power output $p_{U,i}(\bm{\omega}_i)$ at node $i$ as the RES forecast $p_{U,i}$ plus the  RES forecast error $\bm{\omega}_i$. Eq.~\cref{base:uncert_generation} defines the power output of conventional generators under uncertainty $p_{G,i}(\bm{\omega})$ using an affine control policy, where  $p_{G,i}$  and  $\alpha_i = [0\leq  \alpha_{i,u}\leq 1, u \in \set{U}]$ are decisions for the scheduled power output and the vector of participation factors for balancing reserve of generator $i$. Note that $\alpha_{i,u}$ denotes the participation factor  of generator $i$ in response to the RES forecast error at node $ u \in \set{U}$.  Chance constraints \cref{base:upper_gen_cc,base:lower_gen_cc} ensure the power output of conventional generator $i$ under uncertainty does not exceed the upper  or lower   limits $\overline{p}_{G,i}$ and $\underline{p}_{G,i}$  with a probability of $1-\epsilon_g$. Similarly, \cref{base:flowconstraints} ensures that DC power flows computed using function $F(p_{G,i}(\bm{\omega}), p_{U,i}(\bm{\omega}), p_{D,i})$, which maps net nodal injections in power flows, are contained in a convex set of feasible power flows given by $\set{F}$ with a probability of $1-\epsilon_f$.
Finally,  \cref{base:enerbal} is the nodal power balance constraint given the nodal  demand and  power flow injections  $p_{D,i}$ and  $p_i(F)$.
{\color{black}
Eq.~\cref{base:balbal} ensures that the procured balancing reserve is sufficient to mitigate $\bm{\omega}$.
}
Greek letters in parentheses denote dual multipliers.

\subsection{Deterministic Reformulation}

Assuming that $c_i(p_{G,i})$ is  quadratic:
\begin{equation}
    c_i(p_{G,i}(\bm{\omega})) = c_{2i}(p_{G,i}(\bm{\omega}))^2 + c_{1i}p_{G,i}(\bm{\omega}) + c_{0i},
\end{equation}
where  $c_{2i}$,  $c_{1i}$,  $c_{0i}$ are cost coefficients, and using $\RM_0 \equiv \Eptn$ and $\bm{\omega} \sim \mathcal N(0, \Sigma)$, where $\Sigma$ is the covariance matrix of $\bm{\omega}$, \cref{mod:base-cc} has a tractable convex (conic) reformulation, \cite{bienstock2014chance}:
\allowdisplaybreaks
\begin{subequations}
\begin{align}
     \min_{\substack{p_{G,i}, \alpha_i \\ s_{p_{G,i}}}} \quad
        & \sum_{i\in\set{G}} c_i(g_i) + c_{2i} \norm{\alpha_i^{\top}\Sigmart}_2^2 \label{base_ref:objective}\\
    \text{s.t.}\quad
    (\zeta_i): \quad
        & s_{p_{G,i}} \geq \norm{\alpha_i^\top \Sigmart}_2  && \forall i \in \set{G} \label{base_ref:zeta_i}\\
    (\delta_i^+): \quad
        & p_{G,i} + z_{1-\epsilon_g} s_{p_{G,i}} \leq \overline{p}_{G,i} && \forall i \in \set{G}  \label{base_ref:upper_gen_cc}\\
    (\delta_i^i): \quad
        & -p_{G,i} + z_{1-\epsilon_g} s_{p_{G,i}} \leq -\underline{p}_{G,i} && \forall i \in \set{G}  \label{base_ref:lower_gen_cc} \\
    (\theta): \quad
        & \tilde{F}_{\epsilon_f}(p_{G}, p_{U}, p_{D}, \alpha) \leq 0 \label{base_ref:flowconstraints} \\
    (\lambda_i): \quad
        &  p_{G,i} + p_{U,i} + p_i(\tilde{F}_{\epsilon_f})  = p_{D,i} && \forall i \in \set{N}\label{base_ref:enerbal}, \\
    (\chi_u): \quad
        & \sum_{i\in\set{G}} \alpha_{i,u} = 1 && \forall u \in \set{U} \label{base_ref:balbal},
\end{align}%
\label{mod:base-cc_ref}%
\end{subequations}%
\allowdisplaybreaks[0]%
where  ${z_{1-\epsilon} = \Phi^{-1}(1-\epsilon)}$ is the quantile function of the standard normal distribution and  $s_{p_{G,i}}$ is an auxiliary decision variable modeling the standard deviation of $p_{G,i}(\bm{\omega})$.
{\color{black}
As explained in \cite{mieth2019distribution}, the  reserve provided by each producer can then be computed as $z_{1-\epsilon_g} s_{p_{G,i}}$, where $s_{p_{G,i}}$  depends on participation factors $\alpha_i$.
}
{\color{black
(Note that this expression holds even for more general distribution assumptions on $\bm{\omega}$, see  \cite{dvorkin2019chancemarket}).}
Function $\tilde{F}_{\epsilon_f}(\cdot)$ in \cref{base_ref:flowconstraints} maps the decision variables, parameters, statistical characteristics of $\bm{\omega}$ and security threshold $\epsilon_f$ into a vector of power flows with security margins so that \cref{base_ref:flowconstraints} is equivalent to chance constraint \cref{base:flowconstraints}.

\subsection{Equilibrium Formulation}

The optimization problem  in  \cref{mod:base-cc,mod:base-cc_ref} represents a risk-neutral market operator and has been proven to yield  energy and balancing reserve prices $\lambda_i$ and $\chi_u$, which solve the following equilibrium, \cite{kuang2018pricing,dvorkin2019chancemarket,mieth2019risk}:
\begin{subequations}
\begin{align}
&\begin{Bmatrix*}[l]
    \max_{\substack{p_{G,i}, \alpha_i \\ s_{p_{G,i}}}} \
        & \lambda_i p_{G,i} + \chi^{\top} \alpha_i - \Eptn[c_i(p_{G,i}(\bm{\omega}))] \\
        \hfill \text{s.t.} &  \text{\cref{base_ref:zeta_i,base_ref:upper_gen_cc,base_ref:lower_gen_cc}} \\
\end{Bmatrix*},\ \forall i \in \set{G} \label{base_eq:prod_problems} \\
    & \qquad \qquad \qquad \
    \text{\color{black} \cref{base_ref:enerbal,base_ref:balbal,base_ref:flowconstraints}}
    \label{base_eq:market_clearing}

\end{align}%
\label{mod:base_eq}%
\end{subequations}%
where \cref{base_eq:prod_problems} is a profit maximization solved by each  conventional generator (producer)  and
{\color{black} \cref{base_eq:market_clearing} are the  market-clearing conditions.}
As shown in \cite{dvorkin2019chancemarket,mieth2019risk,kuang2018pricing}, $\lambda_i$ and $\chi_u$ can be interpreted as  equilibrium energy and reserve prices.

\section[Risk-Averse Chance-Constrained Electricity Market]%
    {Risk-Averse Chance-Constrained\\ Electricity Market}

The optimization in \cref{base_eq:prod_problems} solved by each producer is risk neutral because it assumes average (expected) outcomes of random  $\bm{\omega}$. In practice, however, producers are likely to hedge against the risk of uncertain costs based on their risk perception.
This section considers risk-averse profit maximizing producers endowed with  a \textit{risk measure} $\RM_i$.

\subsection{Coherent Measures of Risk}

Intuitively, a risk measure evaluates an uncertain outcome $\mathbf{Z}$ in terms of an equivalent deterministic outcome $\RM[\mathbf{Z}]$ so that a producer endowed with risk measure $\RM$ is indifferent between accepting uncertain $\mathbf{Z}$ or its certainty equivalent $\RM[\mathbf{Z}]$.
Additionally, a risk measure is called \textit{coherent} if it satisfies some fundamental mathematical properties such as monotonicity, positive homogeneity, translation invariance and convexity, \cite{rockafellar2007coherent}.
For example, the expectation operator $\Eptn$ is a coherent measure of risk, \cite{rockafellar2007coherent}, but neglects the volatility of outcomes, and is therefore associated with risk-neutrality.

Any coherent risk measure can be expressed as, \cite{rockafellar2007coherent}:
\begin{align}
    \RM[\mathbf{Z}] = \sup_{\Prb\in\set{D}} \Eptn_{\Prb}[\mathbf{Z}] \label{eq:risk_measure_reform}
\end{align}
where $\set{D}$ denotes the \textit{risk set} (risk envelope) of $\RM$, i.e. a compact convex set of probability measures, and $\Eptn_{\Prb}$ is the expectation over the probability measure $\Prb$.
Risk set $\set{D}$ uniquely defines $\RM$ and can be structured such that $\sup_{\Prb\in\set{D}} \Eptn_{\Prb}[\mathbf{Z}]$ is identical to specific risk measures, e.g. CVaR, \cite{rockafellar2007coherent}.

\begin{remark}
\label{rem:dis_robust_connection}
Defining a risk measure in terms of a worst-case probability distribution as in \cref{eq:risk_measure_reform} is structurally identical to \textit{distributionally robust optimization} that can be applied to chance constraints \cref{base:upper_gen_cc,base:lower_gen_cc,base:flowconstraints}, see e.g. \cite{dvorkin2019chancemarket}.
This work, however, focuses on the evaluation of the objective,
{\color{black} i.e. the reformulation of  constraints in \cref{base_ref:upper_gen_cc,base_ref:lower_gen_cc,base_ref:flowconstraints} remains unchanged.
}
\end{remark}

\subsection{Risk-Averse Profit Maximization}
\label{ssec:risk_avers_profit_maximization}

To derive a risk-averse modification of \cref{mod:base-cc_ref}, we define a risk set using a moment ambiguity set, which generally yields tractable convex optimization problems, \cite{delage2010distributionally}.
Thus, the risk set of each producer $i$ is:
\begin{align}
    \set{D}_i = \{\Prb(\bm{\omega}) \in \set{P} \mid \Eptn_{\Prb}[\bm{\omega}] = 0, \Var_{\Prb}[\bm{\omega}] \in \set{S}_i\},
\label{eq:Di_discrete}
\end{align}
where $\set{P}$ is the set of probability distributions  and $\set{S}_i = \{\Sigma_1,...,\Sigma_K\}$ is the set  of  $K$ covariance matrices ($\Sigma_1,...,\Sigma_K$), where $K$  is the same for all producers.
{\color{black}
Set $\set{S}_i$, and thus set $\set{D}_i$, captures the belief of producers on the accuracy of RES forecast data and forecasting methods.
Notably, set $\set{D}_i$ is a set of continuous distributions as opposed to discrete polyhedral probability measures in \cite{philpott2016equilibrium,gerard2018risk}, which rely on a given set of pre-described scenarios.
Hence, using \cref{eq:Di_discrete,eq:risk_measure_reform} yields:}
\begin{equation}
\begin{split}
    &\min_{p_{G,i}, \alpha_i} \quad \sup_{\Prb\in\set{D}_i}  \Eptn_{\Prb}[ c_i(p_{G,i}(\bm{\omega}))] \\
    &\quad = \min_{p_{G,i}, \alpha_i} \quad c_i(p_{G,i}) + \sup_{k=1,...,K} c_{2i} \norm{\alpha_i^{\top} \Sigmartk}_2^2.
\end{split}
\label{eq:wc_cost1}
\end{equation}
Although $\set{D}_i$ as defined in \cref{eq:Di_discrete} is non-convex, solving \cref{eq:wc_cost1} is equivalent to solving the following problem with  convex polyhedral set $\tilde{\set{S}}_i = \conv(\set{S}_i)$, \cite[Section 6.4.2]{boyd2004convex}:
\begin{equation}
    \min_{p_{G,i}, \alpha_i} \quad c_i(p_{G,i}) + \sup_{\Sigma_k \in \tilde{\set{S}}_i} c_{2i} \norm{\alpha_i^{\top} \Sigmartk}_2^2
\label{eq:risk_adjusted_cost_ref}
\end{equation}
and we can define:
\begin{align}
    \tilde{\set{D}}_i = \{\Prb(\bm{\omega}) \in \set{P} \mid \Eptn_{\Prb}[\bm{\omega}] = 0, \Var_{\Prb}[\bm{\omega}] \in \tilde{\set{S}}_i\}
\label{eq:Di_contin}
\end{align}
as the convex counterpart of $\set{D}_i$, which yields the following coherent risk measure:
\begin{equation}
    \RM_i \left[ c_i(p_{G,i}(\bm{\omega}))\right] = \sup_{\Prb\in\tilde{\set{D}}_i}  \Eptn_{\Prb}[ c_i(p_{G,i}(\bm{\omega}))].
\end{equation}

{\color{black}
Using the epigraph form of \cref{eq:risk_adjusted_cost_ref}, the cost minimization in \cref{mod:base-cc_ref} can be recast as the following risk-averse modification:
\begin{subequations}
\begin{align}
    \min_{\substack{p_{G,i}, \alpha_i \\ s_{p_{G,i}}, t_i}} \quad
        & \sum_{i\in\set{G}} (c_i(p_{G,i}) + t_i) \label{ra_ccopf:objectve}\\
    \text{s.t.} \quad
        & \text{\cref{base_ref:zeta_i,base_ref:upper_gen_cc,base_ref:lower_gen_cc,base_ref:flowconstraints,base_ref:enerbal,base_ref:balbal}} \\
    (\eta_{i,k}): \quad
        & t_i \geq c_{2i} \norm{\alpha_i^{\top} \Sigmartk}_2^2 \quad \forall \Sigma_k \in \set{S}_i,\, \forall i. \label{ra_ccopf:wc_cost}
\end{align}%
\label{mod:ra_ccopf}%
\end{subequations}%
Similarly, the risk-averse modification of  \cref{base_eq:prod_problems} follows as:
\begin{subequations}
\begin{align}
    \min_{\substack{p_{G,i}, \alpha_i \\ s_{p_{G,i}}, t_i}} \quad
        & \lambda_i p_{G,i} + \chi^{\top} \alpha_i - c_i(p_{G,i}) - t_i \\
    \text{s.t.} \quad
        & \text{\cref{base_ref:zeta_i,base_ref:upper_gen_cc,base_ref:lower_gen_cc,ra_ccopf:wc_cost}}.

\end{align}%
\label{mod:ra_proftimax}%
\end{subequations}%
}%
{\color{black}
Note that  $\Sigma$ in \cref{base_ref:zeta_i} remains unchanged and common for all producers as indicated by Remark~\ref{rem:dis_robust_connection}.
}

\begin{remark}
Unlike in \cref{base_eq:prod_problems}, the risk-averse profit maximization in \cref{mod:ra_proftimax} allows different producers to have different perceptions of the system uncertainty, which can be modeled as different risk attitudes drawn from producer-specific set $\set{D}_i$.
\end{remark}

\section[Risk Trading in the Chance-Constrained Electricity Market]%
{Risk Trading in the Chance-Constrained \\ Electricity Market}
\label{sec:risk_trading}

If producer $i$ is endowed with coherent risk measure $\mathbb{F}_i$ given by risk set $\set{D}_i$ and seeks to maximizes its risk adjusted profit as in \cref{mod:ra_proftimax},
{\color{black}
its decision will be more conservative in the absence of risk-trading opportunities.
Thus, a risk-incomplete market as in \cref{mod:ra_ccopf} will be less efficient and suffer welfare losses.
}
This section describes an approach to complete the chance-constrained market with respect to risk by introducing ADS trading.

\subsection{Continuous Risk Trading}
\label{ssec:continous_risk_trading}

ADS as introduced in \cite{arrow1973role} is a common security contract that depends on the outcome of an uncertain asset, which in the case of the chance-constrained electricity market in \cref{mod:ra_ccopf} is the RES forecast error given by  $\bm{\omega}$. Thus, a buyer of the contract pays price $\mu(\bm{\omega})$ to receive a payment of $1$ for a pre-defined realization of $\bm{\omega}$. Hence, if producer $i$ seeks to receive a payment of $a_i(\bm{\omega})$ for all possible $\bm{\omega}$, it pays in advance:
\begin{equation}
    \pi_{a_i} = \int_\Omega \mu(\bm{\omega}) a_i(\bm{\omega}) d\bm{\omega}
\label{eq:ADS_cost}
\end{equation}
where $\Omega$ is the space of all possible outcomes of random  $\bm{\omega}$. If $a_i(\bm{\omega}) \leq 0$, then producer $i$ sells ADS (i.e. provides  security to the system) and receives the payment of $\pi_{a_i}\leq0$. Otherwise, if  $a_i(\bm{\omega}) \geq 0$, producer $i$ purchases ADS and pays $\pi_{a_i}\geq0$.
Further, the market must ensure revenue adequacy, i.e. that the amount of ADS purchased and sold match:
\begin{equation}
  (\mu(\bm{\omega})): \quad  \sum_{i\in\set{G}} a_i(\bm{\omega}) = 0 \quad \forall \bm{\omega} \in \Omega.
\label{eq:ads_market_clearing}
\end{equation}
Given the risk trading model in  \cref{eq:ADS_cost,eq:ads_market_clearing}, each profit-maximizing producer can be modeled as follows:
\allowdisplaybreaks
\begin{subequations}
\begin{align}
    \max_{\substack{p_{G,i}, \alpha_i, a_i(\bm{\omega}) \\ s_{p_{G,i}}, t_i}} \quad
        & \lambda_i p_{G,i} + \chi^{\top} \alpha_i - t_i - \pi_{a_i} \\
    \text{s.t.} \quad
        & \text{\cref{base_ref:zeta_i,base_ref:upper_gen_cc,base_ref:lower_gen_cc}} \\
    (\eta_{i,k}): \quad
        & \hspace{-3pt}t_i\!\geq\!\Eptn_{\Prb_k}[c_i(p_{G,i}(\bm{\omega}))]\!-\!\Eptn_{\Prb_k}[a_i(\bm{\omega})], \ \forall \Prb_k\!\in\!\set{D}_i, \label{ra_proftimax_ads:exp_cost}
\end{align}%
\label{mod:ra_proftimax_ads}%
\end{subequations}%
\allowdisplaybreaks[0]%
where $\pi_{a_i}$ reflects the additional cost or revenue  due to risk trading, as given in \cref{eq:ADS_cost}, and  $\Eptn_{\Prb_k}[a_i(\bm{\omega})]$ in \cref{ra_proftimax_ads:exp_cost} is the expected ADS cost or revenue  over  probability measure $\Prb_k$. Given \cref{eq:ads_market_clearing} and \cref{mod:ra_proftimax_ads}, extending the risk-averse market-clearing in \cref{mod:ra_ccopf} with risk trading yields:
\allowdisplaybreaks
\begin{subequations}
\begin{align}
    \min_{\substack{p_{G,i}, \alpha_i, a_i(\bm{\omega}) \\ s_{p_{G,i}}, t_i}} \quad
        & \sum_{i\in\set{G}} (c_i(p_{G,i}) + t_i) \label{rt_ccopf:objectve}\\
    \text{s.t.} \quad
        & \text{\cref{base_ref:zeta_i,base_ref:upper_gen_cc,base_ref:lower_gen_cc,base_ref:flowconstraints,base_ref:enerbal,base_ref:balbal,eq:ads_market_clearing,ra_proftimax_ads:exp_cost}},

\end{align}%
\label{mod:rt_ccopf}%
\end{subequations}%
\allowdisplaybreaks[0]%
where \cref{eq:ads_market_clearing} enforces the market-clearing condition yielding dual multiplier $\mu(\bm{\omega})$. Using \cref{mod:rt_ccopf} and under the assumption that set $\set{F}$ is sufficiently large to accommodate injections $p_{G}(\bm{\omega})$, $p_{U}(\bm{\omega})$, $p_{D}$ without causing network congestion%
\footnote{This assumption simplifies derivations%
\textcolor{black}{, but the result holds for the congested case if  transmission assets and services  are priced \cite{o2008towards}}.}
(i.e. energy prices are uniform  $\lambda = \lambda_i$), we prove:
\begin{prop}
\label{prop:equivalence_to_mu}
    Let $\lambda$, $\chi$, and $\mu(\bm{\omega})$ be equilibrium energy, balancing, and risk prices, respectively, so that $\{\lambda; \chi_u; \mu(\bm{\omega}); p_{G,i}, \forall i \in \set{G}; \alpha_i, \forall i \in \set{G}; a_i(\bm{\omega}), \forall i \in \set{G}\}$ solves \cref{mod:rt_ccopf}.
    Then $\mu(\bm{\omega})$ can be interpreted as a probability measure that solves a risk-neutral equivalent of the risk-averse profit maximization with ADS trading.
\end{prop}

\noindent\textit{Proof. }
The market-clearing problem in \cref{mod:rt_ccopf}
{\color{black}%
remains
}%
convex as long as $a_i(\bm{\omega})$ is convex in $\bm{\omega}$.  Therefore, KKT conditions can be invoked.
The Lagrangian function of the profit maximization of each producer in \cref{mod:ra_proftimax_ads}  can be written as:
\allowdisplaybreaks
\begin{align}
    \mathcal{L}_i &= \lambda p_{G,i} + \chi^{\top} \alpha_i - t_i - \pi_{a_i} - \zeta_i(\norm{\alpha_i^\top \Sigmart}_2 - s_{p_{G,i}}) \nonumber \\
                & \quad - \delta_i^+\!(p_{G,i}\!+\!z_{\epsilon} s_{p_{G,i}}\!\!\!-\! \overline{p}_{G,i})
                \!-\! \delta_i^-\!(-p_{G,i}\!+\!z_{\epsilon} s_{p_{G,i}} \!\!\!+\! \underline{p}_{G,i})   \nonumber  \\
                & \quad - \sum_{k=1}^K \eta_{i,k}(\Eptn_{\Prb_k}[c_i(p_{G,i}(\bm{\omega})) - a_i(\bm{\omega})] - t_i) \label{eq:lagrangian_ind}

\end{align}%
\allowdisplaybreaks[0]%
Hence, the resulting optimality conditions for $t_i$, $a_i(\bm{\omega})$ are:
\allowdisplaybreaks
\begin{align}
\begin{split}
    \frac{\partial\mathcal{L}_i}{\partial t_i} &= -1 + \sum_{k=1}^K \eta_{i,k} = 0
        \quad \Rightarrow \quad  \sum_{k=1}^K \eta_{i,k} = 1
\end{split}\label{eq:Li_over_ti}\\
\begin{split}
    \frac{\partial\mathcal{L}_i}{\partial a_i(\bm{\omega})} &= -\mu(\bm{\omega}) + \sum_{k=1}^K \eta_{i,k} f(\bm{\omega},\sigma_k) = 0 \\
    & \Rightarrow \quad \mu(\bm{\omega}) = \sum_{k=1}^K \eta_{i,k} f(\bm{\omega},\Sigma_k),
\end{split}\label{eq:Li_over_aom}%
\end{align}%
\allowdisplaybreaks[0]%
where  $f(\bm{\omega},\Sigma_k)$ denotes  the probability density function  of a multivariate, zero-mean distribution with covariance $\Sigma_k$.
{\color{black}
Note that for the derivation of \cref{eq:Li_over_aom} we used:
\allowdisplaybreaks
\begin{align}
    \frac{\partial \pi_{a_i}}{a_i(\bm{\omega})}
        &= \frac{\partial}{\partial a_i(\bm{\omega})} \int_\Omega \mu(\bm{\omega}) a_i(\bm{\omega}) d\bm{\omega}  = \mu(\bm{\omega}),\\
    \frac{\partial}{\partial a_i(\bm{\omega})}\!\Eptn_{\Prb_k}[a_i(\bm{\omega})]
        \!&=\!\frac{\partial}{a_i(\bm{\omega})}\!\int_\Omega\!\!a_i(\bm{\omega}) f(\bm{\omega},\Sigma_k)d\bm{\omega} =\! f(\bm{\omega},\Sigma_k).
\end{align}%
\allowdisplaybreaks[0]%
}%
Conditions \cref{eq:Li_over_ti,eq:Li_over_aom} lead to two relevant observations:
\begin{enumerate}[(O1), topsep=0.5ex, itemsep=0.5ex]
    \item Dual multiplier $\mu(\bm{\omega})$ in \cref{eq:ads_market_clearing} is a probability measure as it is the weighted average of $K$ probability density functions with zero means and covariance matrices $\Sigma_1,...,\Sigma_k$. In other words,  random  $\mathbf{Z}(\bm{\omega})\sim\mu(\bm{\omega})$ has the expected value of $\Eptn_{\mu}[\mathbf{Z}(\bm{\omega})] = 0$ and the variance of $\Var_\mu[\mathbf{Z}(\bm{\omega})] = \sum_{k=1}^K \eta_{i,k} \Sigma_k$.

    \item Since $\tilde{S}_i$ is a convex set, condition \cref{eq:Li_over_ti} ensures that ${\sum_{i=1}^K \eta_{i,k} \Sigma_k \in \tilde{S}_i}$ and thus $\mu(\bm{\omega}) \in \tilde{\set{D}}_i$.
\end{enumerate}
The set of optimal decisions $\{\lambda; \chi_u; \mu(\bm{\omega}); p_{G,i}, \forall i \in \set{G}; \alpha_i, \forall i \in \set{G}; a_i(\bm{\omega}), \forall i \in \set{G}\}$  maximize $\mathcal{L}_i$  given in \cref{eq:lagrangian_ind}.  Using observation O1,  the fifth term in \cref{eq:lagrangian_ind} recasts  as:
\allowdisplaybreaks
\begin{align}
    & \sum_{k=1}^K \eta_{i,k}(\Eptn_{\Prb_k}[c_i(p_{G,i}(\bm{\omega})) - a_i(\bm{\omega})]) \nonumber \\
    & \quad = \sum_{k=1}^K \eta_{i,k} \int_{\Omega}[c_i(p_{G,i}(\bm{\omega})) - a_i(\bm{\omega})]f(\bm{\omega},\Sigma_k)d\bm{\omega} \nonumber  \\
    & \quad = \int_{\Omega}[c_i(p_{G,i}(\bm{\omega})) - a_i(\bm{\omega})]\sum_{k=1}^K\eta_{i,k} f(\bm{\omega},\Sigma_k)d\bm{\omega} \label{eq:risk_neutral_equiv} \\
    & \quad = \int_{\Omega}[c_i(p_{G,i}(\bm{\omega})) - a_i(\bm{\omega})]\mu(\bm{\omega})d\bm{\omega} \nonumber  \\
    & \quad = \Eptn_{\mu}[c_i(p_{G,i}(\bm{\omega}))] - \pi_{a_i}. \nonumber
\end{align}%
\allowdisplaybreaks[0]%
Substituting  \cref{eq:risk_neutral_equiv} in \cref{eq:lagrangian_ind}  leads to:
\begin{equation}
   \mathcal{L}_i =  p_{G,i} + \chi \alpha_i - \Eptn_{\mu}[c_i(p_{G,i}(\bm{\omega}))] - y_i^{\delta} - y_i^{\zeta},
\label{eq:risk_neutrak_profit_equiv}
\end{equation}
where $y_i^{\delta}$, $y_i^{\zeta}$ denote the terms related to duals $\delta_i$, $\zeta_i$ in \cref{eq:lagrangian_ind}.  Hence, \cref{eq:risk_neutrak_profit_equiv} is a risk-neutral equivalent, evaluated with respect to probability measure $\mu(\bm{\omega})$, of the risk-averse profit of producer~$i$ participating in risk trading with ADS.
\hspace*{\fill} $\square$

Given Proposition~\ref{prop:equivalence_to_mu}, the optimization of individual producers in \cref{mod:ra_proftimax_ads} is related to the risk-averse chance-constrained electricity market with ADS trading in \cref{mod:rt_ccopf}:
\begin{prop}
\label{prop:wc_socialplaner}
    Let $\lambda$, $\chi_u$, and $\mu(\bm{\omega})$ be equilibrium energy, balancing, and risk prices so that $\{\lambda; \chi_u; \mu(\bm{\omega}); p_{G,i}, \forall i \in \set{G}; \alpha_i, \forall i \in \set{G}; a_i(\bm{\omega}), \forall i \in \set{G}\}$ solves problem \cref{mod:rt_ccopf}.
    Assuming that risk sets $\tilde{\set{D}}_i, i \in \set{G}$ are non-disjoint, i.e. $\bigcap_{i \in \set{G}}\tilde{\set{D}}_i \neq \emptyset$, then these prices and allocations solve the risk-averse chance-constrained market with risk trading with $\tilde{\set{D}}_0 = \bigcap_{i \in \set{G}}\tilde{\set{D}}_i$ and worst case probability measure $\mu(\bm{\omega})$.
\end{prop}
\noindent\textit{Proof. }
Given the optimal solution for each producer, it follows from the complementary slackness of \cref{ra_proftimax_ads:exp_cost}:
\begin{equation}
    \eta_{i,k}(\Eptn_{\Prb_k}[c_i(p_{G,i}(\bm{\omega})) - a_i(\bm{\omega})] - t_i) = 0.
    \label{eq:exp_cost_complementary_slackness}
\end{equation}%
{\color{black}
By summing \cref{eq:exp_cost_complementary_slackness} over all $i$ and $k$, comparing with \cref{eq:risk_neutral_equiv}, and using \cref{eq:ads_market_clearing} to eliminate $\pi_{a_i}$, we write:
}
\allowdisplaybreaks
\begin{align}
    \sum_{i\in\set{G}} t_i
        & = \sum_{i\in\set{G}} \sum_{k=1}^K \eta_{i,k}(\Eptn_{\Prb_k}\left[c_i(p_{G,i}(\bm{\omega})) - a_i(\bm{\omega})\right]  \nonumber \\
        & = \Eptn_{\mu}\left[\sum_{i\in\set{G}}c_i(p_{G,i}(\bm{\omega})\right]. \label{eq:sum_over_ti}
\end{align}%
\allowdisplaybreaks[0]%
Also, since \cref{ra_proftimax_ads:exp_cost} is a convex epigraph, it follows:
\begin{equation}
\begin{split}
    t_i &= \max_{\Prb \in \set{D}_i}     \Eptn_{\Prb_k}[c_i(p_{G,i}(\bm{\omega})) - a_i(\bm{\omega})] \\
        &= \max_{\Prb \in \tilde{\set{D}}_i}     \Eptn_{\Prb_k}[c_i(p_{G,i}(\bm{\omega})) - a_i(\bm{\omega})].
\label{eq:t_i}
\end{split}%
\end{equation}%
Given \cref{eq:t_i}, term  $ \sum_{i\in\set{G}} t_i $ in \cref{eq:sum_over_ti}  can also be written as:
\allowdisplaybreaks
\begin{align}
    \sum_{i\in\set{G}} t_i & =  \sum_{i\in\set{G}} \max_{\Prb_k \in \tilde{\set{D}}_i} \Eptn_{\Prb_k}[c_i(p_{G,i}(\bm{\omega})) - a_i(\bm{\omega})] \nonumber \\
    & \stackrel{\text{\circled{\footnotesize A}}}{\geq} \max_{\Prb \in \bigcap_{i \in \set{G}} \tilde{\set{D}}_i} \Eptn_{\Prb}\left[\sum_{i\in\set{G}}c_i(p_{G,i}(\bm{\omega})) - a_i(\bm{\omega})\right] \label{eq:expectation_interception} \\
    & \stackrel{\text{\circled{\footnotesize B}}}{=} \max_{\Prb\in \bigcap_{i \in \set{G}} \tilde{\set{D}}_i}  \Eptn_{\Prb}\left[\sum_{i\in\set{G}}c_i(p_{G,i}(\bm{\omega}))\right],\nonumber
\end{align}%
\allowdisplaybreaks[0]%
where transition $\circled{\footnotesize A}$ is due to the replacement of individual risk sets $\set{D}_i$ with the intersection of all risk sets $\tilde{\set{D}}_0 = \bigcap_{i \in \set{G}}\tilde{\set{D}}_i$ and transition $\circled{\footnotesize B}$ is due to the market-clearing ADS condition in \cref{eq:ads_market_clearing}.
Since $\mu(\bm{\omega}) \in \tilde{\set{D}}_i, \forall i\in \set{G}$ and $\tilde{\set{D}}_0 \neq \emptyset$, due to observation O2 above, \cref{eq:sum_over_ti,eq:expectation_interception} yield
\begin{equation}
     \Eptn_{\mu}\!\left[\sum_{i\in\set{G}}c_i(p_{G,i}(\bm{\omega}))\right]\!=\!\max_{\Prb_k \in \tilde{\set{D}}_0} \! \Eptn_{\Prb_k}\!\left[\sum_{i\in\set{G}}c_i(p_{G,i}(\bm{\omega}))\right],
\end{equation}
showing that $\mu(\bm{\omega})$ is the worst-case probability measure for the risk-averse market with risk trading.
\hspace*{\fill} $\square$

\begin{remark}
Propositions \ref{prop:equivalence_to_mu} and \ref{prop:wc_socialplaner} hold if  \cref{mod:rt_ccopf} has binding constraints in \cref{base_ref:flowconstraints}, which can be proven analogously.
\end{remark}

\subsection{Discrete Risk Trading}
\label{ssec:discrete_risk_trading}

{\color{black}
Recall that Section~\ref{ssec:continous_risk_trading} defines ADS as continuous over $\bm{\omega}$, which leads to an infinite-dimensional problem in \cref{{mod:rt_ccopf}} and obstructs tractable computations and designing practical risk contracts. To overcome these caveats, the probability space of $\bm{\omega}$ can be discretized to consider contracts for discrete events.
}
Hence,   consider the system-wide (aggregated) RES forecast error  given as $\mathbf{O} = e^{\top}\bm{\omega}$ with mean $\Eptn_{\Prb_k}[\mathbf{O}] = 0$ and variance ${\Var_{\Prb_k}[\mathbf{O}] =  e^{\top}\Sigma_k e \eqqcolon \sigma_k^2}$, where $e$ is the vector of ones of appropriate dimensions. The probability space of $\mathbf{O}$ can then be divided into $W$ events $w=1,...,W$, where each event is a closed interval given by   $\set{W}_w = [l_w, u_w]$ so that $\bigcup_{w=1}^W \set{W}_w  = \mathbb{R}$.
These intervals are sequential such that $l_1 = -\infty$, $u_W = \infty$ and $u_w = l_{w+1}, w=1,...,W\!-\!1$. Using this discretization, the probability of each discrete outcome is defined by $\Prb_k$ as:
\allowdisplaybreaks
\begin{align}
    P_w(\sigma_k) \coloneqq
    \Prb_k[\mathbf{O} \in \set{W}_w]
        &= \Prb_k[(\mathbf{O} \leq u_w)\cap (\mathbf{O} \geq l_w) ]  \nonumber\\
        & = \int_{l_w}^{u_w} \!\! f(x,\sigma_k)dx
\label{eq:event_probabilites}
\end{align}%
\allowdisplaybreaks[0]%
and can be pre-computed for all $w=1,...,W$ and $k=1,...,K$. Using the discrete space notation,  \cref{eq:ADS_cost} recasts as:
\begin{align}
    \pi_{a_i} = \sum_{w=1}^W \mu_w a_{i,w},
\label{eq:p_ai_discrete}
\end{align}
where $a_{i,w} \in \mathbb{R}$. Next, using  \cref{eq:event_probabilites},  the expected cost or payment $a_i(\bm{\omega})$ under $\Prb_k$ can be computed as:
\begin{equation}
\begin{split}
    \Eptn_{\Prb_k}[a_i(\bm{\omega})]
        & = \sum_{w=1}^W a_{i,w} P_w(\sigma_k).
\end{split}%
\label{eq:ai_expectation_discrete}%
\end{equation}%
Finally, using  \cref{eq:p_ai_discrete,eq:ai_expectation_discrete} and
{\color{black} the discrete-space equivalent of \cref{eq:Li_over_aom}, i.e. the optimality condition for $a_{i,w}$,
}%
the discrete-space equivalent of $\mu(\bm{\omega})$ is computed as:
\begin{equation}
\begin{split}
  \mu_{w}
        & = \sum_{k=1}^K \eta_k P_w(\sigma_k)
         = \sum_{k=1}^K \eta_{i,k} \int_{l_w}^{u_w} f(x,\sigma_{i,k})dx \\
        & = \int_{l_w}^{u_w} \sum_{k=1}^K \eta_{i,k} f(x,\sigma_{i,k})dx \quad \forall i\in\set{G},
\end{split}
\label{eq:mu_discrete}
\end{equation}
where $\sigma_{i,k} = \norm{e^{\top}\Sigmartk}_2$ with $\Sigma_k \in \set{S}_i$.
Hence, due to \cref{eq:mu_discrete},  $\mu_{w}$ retains the interpretation of $\mu(\bm{\omega})$ from observation O1 of Proposition~\ref{prop:equivalence_to_mu}. Indeed,  a random variable with probability density function $\sum_{k=1}^K \eta_{i,k} f(x,\sigma_{i,k})$ has variance
$\norm{e^{\top}(\sum_{k=1}^K\eta_{i,k}\Sigma_k)^{\nicefrac{1}{2}}}_2^2=e^{\top}(\sum_{k=1}^K\eta_k\Sigma_k)e$, it follows that $\Var_\mu(\mathbf{O})=e^{\top}(\sum_{k=1}^K\eta_{i,k}\Sigma_k)e.$ Using this result and \cref{eq:p_ai_discrete,eq:ai_expectation_discrete,eq:mu_discrete,eq:event_probabilites}, a discrete modification of the risk-averse chance-constrained electricity market  with risk trading in \cref{mod:rt_ccopf} is:
\allowdisplaybreaks
\begin{subequations}
\begin{align}
    \min_{\substack{p_{G,i}, \alpha_i, a_{i,w} \\ s_{p_{G,i}}, t_i}} \quad
        & \sum_{i\in\set{G}} (c_i(p_{G,i}) + t_i) \label{rt_ccopf_discrete:objectve}\\
    \text{s.t.} \quad
        & \text{\cref{base_ref:zeta_i,base_ref:upper_gen_cc,base_ref:lower_gen_cc,base_ref:flowconstraints,base_ref:enerbal,base_ref:balbal}} \\
    (\eta_{i,k}): \quad
        & t_i \!\geq  c_{2i} \norm{\alpha_i^{\top} \Sigmartk}_2^2 \!+\!\! \sum_{w=1}^W a_{i,w} \!P_w\left(\sigma_{i,k}\right), \nonumber \\
        & \hspace{3.5cm} \forall \Sigma_k \in \set{S}_i ,\, \forall i \label{rt_ccopf:wc_cost} \\
    (\mu_w): \quad
        & \sum_{i\in\set{G}} a_{i,w} = 0, \quad \forall w=1,...,W.
    \label{rt_ccopf:ads_market_clearing}
\end{align}%
\label{mod:rt_ccopf_dicrete}%
\end{subequations}%
\allowdisplaybreaks[0]%
Since the discrete representation of ADS contracts in \cref{mod:rt_ccopf_dicrete} is a special case of the infinite-dimensional representation in \cref{mod:rt_ccopf}, the results of Propositions \ref{prop:equivalence_to_mu} and \ref{prop:wc_socialplaner}  hold for \cref{mod:rt_ccopf_dicrete}.

\subsection{Price Analysis with Risk Trading}
\label{sec:price_analysis}

Using the risk-averse chance-constrained electricity market  with discrete risk trading in \cref{mod:rt_ccopf_dicrete}, this section analyzes resulting energy, balancing reserve and risk prices as follows:
\begin{prop}
\label{prop:energy_prices}
Consider the risk-averse chance-constrained market with risk trading in \cref{mod:rt_ccopf_dicrete}. Let $\lambda_i$, $\chi_u$ and $\mu_w$ be the dual multipliers of the active power balance \cref{base_ref:enerbal}, the reserve sufficiency constraint \cref{base_ref:balbal} and the ADS market-clearing constraint \cref{rt_ccopf:ads_market_clearing}. Then $\mu_w$ is given by \cref{eq:mu_discrete} and  $\lambda_i$, $\chi_u$  are:
\allowdisplaybreaks
\begin{align}
    \hspace{-2.5mm} \lambda_i & =
        2 c_{2i}p_{G,i} + c_{i1} + (\delta_i^+ - \delta_i^-) + y_{p_{G,i}}(\theta) \label{eq:lambda_rt} \\
    \hspace{-2.5mm}  \chi_u & \!=\! \frac{1}{|\set{G}|}
        \sum_{i\in\set{G}}\!\!\left(
        \!\!2c_{2i}\alpha_i^{\top}[\overline{\Sigma}_i]_u\!+\!z_{1-\epsilon_g} \delta_i \frac{\alpha_i^{\top}[\Sigma]_u}{s_{G,i}}\!+\! y_{\alpha_{i,u}}\!(\theta)\!\!\right)\!, \label{eq:chi_rt}
\end{align}%
\allowdisplaybreaks[0]%
where $y_{p_{G,i}}(\theta) \coloneqq \theta^{\top}\frac{\partial\tilde{F}_{\epsilon_f}}{\partial p_{G,i}}$, $y_{\alpha_{i,u}}(\theta)\coloneqq\theta^{\top}\frac{\partial\tilde{F}_{\epsilon_f}}{\partial \alpha_{i,u}}$, $\overline{\Sigma}_i \coloneqq (\sum_{k=1}^K \eta_{i,k} \Sigma_k \mid \Sigma_k\in\set{S}_i$), $\delta_i \coloneqq \delta_i^+ + \delta_i^-$, $[X]_u$ is the vector of elements in the  $u$-th column of matrix $X$, and $s_{G,i} = \norm{\alpha_i^{\top}\Sigmart}_2$, i.e. the standard deviation of $p_{G,i}(\bm{\omega})$.
\end{prop}
\noindent\textit{Proof. }
Let $\mathcal{L}$ be the Lagrangian function of \cref{mod:rt_ccopf_dicrete}, its first-order optimality conditions  for $p_{G,i}$, $\alpha_{i,u}$, $s_{p_{G,i}}$ and $a_{i,w}$ are:
\allowdisplaybreaks
\begin{subequations}
\begin{align}
\begin{split}
    \frac{\partial \mathcal{L}}{\partial p_{G,i}}
        & = 2 c_{2i}p_{G,i} + c_{i1} + (\delta_i^+ - \delta_i^-)  \\
        & + y_{p_{G,i}}(\theta) - \lambda_i = 0,\ \forall i \in \set{G}
\end{split}\label{eq:l_over_pgi}\\
\begin{split}
    \frac{\partial \mathcal{L}}{\partial \alpha_{i,u}}
        &= 2c_{2i}\alpha_i^{\top}[\overline{\Sigma}_i]_u + \zeta_i \frac{\alpha_i^{\top}[\Sigma]_u}{\norm{\alpha_i^{\top}\Sigmart}_2} \\
        & +  y_{\alpha_{i,u}}(\theta) -\chi_u = 0,\ \forall i \in \set{G},\ \forall u \in \set{U}
\end{split}\label{eq:l_over_alphaiu}\\
\begin{split}
    \frac{\partial \mathcal{L}}{\partial s_{p_{G,i}}}
        & = -\zeta_i + \delta_i^+ z_{1-\epsilon_g} + \delta_i^- z_{1-\epsilon_g} = 0,\ \forall i \in \set{G}
\end{split}\label{eq:l_over_si} \\
\begin{split}
    \frac{\partial \mathcal{L}}{\partial a_{i,w}}
        & = \sum_{k=1}^K \eta_{i,k}P_w(\sigma_{k,i}) - \mu_w = 0
\end{split}\label{eq:l_over_aiw}
\end{align}%
\end{subequations}%
\allowdisplaybreaks%
{\color{black}Expressions \cref{eq:lambda_rt} and \cref{eq:chi_rt}} follow immediately from  \cref{eq:l_over_aiw} and \cref{eq:l_over_pgi}, respectively.
Expressing $\zeta_i$  from \cref{eq:l_over_si} and summing over all $i\in\set{G}$ in \cref{eq:l_over_alphaiu} yields \cref{eq:chi_rt}.
\hspace*{\fill} $\square$

Notably,  energy prices in \cref{eq:lambda_rt} are driven by cost coefficients  of $c_i(\cdot)$ and do not explicitly depend on random $\bm{\omega}$, risk set $\mathcal D_i$ and tolerance to chance constraint violations  $\epsilon_g$. On the other hand, the balancing reserve price in \cref{eq:lambda_rt}  depends on $\bm{\omega}$ (via parameter $\Sigma$),  $\mathcal D_i$ (via parameter $\overline{\Sigma}_i$) and $\epsilon_g$. Finally, risk prices in \cref{eq:mu_discrete} depends on the degree of discretization $W$, which affects interval limits $l_w$ and $u_w$, and individual risk perception given by set $\mathcal D_i$ (via parameter $\sigma_{i,k}$).

\section{Case Study}
\label{sec:case_study}

{\color{black}
We conduct a case study to illustrate some of the theoretical results of the paper by comparing the \textit{ex ante} outcomes of the risk-averse chance-constrained electricity market without risk trading (``NO-RT''), as formulated in \cref{mod:ra_ccopf}, and with risk trading (``RT''), as formulated in \cref{mod:rt_ccopf_dicrete}.
We construct a data set that includes five conventional producers with parameters \unit[$c_{1i} = \{10,7,7,15,17\}$]{\$/MW}, $c_{2i} = 0.1c_{1i}, \forall i \in \set{G}$, \unit[$\overline{p}_{G,i}=\{30,10,10,25,25\}$]{MW} and $\underline{p}_{G,i}=0, \forall i \in \set{G}$, and five undispatchable stochastic RES producers. The total system demand is $\sum_{i\in\set{N}}p_{D,i}=\unit[100]{MW}$ and forecasted RES production is $p_{U,i}=\unit[5]{MW}, \forall i \in \set{U}$.
The risk sets $D_i$ defined by set $S_i$, see \cref{eq:Di_discrete}, of the individual producers are constructed with $K=10$ as follows.
Each producer $i$ has a set $\set{S}_i$ of $K-1$ covariance matrices that reflect their individual risk perception.
We randomly generate these sets with the
standard deviation of $\bm{\omega}_i$ between $0$ to  $0.4 p_{U,i}$ and the correlation between 0 to $0.5$.
Additionally, we assume there exists a ``common'' covariance defined such that all $\bm{\omega}_i$ have a standard deviation of $0.2 p_{U,i}$ and no correlation.
This common covariance matrix is added to all $\set{S}_i$ and can, for example, reflect information provided by the market operator or some third-party forecast provider.
We create eight ADS events by discretizing the probability space of $\bf{O}$ in eight intervals using  breakpoints $[ -0.2, -0.1, -0.05, 0, 0.05, 0.1, 0.2]$, as explained in Section~\ref{ssec:discrete_risk_trading} and  shown on the x-axis of Fig.~\ref{fig:ads_results}(a).
The code and data is available in \cite{risk_trading_code}.
}

{\color{black}
For this data set, the RT case reduces the risk-adjusted system cost by 0.2\% relative to the NO-RT case.
Notably, the energy cost component (\unit[4,656.50]{\$}) and energy prices (\unit[62.09]{\$}) are the same in both cases, but the balancing reserve cost component is reduced by \unit[11]{\%} (from \unit[6.17]{\$} to \unit[5.52]{\$}).
Similarly, generation levels $p_{G,i}$ remain unchanged for both cases (see Table~\ref{tab:alphas}). On the other hand, the introduction of ADS trading changes the balancing reserve provision ($\alpha_{i,u}$) and its prices ($\chi_u$), as shown in Table~\ref{tab:alphas}, which is influenced by different risk beliefs of market participants.
}

\begin{table}[t]
\setlength{\tabcolsep}{2.5pt}
\caption{Power Outputs and Balancing Participation Factors}
\label{tab:alphas}
    \centering
    \begin{tabular}{c|c|ccccc|ccccc}
    \toprule
     &  & \multicolumn{5}{c|}{ $\alpha_{i,u}$ in the RT case} & \multicolumn{5}{c}{$\alpha_{i,u}$  in the NO-RT case} \\
     & $p_{G,i}$ & $u=1$ & 2 &  3 &  4 &  5 &  1 & 2 &  3 &  4 &  5 \\
    \midrule
        $i=1$ & 26.04 & 0.09 &      0.18 &      0.26 &      0.34 &      0.21 &      0.19 &      0.19 &      0.23 &      0.31 &      0.24 \\
        2 & 10.00 & 0.41 &      0.30 &      0.40 &      0.10 &      0.17 &      0.39 &      0.26 &      0.32 &      0.10 &      0.25 \\
        3 & 10.00 & 0.31 &      0.28 &      0.06 &      0.33 &      0.31 &      0.37 &      0.27 &      0.12 &      0.28 &      0.23 \\
        4 & 15.70 & 0.01 &      0.14 &      0.14 &      0.12 &      0.26 &      0.04 &      0.15 &      0.18 &      0.14 &      0.20 \\
        5 & 13.36& 0.18 &      0.10 &      0.15 &      0.11 &      0.06 &      0.02 &      0.13 &      0.15 &      0.17 &      0.08 \\
    \midrule
    $\chi_u$ & -- &  1.24 & 1.54 & 0.72 & 0.69 & 1.31 & 0.91 & 1.47 & 1.31 & 1.34 & 1.11 \\
    \bottomrule
    \multicolumn{12}{l}{\color{black}
    (Indices $i$ relate to producers, indices $u$ relate to uncertain RES.)}
    \end{tabular}
\end{table}

\begin{figure}
    \centering
    \includegraphics[width=1\linewidth]{figures/ads_results.pdf}
    \caption{
    {\color{black}
    Risk trading results in the RT case: (a) itemizes the event probabilities $P_w(\sigma_{i,k})$, see \cref{eq:event_probabilites},  drawn from all individual risk sets (shown in thin gray lines) relative to the ``common"   distribution (dashed green line) and the ADS prices $\mu_w$ (solid red line); (b) itemizes the ADS trades, where negative (purple) values indicate a producer selling ADS and positive (orange) values indicate a producer buying ADS. The columns in both (a) and (b) reflect the events with breakpoints indicated on the x-axis of (a) and event numbers as indicated on the x-axis of (b).}
    }
    \label{fig:ads_results}
\end{figure}

{\color{black}
Fig.~\ref{fig:ads_results} summarizes the discrete events and resulting risk trades. Each column in Fig.~\ref{fig:ads_results} reflects one event, numbered on the x-axis of Fig.~\ref{fig:ads_results}(b) and with the interval breakpoints shown on the x-axis of Fig~\ref{fig:ads_results}(a).
ADS trading outcomes are itemized in Fig.~\ref{fig:ads_results}(b), where negative and positive values indicate ADS selling and purchasing producers, respectively.
Due to the symmetry of the RES uncertainty distributions, the ADS trading outcomes are also symmetric. Note that producers 1 and 5 are security providers and producers 2-4 are security takers. Specifically, in the NO-RT case, producer 5 expects to attain a greater profit by providing less balancing reserve to RES $u=1$ than in the RT case. In other words, when producer 5 can hedge its risk via ADS trade, it is incentivized to procure more balancing reserve for RES $u=1$.
The risk-aversion also affects the  ADS prices in Fig.~\ref{fig:ads_results}(b)  given by dual $\mu_w$ of the ADS market-clearing constraint \cref{eq:ads_market_clearing} for each event. As shown in Fig.~\ref{fig:ads_results}(a), the values of risk prices $\mu_w$ in Fig.~\ref{fig:ads_results}(b), match  the ``common'' event probabilities. That is, $\mu_w$ is indeed a probability measure, as in Proposition~\ref{prop:equivalence_to_mu}, and captures the risk perception at the intersection of all risk sets $\tilde{\set{D}}_i$, as in Proposition~\ref{prop:wc_socialplaner}.
}

\section{Conclusion}

This paper has developed a risk-averse modification of the chance-constrained electricity market proposed in   \cite{dvorkin2019chancemarket,mieth2019risk,mieth2019distribution} by completing it with ADS-based risk trading.  By discretizing the outcome space of the system uncertainty, we formulated practical ADS contracts that lead to a computationally tractable market-clearing optimization with risk trading. This optimization reduces the system operating cost relative to the case with no risk trading and  produces energy, balancing reserve and risk prices. In particular, both qualitative and quantitative analyses indicate that system uncertainty and risk parameters do not explicitly affect the energy prices, but explicitly contribute to the formation of the balancing reserve and risk prices.

\bibliographystyle{IEEEtran}

\section{Test}

\newcommand{\set}[1]{\mathcal{#1}}
\newcommand{\un}[1]{\mathbf{#1}}
\newcommand{\norm}[1]{\left\lVert#1\right\rVert}
\newcommand{\bm{\epsilon}}{\bm{\epsilon}}
\newcommand{\bm{\omega}}{\bm{\omega}}
\newcommand{\bm{\Omega}}{\bm{\Omega}}
\newcommand{\tilde{\bm{\epsilon}}}{\tilde{\bm{\epsilon}}}

\DeclareMathOperator{\Ploss}{Ploss}
\DeclareMathOperator{\Qloss}{Qloss}
\DeclareMathOperator{\LP}{LP}
\DeclareMathOperator{\LQ}{LQ}
\DeclareMathOperator{\Var}{Var}
\DeclareMathOperator{\Skew}{Skew}
\DeclareMathOperator{\Kurt}{Kurt}
\DeclareMathOperator{\Cov}{Cov}
\DeclareMathOperator{\Stdv}{Stdv}
\DeclareMathOperator{\Tr}{Tr}
\DeclareMathOperator{\diag}{diag}
\DeclareMathOperator{\Rest}{Rest}
\DeclareMathOperator{\Eptn}{\mathbb{E}}
\DeclareMathOperator{\RM}{\mathbb{F}}
\DeclareMathOperator{\Prb}{\mathbb{P}}
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
\DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor}
\DeclarePairedDelimiter{\scal}{\langle}{\rangle}
\DeclareMathOperator{\vect}{vec}
\DeclareMathOperator{\cvar}{CVaR}
\DeclareMathOperator{\var}{VaR}
\DeclareMathOperator{\Sigmart}{\Sigma^{\nicefrac{1}{2}}}
\DeclareMathOperator{\Sigmartk}{\Sigma_k^{\nicefrac{1}{2}}}
\DeclareMathOperator{\conv}{conv}

\def\noindent\textit{Proof. }{\noindent\textit{Proof. }}
\def\hspace*{\fill} $\square${
    \hspace*{\fill} $\square$

}

redpajama_set_name: RedPajamaArXiv


text:
Q: How to find directories containing two different file names? I have a music volume on my NAS which contains plenty of CD's.The file names are typically 01.name.mp3 , 02.name.mp3 etc.
On another part of the NAS I store snapshots taken and named at each hour of the day 00-00-00.jpg , 01-00-00.jpg.... 23-00-00.jpg
I made a crontab to delete the snapshots before 7am as they were usually dark , so no point in keeping them.
Well guess what , I had a link in snapshots folder which I had forgotten ,pointing to the music files. So after a while I realized most of my music files from 01-name.mp3 to 07-name.jpg had been deleted.
What I am trying to do is assess the damage & display only the directories that contain files starting with 09-name.mpg AND do not contain 01-name.mp3.This folder (or cd) has had the files lower than 07 deleted.
Ideally during the search I would like to eliminate any other directory containing a non-numeric name like "main-theme.mp3" as I know these folders are complete.
I did try:
find . -name  "09*" -a ! -name "01*"

but it didn't work. I also tried this which did not work
find . -mindepth 2 -maxdepth 2 -type d '!' -exec test -e "{}/01*" ';' -print

My system:
Linux fut-NUC7i3BNH 4.15.0-96-generic #97-Ubuntu SMP Wed Apr 1 03:25:46 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
NAME="Ubuntu"
VERSION="18.04.4 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.4 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

A:
You can do it in two steps: find directories which contain name number one, then find in the output directories which contain name number 2.

Example:
find . -name  "09* > output_first_search
cat output_first_search | grep "01*"

A: The next command

*

*looks for all unique folders containing files starting with 09*

*looks for all unique folders containing files starting with 01*

*removes lines which point to 01* files from output which points to 09* files.

Number of 09* files should be bigger then number of 01* files because a part of them have been removed, so the command will output only folders with 01* files removed.
snpath=$(echo ~/test/snapshots/) && \
find $snpath -name "09*" | sed 's|\(.*\)/.*|\1|' | sort | uniq > allf.txt && \
find $snpath -name "01*" | sed 's|\(.*\)/.*|\1|' | sort | uniq > notallf.txt && \
grep -Fvxf notallf.txt allf.txt | grep -oP "^$snpath\K.*"

*

*$ snpath=$(echo ~/test/snapshots/) - full path to snapshots folder

*find $snpath -name "09*" finds all files starting with 09 with their full paths

*sed 's|\(.*\)/.*|\1|' strips files names leaving parent directories paths only

*sort | uniq removes duplicate paths lines leaving only unique directories names

*find $snpath -name "01*" | sed 's|\(.*\)/.*|\1| finds undesired directories we do not want to see (they do not contain removed files)

*grep -Fvxf notallf.txt allf.txt removes undesired folders names from all folders' list leaving only folders that contain 09* files names and do not contain 01* files names

*awk 'NR==FNR{a[$0];next} !($0 in a)' notallf.txt allf.txt could be used instead of previous grep command

*grep -oP "^$snpath\K.*" path to snapshots folder from output
$ tree ./
./
├── allf.txt
├── Alligator Records 20th Anniversary Collection
│   ├── CD1
│   │   ├── 01 - Hound Dog Taylor And The Houserockers .mp3
│   │   ├── 02 - James Cotton - No Cuttin Loose.mp3
│   │   ├── 03 - Black Cat Bone .mp3
│   │   ├── 04 - Professor Longhair - Big Chief.mp3
│   │   ├── 05 - Koko Taylor - Thats Why Im Crying.mp3
│   │   ├── 06 - Tinsley Ellis - Double-eyed Whammy.mp3
│   │   ├── 07 - Lucky Peterson - Im Free.mp3
│   │   ├── 08 - A.C. Reed-Stevie Ray Vaughan mp3
│   │   ├── 09 - Little Charlie And The Nightcats - Rain.mp3
│   │   └── file1
│   ├── CD2
│   │   ├── 09 - Bessie Smith,Moan, You Moaners.mp3
│   │   ├── 10 - Louis Armstrong,Nobody Knows The Trouble Ive Seen.mp3
│   │   ├── 11 - Golden Gate Quartet,The Valley Of Time.mp3
│   │   └── 12 - Golden Gate Quartet,The Sun Didnt Shine.mp3
│   └── file2
├── file
└── notallf.txt

3 directories, 18 files

Result:
$ snpath=$(echo ~/test/snapshots/) && find $snpath -name "09*" | sed 's|\(.*\)/.*|\1|' | sort | uniq > allf.txt && find $snpath -name "01*" | sed 's|\(.*\)/.*|\1|' | sort | uniq > notallf.txt && grep -Fvxf notallf.txt allf.txt | grep -oP "^$snpath\K.*"
Alligator Records 20th Anniversary Collection/CD2

redpajama_set_name: RedPajamaStackExchange


One of the primary distinguishing factors that differentiate a health-focused practice from a disease treatment focused practice is this: the health-focused practice will place an equal emphasis on identifying the factors which cause disease and eliminating them, in addition to treatment of the diseased condition. The disease treatment focused practice will merely be looking for what's broken so they can fix it. In other words, they just treat the "symptoms" instead of the root cause of the problem.
Today it is possible to change a mouth from one that gets cavities and gum disease, to one that won't. All that is required is a slightly different approach, more knowledge and understanding on your part as to HOW and WHY dental disease occurs. Since both caries (dental decay) and periodontal disease are caused by bacterial infections, it is important to address the underlying infections in each case. We are able to test for cariogenic infections (the bacteria that cause tooth decay) using our CariFree system. For those with moderate to high levels of cariogenic bacteria, we can prescribe the appropriate CariFree rinse to eliminate this infection from your mouth.
At each Dental Wellness appointment, in addition to an Oral Cancer Exam & Cavity Detecting Exam, several additional evaluations are completed which together give us more information about your present Dental Health. These tests evaluate your past Dental Health, tell us your potential for dental disease today, and help us prevent dental disease in the future.
Gum Disease is the primary cause of tooth loss in adults, in contrast to children up to the age of 20, in which tooth decay is the primary cause. From that time forward, the bacteria that constantly form in our mouths are more likely to produce Gum Disease than anything else in adults.
To prevent dental disease from occurring in the first place.
To identify DISEASE PROCESSES in early stages and to arrest and control disease and preserve natural teeth.
To put as much emphasis on treating the CAUSES of disease as we do treatment of the SYMPTOMS.
To maintain and restore the tissues of your mouth to a state of OPTIMAL DENTAL HEALTH with corrective procedures as necessary.
To give you complete up-to-date OBJECTIVE information about the state of your dental health.


text:
import {Injectable} from "@angular/core";
import {BehaviorSubject} from "rxjs/BehaviorSubject";
import {User} from "api/models/user";

@Injectable()
export class UserService {
  currentUser$ = new BehaviorSubject<User>(null);
  currentUserId: string;

  constructor() {}

  subscribeCurrentUser() {
    // this.subscribe('users.currentUser', () => {
    //   this.autorun(() => {
    //     this.currentUser$.next(<User>Meteor.user());
    //     this.currentUserId = Meteor.userId();
    //   });
    // })
  }

  // _initAutorun(): void {
  //   this.autorunComputation = Tracker.autorun(() => {
  //     this.zone.run(() => {
  //       this.currentUser = Meteor.user();
  //       this.currentUserId = Meteor.userId();
  //       this.isLoggingIn = Meteor.loggingIn();
  //       this.isLoggedIn = !!Meteor.user();
  //     })
  //   });
  // }

}


text:
/* $Id$ */

package org.apache.fop.fo.properties;

/**
 * Defines property access methods for internal structure pointer extension properties.
 */
public interface StructurePointerPropertySet {

    /**
     * Returns the value of the "foi:ptr" property, the internal structure pointer used
     * for tagged PDF and other formats that support a structure tree in addition to paged content.
     * @return the "foi:ptr" property
     */
    String getPtr();

}


text:
package util;

import lombok.extern.slf4j.Slf4j;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.stream.Collectors;

/**
 * A mock API that just returns JSON data under the json-logs/sample directory.
 */
@WebServlet
@Slf4j
public class MockSlackApi extends HttpServlet {

    public static final String ValidToken = "xoxb-this-is-valid";
    public static final String InvalidToken = "xoxb-this-is-INVALID";

    private final FileReader reader = new FileReader("../json-logs/samples/api/");

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
        String requestBody = null;
        try (InputStream is = req.getInputStream();
             InputStreamReader isr = new InputStreamReader(is);
             BufferedReader br = new BufferedReader(isr)) {
            requestBody = br.lines().collect(Collectors.joining());
            log.info("request body: {}", requestBody);
        }
        String methodName = req.getRequestURI().replaceFirst("^/api/", "");
        if (!methodName.equals("api.test") && !methodName.startsWith("oauth.")) {
            String authorizationHeader = req.getHeader("Authorization");
            if (authorizationHeader == null || authorizationHeader.trim().isEmpty()) {
                resp.setStatus(200);
                resp.getWriter().write("{\"ok\":false,\"error\":\"not_authed\"}");
                resp.setContentType("application/json");
                return;
            } else if (!authorizationHeader.equals("Bearer " + ValidToken)) {
                resp.setStatus(200);
                resp.getWriter().write("{\"ok\":false,\"error\":\"invalid_auth\"}");
                resp.setContentType("application/json");
                return;
            }
        }

        String body = reader.readWholeAsString(methodName + ".json");
        if (methodName.startsWith("oauth.")) {
            // oauth.v2.access / oauth.access
            if (requestBody.contains("code=valid")) {
                body = body.replaceFirst("\"ok\": false,", "\"ok\": true,");
                body = body.replaceFirst("\"access_token\": \"\",", "\"access_token\": \"" + ValidToken + "\",");
                body = body.replaceFirst("\"bot_access_token\": \"\",", "\"bot_access_token\": \"" + ValidToken + "\",");
            }
        } else {
            body = body.replaceFirst("\"ok\": false,", "\"ok\": true,");
        }

        if (methodName.equals("auth.test")) {
            body = "{\n" +
                    "  \"ok\": true,\n" +
                    "  \"url\": \"https://java-slack-sdk-test.slack.com/\",\n" +
                    "  \"team\": \"java-slack-sdk-test\",\n" +
                    "  \"user\": \"test_user\",\n" +
                    "  \"team_id\": \"T1234567\",\n" +
                    "  \"user_id\": \"U1234567\",\n" +
                    "  \"bot_id\": \"B12345678\",\n" +
                    "  \"enterprise_id\": \"E12345678\",\n" +
                    "  \"error\": \"\"\n" +
                    "}";
        }
        if (body == null || body.trim().isEmpty()) {
            resp.setStatus(400);
            return;
        }
        resp.setStatus(200);
        resp.getWriter().write(body);
        resp.setContentType("application/json");
    }

}


text:
package sarama

import (
	"time"
)

// DescribeClientQuotas Response (Version: 0) => throttle_time_ms error_code error_message [entries]
//   throttle_time_ms => INT32
//   error_code => INT16
//   error_message => NULLABLE_STRING
//   entries => [entity] [values]
//     entity => entity_type entity_name
//       entity_type => STRING
//       entity_name => NULLABLE_STRING
//     values => key value
//       key => STRING
//       value => FLOAT64

type DescribeClientQuotasResponse struct {
	ThrottleTime time.Duration               // The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota.
	ErrorCode    KError                      // The error code, or `0` if the quota description succeeded.
	ErrorMsg     *string                     // The error message, or `null` if the quota description succeeded.
	Entries      []DescribeClientQuotasEntry // A result entry.
}

type DescribeClientQuotasEntry struct {
	Entity []QuotaEntityComponent // The quota entity description.
	Values map[string]float64     // The quota values for the entity.
}

type QuotaEntityComponent struct {
	EntityType QuotaEntityType
	MatchType  QuotaMatchType
	Name       string
}

func (d *DescribeClientQuotasResponse) encode(pe packetEncoder) error {
	// ThrottleTime
	pe.putInt32(int32(d.ThrottleTime / time.Millisecond))

	// ErrorCode
	pe.putInt16(int16(d.ErrorCode))

	// ErrorMsg
	if err := pe.putNullableString(d.ErrorMsg); err != nil {
		return err
	}

	// Entries
	if err := pe.putArrayLength(len(d.Entries)); err != nil {
		return err
	}
	for _, e := range d.Entries {
		if err := e.encode(pe); err != nil {
			return err
		}
	}

	return nil
}

func (d *DescribeClientQuotasResponse) decode(pd packetDecoder, version int16) error {
	// ThrottleTime
	throttleTime, err := pd.getInt32()
	if err != nil {
		return err
	}
	d.ThrottleTime = time.Duration(throttleTime) * time.Millisecond

	// ErrorCode
	errCode, err := pd.getInt16()
	if err != nil {
		return err
	}
	d.ErrorCode = KError(errCode)

	// ErrorMsg
	errMsg, err := pd.getNullableString()
	if err != nil {
		return err
	}
	d.ErrorMsg = errMsg

	// Entries
	entryCount, err := pd.getArrayLength()
	if err != nil {
		return err
	}
	if entryCount > 0 {
		d.Entries = make([]DescribeClientQuotasEntry, entryCount)
		for i := range d.Entries {
			e := DescribeClientQuotasEntry{}
			if err = e.decode(pd, version); err != nil {
				return err
			}
			d.Entries[i] = e
		}
	} else {
		d.Entries = []DescribeClientQuotasEntry{}
	}

	return nil
}

func (d *DescribeClientQuotasEntry) encode(pe packetEncoder) error {
	// Entity
	if err := pe.putArrayLength(len(d.Entity)); err != nil {
		return err
	}
	for _, e := range d.Entity {
		if err := e.encode(pe); err != nil {
			return err
		}
	}

	// Values
	if err := pe.putArrayLength(len(d.Values)); err != nil {
		return err
	}
	for key, value := range d.Values {
		// key
		if err := pe.putString(key); err != nil {
			return err
		}
		// value
		pe.putFloat64(value)
	}

	return nil
}

func (d *DescribeClientQuotasEntry) decode(pd packetDecoder, version int16) error {
	// Entity
	componentCount, err := pd.getArrayLength()
	if err != nil {
		return err
	}
	if componentCount > 0 {
		d.Entity = make([]QuotaEntityComponent, componentCount)
		for i := 0; i < componentCount; i++ {
			component := QuotaEntityComponent{}
			if err := component.decode(pd, version); err != nil {
				return err
			}
			d.Entity[i] = component
		}
	} else {
		d.Entity = []QuotaEntityComponent{}
	}

	// Values
	valueCount, err := pd.getArrayLength()
	if err != nil {
		return err
	}
	if valueCount > 0 {
		d.Values = make(map[string]float64, valueCount)
		for i := 0; i < valueCount; i++ {
			// key
			key, err := pd.getString()
			if err != nil {
				return err
			}
			// value
			value, err := pd.getFloat64()
			if err != nil {
				return err
			}
			d.Values[key] = value
		}
	} else {
		d.Values = map[string]float64{}
	}

	return nil
}

func (c *QuotaEntityComponent) encode(pe packetEncoder) error {
	// entity_type
	if err := pe.putString(string(c.EntityType)); err != nil {
		return err
	}
	// entity_name
	if c.MatchType == QuotaMatchDefault {
		if err := pe.putNullableString(nil); err != nil {
			return err
		}
	} else {
		if err := pe.putString(c.Name); err != nil {
			return err
		}
	}

	return nil
}

func (c *QuotaEntityComponent) decode(pd packetDecoder, version int16) error {
	// entity_type
	entityType, err := pd.getString()
	if err != nil {
		return err
	}
	c.EntityType = QuotaEntityType(entityType)

	// entity_name
	entityName, err := pd.getNullableString()
	if err != nil {
		return err
	}

	if entityName == nil {
		c.MatchType = QuotaMatchDefault
	} else {
		c.MatchType = QuotaMatchExact
		c.Name = *entityName
	}

	return nil
}

func (d *DescribeClientQuotasResponse) key() int16 {
	return 48
}

func (d *DescribeClientQuotasResponse) version() int16 {
	return 0
}

func (d *DescribeClientQuotasResponse) headerVersion() int16 {
	return 0
}

func (d *DescribeClientQuotasResponse) requiredVersion() KafkaVersion {
	return V2_6_0_0
}


Program Specialist wanted to provide education and support to help individuals to quit smoking. Provides direct tobacco cessation services across CommuniCare and all partner organizations. Engages with all program participants and provides a comprehensive tobacco assessment and treatment plan. Provides tobacco cessation services in group and individual formats. Supports policy and practice change related to tobacco across CommuniCare and all partner organizations.
Provide individual and group counseling, education and support for tobacco cessation.
Provide community education and outreach on smoking cessation related activities.
Coordinate with Psychiatrist and/or PCP on the use of CCI tobacco cessation pharmacotherapy and/or nicotine replacement therapy.
Experience in health and human services required.
Experience providing tobacco cessation services preferred.
Must have and maintain a valid CT driver's license.
Also must maintain an acceptable driving record and be insurable at a reasonable rate under the Organization's auto insurance plan.
May be required to use own vehicle on company business and to transport clients.


Eyebrows are a beautiful facial feature that help define your personality. Full, healthy eyebrows compliment and enhance the eyes. This eyebrow balm encourages healthy eyebrow growth and offers a natural tint to enhance their fullness. The depth of color is variable with this product, so it is possible to use with both lighter or darker brows, applying the amount you desire to achieve a complementary color.
To use, using a small brush (or Q-tip), dip into balm jar and remove small amount, and begin a layer to brows. Follow by brushing brows with an eyebrow brush.
Colleen Miller is a Licensed Esthetician & Certified Herbalist, with a Bachelor's Degree in Plant & Soil Science. She combines her love for plants (especially Florida natives and medicinal herbs) with her love for skincare to provide you with the most effective, self-care, loving skin rituals and formulas to enhance your overall health. As the owner of Drifting by the Sea, it is her mission to not only bring you fresh, organic, clean beauty that will feed your mind, body, and spirit, but a skincare line that is holistic and effective for long-term experiences.
Attention all Mermaids! Swim your tails over to this link where you can sign up to receive MERMAIL, special offers, esthetician tips, clean green skin recipes, and so much more!